Help solving a limit While helping a friend out for an exam (last year of high school), I found an exercise that neither of us could solve. I've tried a couple of different approaches but nothing seemed to work. Could anyone tell me how to solve it, or at least some hints? This is the exercise:

Knowing that
$$\lim_{x \to a}\frac{x^2-\sqrt{a^3x}}{\sqrt{ax}-a}=12$$
Find out $a$.

We can assume that $a$ exists and is real.
 A: Besides L'Hopital one can simply rationalize the denominator, after discarding case $\rm\:a \le 0\:,\:$ viz:
$$\rm \frac{x^2-a\sqrt{ax}}{\sqrt{ax}-a}\ =\ \frac{x^2-a\sqrt{ax}}{\sqrt{ax}-a} \ \frac{\sqrt{ax}+a}{\sqrt{ax}+a}\ =\ \frac{ax\:(x-a)+\sqrt{ax}\ (x^2-a^2) }{a\:(x-a) }\ =\ x+(x+a)\sqrt{\frac{x}{a}}$$
Since the above $\rm\to 3\ a\ $ as $\rm\ x\to a\ $ the problem reduces to solving $\rm\ 3\ a = 12\:$.
A: One way is application of L'hoipitals rule.  Since both denominator and numerator in $$\lim_{x \to a}\frac{x^2-\sqrt{a^3x}}{\sqrt{ax}-a}$$ 
go to zero, by l'hopitals rule this is the same as 
$$\lim_{x \to a}\frac{2x-a^{3/2}\frac{1}{2}x^{-1/2}}{\frac{\sqrt{a}}{2}x^{-1/2}}$$  Simplifying the expression we get that this equals 
$$\lim_{x \to a}\frac{4x^{3/2}-a^{3/2}}{\sqrt{a}}=\frac{3a^{3/2}}{\sqrt{a}}=3a$$  
Thus choose $a=4$.
A: Using L'hopital Rule we have $$ \lim_{x \to a} \frac{2x- \frac{a^3}{2 \sqrt{a^{3}x}}}{\frac{a}{2 \sqrt{ax}}} = 12$$
$$\Longrightarrow \frac{2a-\frac{a^3}{2a^2}}{\frac{1}{2}} = 12$$
$$\Longrightarrow 2\left(2a- \frac{a^3}{2a^2}\right)= 12$$
So $a = 4$.
A: First note that $a>0$.
If $a<0$, then $$\lim_{x \rightarrow a} \frac{x^2-\sqrt{a^3x}}{\sqrt{ax}-a} = \frac{a^2 - a^2}{-a-a} = 0$$
If $a=0$, then $\lim_{x \rightarrow a} \frac{x^2-\sqrt{a^3x}}{\sqrt{ax}-a}$ doesn't exist.
Hence, $a>0$.
Let $\sqrt{ax}=y$ i.e. $x = \frac{y^2}{a}$. Note that as $x \rightarrow a$, $y \rightarrow a$.
Hence, $$\lim_{x \rightarrow a} \frac{x^2-\sqrt{a^3x}}{\sqrt{ax}-a} = \lim_{y \rightarrow a} \frac{y}{a^2} \frac{y^3-a^3}{y-a} = \frac{3a^2}{a} = 3a$$
Hence, $a=4$
