Integration trig substitution $\int \frac{dx}{x\sqrt{x^2 + 16}}$ $$\int \frac{dx}{x\sqrt{x^2 + 16}}$$
With some magic I get down to $$\frac{1}{4} \int\frac{1}{\sin\theta} d\theta$$
Now is where I am lost. How do I do this? I tried integration by parts but it doesn't work.
 A: UPDATE 2 The first integral is not $\int \frac{dx}{x\sqrt{x^{2}-16}}$ but $\int 
\frac{dx}{x\sqrt{x^{2}+16}}$ (as noticed by  julien), because
\begin{eqnarray*}
I &=&\int \frac{dx}{x\sqrt{x^{2}+16}},\qquad x=\tan \theta ,dx=\sec
^{2}\theta d\theta  \\
&=&\int \frac{\sec ^{2}\theta }{\left( \tan \theta \right) 4\sec \theta }%
\,d\theta =\int \frac{\sec \theta }{4\tan \theta }\,d\theta  \\
&=&\int \frac{\sec \theta }{4\tan \theta }\,d\theta =\int \frac{1}{4\sin
\theta }\,d\theta \text{.}
\end{eqnarray*}

Use the Weierstrass substitution $$t=\tan\frac{\theta}{2}.$$
Then
$$\int \frac{1}{\sin \theta }\,d\theta =\int \frac{2}{\frac{2t}{1+t^{2}}
\left( 1+t^{2}\right) }\,dt=\int \frac{1}{t}\,dt=\ln \left\vert t\right\vert
+C=\ln \left\vert \tan \frac{\theta }{2}\right\vert +C.$$
Comment: The Weierstrass substitution is a universal standard substitution to evaluate an integral of a rational fraction in $\sin \theta,\cos \theta$, i.e. a rational fraction of the form 
$$R(\sin \theta,\cos \theta)=\frac{P(\sin \theta,\cos \theta)}{Q(\sin \theta,\cos \theta)},$$
where $P,Q$  are polynomials in $\sin \theta,\cos \theta$ 
$$
\begin{equation*}
\tan \frac{\theta }{2}=t,\qquad\theta =2\arctan t,\qquad d\theta =\frac{2}{1+t^{2}}dt
\end{equation*},
$$
which converts the integrand into a rational function in $t$. We know from trigonometry that 
$$\cos \theta =\frac{1-\tan ^{2}\frac{\theta }{2}}{1+\tan ^{2}\frac{
\theta}{2}}=\frac{1-t^2}{1+t^2},\qquad \sin \theta =\frac{2\tan \frac{\theta }{2}}{1+\tan ^{2}
\frac{\theta }{2}}=\frac{2t}{1+t^2}.$$
Proof. A possible proof is the following one, which uses the double-angle formulas and the identity $\cos ^{2}\frac{\theta}{2}+\sin ^{2}\frac{\theta}{2}=1$:
$$
\begin{eqnarray*}
\cos \theta &=&\cos ^{2}\frac{\theta}{2}-\sin ^{2}\frac{\theta }{2}=\frac{\frac{\cos ^{2}
\frac{\theta}{2}-\sin ^{2}\frac{\theta}{2}}{\cos ^{2}\frac{\theta}{2}}}{\frac{\cos ^{2}
\frac{\theta}{2}+\sin ^{2}\frac{\theta}{2}}{\cos ^{2}\frac{\theta}{2}}}=\frac{1-\tan ^{2}
\frac{\theta}{2}}{1+\tan ^{2}\frac{\theta}{2}}, \\
&& \\
\sin \theta &=&2\sin \frac{\theta}{2}\cos \frac{\theta}{2}=\frac{\frac{2\sin \frac{\theta}{2}
\cos \frac{\theta}{2}}{\cos ^{2}\frac{\theta}{2}}}{\frac{\cos ^{2}\frac{\theta}{2}+\sin ^{2}
\frac{\theta}{2}}{\cos ^{2}\frac{\theta}{2}}}=\frac{2\tan \frac{\theta}{2}}{1+\tan ^{2}
\frac{\theta}{2}}.
\end{eqnarray*}
$$

Another possible substitution is the Euler substitution
$$
\begin{equation*}
\sqrt{x^{2}+16}=t+x.
\end{equation*}
$$
Then
$$
\begin{eqnarray*}
I &=&\int \frac{dx}{x\sqrt{x^{2}+16}}=\int \frac{2}{t^{2}-16}\,dt \\
&=&\int \frac{1}{4\left( t-4\right) }-\frac{1}{4\left( t+4\right) }dt=\frac{1
}{4}\ln \left\vert \frac{t-4}{t+4}\right\vert +C \\
&=&\frac{1}{4}\ln \left\vert \frac{\sqrt{x^{2}+16}-x-4}{\sqrt{x^{2}+16}-x+4}
\right\vert +C.
\end{eqnarray*}
$$
A: Hint:
$$
\begin{align}
\int\frac1{\sin(\theta)}\,\mathrm{d}\theta
&=\int\frac{\sin(\theta)}{\sin^2(\theta)}\,\mathrm{d}\theta\\
&=-\int\frac1{1-\cos^2(\theta)}\,\mathrm{d}\cos(\theta)\\
&=-\frac12\int\left(\frac1{1-\cos(\theta)}+\frac1{1+\cos(\theta)}\right)\,\mathrm{d}\cos(\theta)\\
\end{align}
$$
A: HINT:
$$\int\frac{d\theta}{\sin\theta}=\int\csc\theta d\theta=\int\frac{\csc\theta(\csc\theta+\cot\theta)}{\csc\theta+\cot\theta}d\theta$$
Now what’s the derivative of that last denominator?
A: I think the best answer to the integral of the trigonometric function is the one given by Americo Tavares. Now, the original integral can be treated directly without the unnecessary trigonometric substitution. 
Often forgotten in current Calculus textbooks. Are the Euler's substitutions that allow you to solve not only that integral but every one of the form $\int R(\sqrt{ax^2+bx+c},x)\text{d}x$, where $R(x,y)$ is any rational function. 
These substitutions transform your integral (and any of the form above) into the integral of a rational function. From there the problem is solved because we know how to compute integrals of any rational function.
PS: The algorithm I linked for computing integrals of rational functions is not the only one. There are many others.
A: Let's see if another method works:
$$
\int \frac{dx}{x\sqrt{x^2+16}} = \int\frac{x\,dx}{x^2\sqrt{x^2+16}} = \int \frac{du/2}{(u-16)\sqrt{u}}
$$
where $u=x^2+16$ so that $du=2x\,dx$.  Now let $w=\sqrt{u}$ so that $w^2=u$ and $2w\,dw=du$.  Then we have
$$
\int\frac{w\,dw}{(w^2-16)w} = \int\frac{dw}{(w-4)(w+4)} =\int\left(\frac{\bullet}{w-4} + \frac{\bullet}{w+4}\right) \, dw,\quad\text{ etc.}
$$
Conclusion: It can be done without a trigonometric substitution.
