How to do dimensional analysis? $$mgh = \frac{mc^2}{\sqrt{1-(v/c)^2}}-mc^2.$$ 
In dimensional analysis do we just ignore the square root? Or do we solve what’s inside first then we do the square root? Do we say $(v/c)^2$ is 1 as dimensions cancel? Then say each term now has the same dimension, so this is correct? I’m so confused please help!
 A: Since $v/c$ is dimensionless, the function $1/\sqrt{1-v^2/c^2}$ is dimensionless and dimensional analysis gets no information from this factor.  It's not so much that you ignore this factor, but just it plays no role in dimensional analysis, just like "$3$" or $\pi$ does not enter in this analysis.
A: Since:
$$ \beta = \frac v c $$
and
$$ \gamma = \frac 1 {\sqrt{1-(\frac v c)^2}} $$
are both dimensionless, that are not amenable to dimensional analysis.
In fact, their lack of dimension makes them great "scale factors" telling you how relativistic your system is. $\beta$ goes from $\epsilon$, or Newtonian mechanics, up to $1-\epsilon$, which is ultra relativistic.  (Here, $\epsilon$ is the traditional "small number").
Meanwhile $\gamma \in [1, \infty)$ tells you how hyperbolic your geometry is.
If one were to apply dimensional analysis to particles of mass $m$ and speed $v$, you'd come up with:
$$ p \propto mv $$
and
$$ E \propto mv^2 \propto \frac{p^2} m$$
which are correct for Newtonian mechanics.
In relativity, at $v=0$, you get:
$$ E_0 \propto mc^2 $$
and at nonzero velocity:
$$ p \propto \gamma^n\beta^k mv $$
and kinetic energy:
$$ T \propto \gamma^{n'}\beta^{k'}pc $$
There's no dimensional analysis that will tell you $n$, $k$, $n'$, $k'$;
rather, you just have to say $k, k' = 0$ and then guess, "let's add them in quadrature because it's geometry" (ikr: a real stretch):
$$ T = E-E_0 = \sqrt{a (pc)^2 + b(mc^2)^2 } -bmc^2 $$ 
$$ T = bmc^2[-1 + \sqrt{1 + \frac{a(pc)^2}{b^2(mc^2)^2)} }]$$
and then take the limit for small $p$ and set it equal to Newton's value:
$$ T \rightarrow  bmc^2[-1 + 1 + \frac 1 2 \frac{a(pc)^2}{b^2(mc^2)^2}] = \frac{a(pc^2)}{2bmc^2} = \frac a {2b} \frac{p^2} m \equiv \frac 1 2 \frac{p^2}{2m}$$
So in summary: dimensional analysis is too naive to predict special relativity. In any system where you have dimensionless combinations, it's likely that dimensional analysis will not save they day.
On the other hand, if you were guess the potential energy of a mass in a gravitational field, you would do:
$$ U \propto mgh $$
which is pretty good, or, say it's on a string of length $L$, what is the period:
$$ t = m^a g^b L^c $$
you'd find $a=0$, $b=-\frac 1 2$, and $L = \frac 1 2 $; also pretty good.
