Integral of $\int \frac{du}{u \sqrt{5-u^2}}$

I am trying to find this integral and I can get the answer on wolfram of course but I do not know what is wrong with my method, having gone through it twice. $$\int \frac{du}{u \sqrt{5-u^2}}$$

$u = \sqrt{5} \sin\theta$ and $du= \sqrt{5} \cos \theta$

$$\int \frac{\sqrt{5} \cos \theta}{\sqrt{5} \cos \theta \sqrt{5-(\sqrt{5} \sin \theta)^2}}$$

$$\int \frac{1}{\sqrt{5-(5 \cos^2 \theta)}}$$

$$\int \frac{1}{\sqrt{5(1- \cos^2 \theta)}}$$ $$\int \frac{1}{\sqrt{5(\sin^2 \theta)}}$$

$$\frac{1}{\sqrt5}\int \frac{1}{(\sin \theta)}$$

$$\frac{1}{\sqrt5}\int \csc\theta$$

$$\frac{\ln|\csc \theta - \tan \theta|}{\sqrt5} + c$$

-
Note that you’re missing a $d\theta$ from every displayed line except the first and last. –  Brian M. Scott May 31 '12 at 10:44
Does that make any difference in the calculations? I know it is suppose to be their but I don't know if it really affects the problem. –  user138246 May 31 '12 at 10:46
It didn’t affect the calculation in this case: the problem there is the one that Ilya noted, the incorrect substitution for $x$ in the denominator. But as he said, omitting it can lead to errors later on. (Besides, many teachers $-$ me, for one! $-$ will penalize you for omitting it.) –  Brian M. Scott May 31 '12 at 10:48

First: don't forget to write differentials $d\theta$ - they are important and omitting them may lead to sad mistakes. But here the problem is that you wrote $\sqrt5\cos\theta$ in the denominator for $u$ instead of $\sqrt5\sin\theta$: it is in the first row where you make the substitution - so the whole solution is incorrect although all further steps are seemed to be done in the right way.

-
I fixed it but I still don't know where I went wrong. –  user138246 May 31 '12 at 11:02
@Jordan How does $(\sqrt{5}\sin x)^2 = 5 \cos^2 x$? That's where you went wrong. –  Eugene May 31 '12 at 11:39
I fixed it in the problem. –  user138246 May 31 '12 at 11:41
@Jordan: I wouldn't say so, looking at the OP –  Ilya May 31 '12 at 11:55

$$\int \frac{du}{u \sqrt{5-u^2}}$$
$u = \sqrt{5} \sin\theta$ and $du= \sqrt{5} \cos \theta d\theta$
Then since $\sin \theta = \dfrac{u}{\sqrt{5}}$, drawing the triangle we find out that the remaining side is $\sqrt{\sqrt{5}^2 -u^2} = \sqrt{5 -u^2}$. Therefore $\csc \theta = \dfrac{1}{\sin \theta}= \dfrac{\sqrt{5}}{u}$ and $\cot\theta = \dfrac{1}{\tan \theta} = \dfrac{\sqrt{5 -u^2}}{u}$. So \begin{eqnarray} -\dfrac{1}{\sqrt{5}} \ln|\csc\theta+\tan\theta| +C &=& -\dfrac{1}{\sqrt{5}} \ln\left|\dfrac{\sqrt{5}}{u}+\dfrac{\sqrt{5 -u^2}}{u}\right| + C \\ &=& -\dfrac{1}{\sqrt{5}}\left(-\ln|u| + \ln\left|\sqrt{5}+\sqrt{5 -u^2}\right|\right) + C \end{eqnarray}