# What is the integral of (x^2 +2x-1)/(x^2+9)?

Mar 1, 2016

$= x + \ln \left({x}^{2} + 9\right) - \frac{10}{3} {\tan}^{-} 1 \left(\frac{x}{3}\right) + C$

#### Explanation:

First of all split the fraction up like so:

$\frac{{x}^{2} + 2 x - 1}{{x}^{2} + 9} = {x}^{2} / \left({x}^{2} + 9\right) + \frac{2 x}{{x}^{2} + 9} - \frac{1}{{x}^{2} + 9}$

We can now integrate each fraction one by one, i.e:

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

We will have to do a bit of rearranging of the first fraction (add and subtract 9):

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

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

This can now be rearranged like so:

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

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

-The first term obviously just integrates to $x$.

-For the second term we should apply: $\int \frac{f ' \left(x\right)}{f} \left(x\right) = \ln \left(f \left(x\right)\right) + C$

$\int \frac{2 x}{{x}^{2} + 9} \mathrm{dx} = \ln \left({x}^{2} + 9\right) + C$

-And for the third term:

$\int \frac{10}{{x}^{2} + 9} \mathrm{dx}$

Use the substitution $x = 3 \tan \left(u\right)$
$\to \mathrm{dx} = 3 {\sec}^{2} \left(u\right) \mathrm{du}$

We also need the trig identity: ${\tan}^{2} \left(x\right) + 1 = {\sec}^{2} \left(x\right)$ Putting the substitution in:

$10 \int \frac{3 {\sec}^{2} \left(u\right)}{9 {\tan}^{2} \left(u\right) + 9} \mathrm{du} = \frac{10}{3} \int {\sec}^{2} \frac{u}{\sec} ^ 2 \left(u\right) \mathrm{du}$

$= \frac{10}{3} \int \mathrm{du} = \frac{10}{3} u + C$

Reverse the substitution and we get:

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

So returning to our original integral if apply what have found we get that:

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

$= x + \ln \left({x}^{2} + 9\right) - \frac{10}{3} {\tan}^{-} 1 \left(\frac{x}{3}\right) + C$