I've been trumped by this integral.
I'm doing integration by substitution - for the first time.
I was given the task of finding: $$\int(\frac{\sqrt{x^2+4}}{x} )dx$$ using $u^2 = x^2 +4$
I've ended up with $$\int(\frac{u^2}{u^2 - 4})du$$ I don't know where to go now...
I tried using the formula $\frac{f'(x)}{f(x)}=\ln{f(x)}$: $$\frac{2}{u}\int(\frac{2u}{u^2-4})du = \frac{2}{u}\cdot\ln({u^2-4})=\frac{2\ln{(u^2-4)}}{u}$$ however this isn't the correct answer.
I also tried reformatting to: $$\int(\frac{u^2}{(u-2)(u+2)})du$$ However this leaves me in a different hole.
I have a feeling somewhere during simplification I've missed a step; or, there's an identity for $\frac{x^2}{x^2 - b^2}$.
I've ran into a similar problem in a different question, resulting in: $$\int(\frac{4}{u^2-4})du$$
Both are in the form $\frac{a^2}{a^2 - b^2}$, so I must be missing something - I coincidentally read earlier today, coincidences are rare in mathematics, often you find you're missing something.
Notice that
$$\frac{u^2}{u^2-4}=\frac{u^2-4+4}{u^2-4}=1+\frac4{u^2-4}=1+\frac1{u-2}-\frac1{u+2}$$
Partial fraction decomposition, here, is pretty simple.
$$\frac4{(u-2)(u+2)}=\frac a{u-2}+\frac b{u+2}$$
for some unknown $a,b$. Multiply both sides by $(u-2)(u+2)$ to get that
$$4=a(u+2)+b(u-2)$$
Setting $u=2$, we get
$$4=4a\implies a=1$$
Setting $u=-2$, we get
$$4=-4b\implies b=-1$$
Thus,
$$\frac4{(u-2)(u+2)}=\frac1{u-2}-\frac1{u+2}$$
Alternatively, one may notice that
$$\begin{align}\frac4{(u-2)(u+2)}&=\frac{(u+2)-(u-2)}{(u-2)(u+2)}\\&=\frac{u+2}{(u-2)(u+2)}-\frac{u-2}{(u-2)(u+2)}\\&=\frac1{u-2}-\frac1{u+2}\end{align}$$