Pull-up resistor circuit clarification
The circuit modeled by you, shows R2 in series with R1. Closing the switch, will bypass R2, with a total current of \$ I = \frac{U}{R_1} \$. When the switch is open, current will flow equally on both resistors, which is \$ I = \frac{U}{R_1 + R_2} \$. So your formula is wrong.

But, also the schematic redraw is somehow wrong, since the input of the MCU has a resistance in the order of mega-ohms, and is better modeled as a capacitor or to simplify, as open-circuit. So the MCU can be excluded from the current loop and is only important to understand the voltage at its input.


When the switch is open: there is virtually no current, since the MCU input is just an open circuit, therefore the drop on R1 is null since there is no current, and on the MCU input you will see \$ V_{mcuin} = U - R_1 \cdot I = U\$. 
Because \$I = 0\$ since there is no current loop closed.
When the switch is open: the current is the one flowing in \$R_1\$ and is \$ I = \frac {U}{R_1} \$, while the MCU will see 0V since it is now attached to the same negative node of your voltage generator U.