Integral of $\frac{x^2}{x^2-4}$ How would I integrate the following:
$$\int \frac{x^2}{x^2-4}\ dx$$
We have covered three techniques for integration: substitution, integration by parts and partial fractions. I have tried partial fractions by writing:
\begin{align}
\frac{x^2}{x^2-4}&=\frac{A}{x-2}+\frac{B}{x+2} \\[6pt]
x^2&=A(x+2)+B(x-2)
\end{align}
And solving for $A$ and $B$, but I don't know how to deal with the $x^2$. Substitution doesn't seem to work either as I would be left with an $x$ if I substituted $u=x^2-4$.
This came up on an old exam paper that I was doing to prepare for my upcoming exam.

$$\frac{x^2}{x^2-4}=1+\frac{1}{x-2}-\frac{1}{x+2}$$
$$\int \frac{x^2}{x^2-4} dx=x+\ln{(x-2)}-\ln{(x+2)}+C$$
