Why does an uncharged capacitor short out a resistor in a basic DC circuit?
You can look at it this way (since you said you want an answer based on math):

The equation for the current through a capacitor is the following:

\$ I_C = C \dfrac{dV}{dt} \$

So at \$ t=0 \$, when the switch is closed, there's a voltage across the capacitor and \$ \frac{dV}{dt} \$ is really large (theoretically infinite) because there is a change in the voltage in technically 'no time,' therefore the slope \$ (\frac{dV}{dt}) \$ approaches infinity at \$ t=0 \$. Since \$ \frac{dV}{dt} \$ is in theory infinity so is the current through the capacitor (they are directly proportional). That explains why it looks as a short at time zero.

As you probably know differentiation does not exist at sharp edges and this is exactly what is happening from a mathematical point of view. Hope it helps!