# How do find int (x^2) /( x^2 + 4) dx  ?

Jan 7, 2018

$x - 2 {\tan}^{- 1} \left(\frac{x}{2}\right) + C$

#### Explanation:

$\int {x}^{2} / \left({x}^{2} + 4\right) \mathrm{dx}$

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

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

$= \int 1 - \frac{4}{{x}^{2} + 4} \mathrm{dx} = \int \mathrm{dx} - \int \frac{4}{{x}^{2} + 4} \mathrm{dx}$

For the second integral substitute: $2 \tan \left(u\right) = x$
$\to 2 {\sec}^{2} \left(u\right) \mathrm{du} = \mathrm{dx}$

$= \int \mathrm{dx} - 4 \int \frac{2 {\sec}^{2} \left(u\right)}{4 {\tan}^{2} \left(u\right) + 4} \mathrm{du}$

$= \int \mathrm{dx} - 2 \int \frac{{\sec}^{2} \left(u\right)}{{\tan}^{2} \left(u\right) + 1} \mathrm{du}$

Now: ${\sin}^{2} \left(u\right) + {\cos}^{2} \left(u\right) = 1$

Divide by ${\cos}^{2} \left(u\right)$ to get:

$\to {\sin}^{2} \frac{u}{\cos} ^ 2 \left(u\right) + {\cos}^{2} \frac{u}{\cos} ^ 2 \left(u\right) = \frac{1}{\cos} ^ 2 \left(u\right)$

$\to {\tan}^{2} \left(u\right) + 1 = {\sec}^{2} \left(u\right)$

We can simplify our integral to:

$\int \mathrm{dx} - 2 \int {\sec}^{2} \frac{u}{\sec} ^ 2 \left(u\right) \mathrm{du}$

$= \int \mathrm{dx} - 2 \int \mathrm{du} = x - 2 u + C$

Reverse the substitution for $u$ to get:

$x - 2 {\tan}^{- 1} \left(\frac{x}{2}\right) + C$

Edit: Of course if you knew the integral at the step before I did the substitution, i.e. that:

$\int \frac{1}{{x}^{2} + {a}^{2}} \mathrm{dx} = \frac{1}{a} {\tan}^{- 1} \left(\frac{x}{a}\right)$

then you can just integrate directly rather than using substitution.