# 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.

• No. Do the division first, so that you're left with a remainder where the degree upstairs is less than the degree downstairs. – David Mitra Jun 15 '14 at 13:03
• I.e, ${x^2\over x^2-4}= 1+{4\over x^2-4}$. – David Mitra Jun 15 '14 at 13:05
• Is there a good resource online to learn polynomial division? I've never learnt it. – Aapeli Jun 15 '14 at 13:21
• This seems as good as any. (Though, you can use the "trick" in حكيم الفيلسوف الضائع's answer.) – David Mitra Jun 15 '14 at 13:22

By division, $$\dfrac{x^2}{x^2 - 4} = 1 + \frac{4}{x^2 - 4}$$
You can do partial fractions on the latter, or else use the substitution $$x = 2 \sec \theta \implies dx = 2\sec \theta \tan \theta \,d\theta$$ in the second integral, and recall that $\sec^2\theta - 1 = \tan^2 \theta$
The first thing you can do is to note that: $$\dfrac{x^2}{x^2-4}=\dfrac{x^2-4+4}{x^2-4}=\require{cancel}\cancelto{1}{\dfrac{x^2-4}{x^2-4}}+\dfrac4{x^2-4}.$$ So the remaining part is to decompose the left fraction to get: $$\dfrac{4}{x^2-4}=-\dfrac1{x+2}+\dfrac1{x-2}.$$ The rest is straightforward.
Use $\frac{x^2-4+4}{x^2-4}$ and then partial fractions.
$$\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$$