# Integral; How is this step done?

I've been attempting several other integrals and have a hit a massive wall in terms of this question:

$$\int\frac{x^2}{x^2-4}dx$$

I tried looking into substitutions to perform but couldn't find any useful ones on my own, so after consulting an online calculator, the following method was used:

How is this performed? I cannot understand how "adding 0" in the numerator yields the fraction $\int(\frac{4}{x^2-4}+1)dx$. Can anyone help shed light on this? I feel like it's very basic, but I haven't a clue how it was done :S

• $\frac {x^2-4+4}{x^2-4}=\frac {x^2-4}{x^2-4}+\frac 4{x^2-4}$. – lulu Jun 20 '17 at 11:30
• Ah, so it was a simple algebra thing, thank you so very much for stepping it out :D – Pixel Rain Jun 20 '17 at 11:32
• @PixelRain Did you try going in the other direction, adding $1$ and $4/(x^2 - 4)$ and seeing what you got? – user49640 Jun 20 '17 at 11:33
• You can also do this by long-division of polynomials. In general, when you have an improper rational expression, you should re-write it as a polynomial plus a proper rational expression. – B. Goddard Jun 20 '17 at 11:34
• You often want to build a "copy" of some multiple of the denominator in the numerator by adding and subtracting the same term(s), so the copy can divide out later. So $$\frac{x^2}{\boxed{x^2-4}}=\frac{\boxed{x^2-4} + 4}{x^2-4}=\frac{x^2-4}{x^2-4}+\frac{4}{x^2-4} = 1+\frac{4}{x^2-4}$$ – MPW Jun 20 '17 at 11:46

Alternatively, consider the general way of adding fractions together $$\frac{a}{b}+\frac{c}{d} = \frac{ad+bc}{db}\, \qquad (b, d) \neq 0$$
Follow steps $$\int \frac { x^{ 2 } }{ x^{ 2 }-4 } dx=\int \frac { x^{ 2 }-4+4 }{ x^{ 2 }-4 } dx=\int \left( \frac { x^{ 2 }-4 }{ x^{ 2 }-4 } +\frac { 4 }{ x^{ 2 }-4 } \right) dx=\\ =\int { \left( 1+\frac { 4 }{ x^{ 2 }-4 } \right) dx= } \int { dx } +4\int { \frac { dx }{ { x }^{ 2 }-4 } }$$
HINT: $$\frac{x^2}{x^2-4}=\frac{x^2-4+4}{x^2-4}=1+\frac{4}{x^2-4}=1+\frac{4}{(x-2)(x+2)}$$
• Why don't you continue by writing that last $4$ in the numerator in the form $$4=(x+2)-(x-2)?$$ – Jyrki Lahtonen Jun 20 '17 at 11:59
• or $$\frac{4}{x^2-4}=\frac{A}{x-4}+\frac{B}{x+4}$$ – Dr. Sonnhard Graubner Jun 20 '17 at 12:02