<s>[INST] Finding $\int \frac {dx}{\sqrt {x^2 + 16}}$ I can not get the correct answer. 
$$\int \frac {dx}{\sqrt {x^2 + 16}}$$
$x = 4 \tan \theta$, $dx = 4\sec^2 \theta$
$$\int \frac {dx}{\sqrt {16 \sec^2 \theta}}$$
$$\int \frac {4 \sec^ 2 \theta}{\sqrt {16 \sec^2 \theta}}$$
$$\int \frac {4 \sec^ 2 \theta}{4 \sec \theta}$$
$$\int \sec \theta$$
$$\ln| \sec \theta + \tan \theta|$$
Then I solve for $\theta$:
$x = 4 \tan \theta$
$x/4 = \tan \theta$
$\arctan (\frac{x}{4}) = \theta$
$$\ln| \sec (\arctan (\tfrac{x}{4})) + \tan (\arctan (\tfrac{x}{4}))|$$
$$\ln| \sec (\arctan (\tfrac{x}{4})) + \tfrac{x}{4}))| + c$$
This is wrong and I do not know why.
 [/INST] $$\int \frac {dx}{\sqrt {x^2 + 16}}$$
Let $$t=\sqrt {x^2+16}$$ this will change the integral into $$ \int \frac {dt}{\sqrt {t^2 - 16}}$$
$$t=4\sec (\theta)$$ changes the integral into $$\int \sec \theta d \theta =ln| \sec \theta + \tan \theta|+c$$
$$=\ln (t/4 + \frac {\sqrt {t^2-16}}{4} )+c$$
$$= \ln ( \sqrt \frac {x^2+16}{4}+x/4 )+c$$
</s>