<s>[INST] Solving two algebraic equations I'm trying to prove an identity from physics. I have the following two equations ($M$ is a constant):
$$e^2 = \left(1-\frac{2M}{r}\right)\left(1+\frac{l^2}{r^2}\right)$$ and $$r = \frac{l^2}{2M}\left[1 - \sqrt{1 - 12\left(\frac{M}{l}\right)^2}\right]$$  and I need to show that $$\frac{l}{e} = \sqrt{Mr}\left(1 - \frac{2M}{r}\right)^{-1}$$
I've tried rearranging the second eqation to get $l^2$ on its own and then dividing this by $e^2$ from equation 1 to get an expression for $l^2/e^2$ but this is quite messy and I can't see a clear way to simplify it. Can anyone see a straightforward way of doing this?
 [/INST] let $x=\dfrac{l^2}{M^2},a=\dfrac{2r}{M} \to a=x-\sqrt{x^2-12x} \to x^2-12x=(x-a)^2 \to x=\dfrac{a^2}{2a-12}$
$\sqrt{1-\dfrac{12}{x}}=\sqrt{\dfrac{a^2-12*2a+12*12}{a^2}}=\dfrac{|a-12|}{a}$
now you can simplify more easy.
ya,if 12 is wrong, you give a right number but the middle result is same.
But it seems the last one is not correct,there should a factor of $\sqrt{\left(1 - \dfrac{2M}{r}\right)^{-1}}$
edit: I am interesting to go further after seeing the source poster.
$l^2=\dfrac{(aM)^2}{2a-12}=\dfrac{4r^2}{\dfrac{4r}{M}-12}=\dfrac{r^2M}{r-3M}=\dfrac{rM}{1-\dfrac{3M}{r}}$ 
if $a>12$, we have :
$r=\dfrac{l^2}{2M}\left[1-\dfrac{a-12}{a} \right]=\dfrac{6l^2}{aM}=\dfrac{3l^2}{r} \to \dfrac{l^2}{r^2}=\dfrac{1}{3}\to e^2 = \left(1-\dfrac{2M}{r}\right)\left(1+\dfrac{1}{3}\right)=\left(1-\dfrac{2M}{r}\right)\dfrac{4}{3}$
$\dfrac{l^2}{e^2}=\dfrac{3l^2}{4}\left(1 - \dfrac{2M}{r}\right)^{-1}=\dfrac{3rM}{4}\left(1 - \dfrac{2M}{r}\right)^{-1}\left(1 - \dfrac{3M}{r}\right)^{-1}$
if $a<12$ ,we have :
$r=\dfrac{l^2}{2M}\left[1-\dfrac{12-a}{a} \right]=\dfrac{l^2}{2M}\dfrac{2a-12}{a}=\dfrac{a-6}{2r} \to \dfrac{l^2}{r^2}=\dfrac{2}{a-6}=\dfrac{M}{r-3M} \to$
$1+\dfrac{l^2}{r^2}=\dfrac{r-2M}{r-3M} \to e^2=\left(1 - \dfrac{2M}{r}\right)\dfrac{r-2M}{r-3M} \to $
$\dfrac{l^2}{e^2}=\dfrac{r-3M}{r-2M}*rM*\left(1 - \dfrac{2M}{r}\right)^{-1}\left(1 - \dfrac{3M}{r}\right)^{-1}=rM\left(1 - \dfrac{2M}{r}\right)^{-2}$
so that is the answer!
</s>