# What is int (x^3-2x^2+6x+9 ) / (2x^2- x +3 )?

Jun 6, 2017

$\setminus \int \frac{{x}^{3} - 2 {x}^{2} + 6 x + 9}{2 {x}^{2} - x + 3} \text{d} x = \frac{1}{4} \left(2 {x}^{2} - 3 x\right) + \frac{3}{16} \ln \left\mid 2 {x}^{2} - x + 3 \right\mid + \frac{78}{16 \sqrt{23}} \arctan \left(\frac{4 x + 1}{\sqrt{23}}\right) + C$.

#### Explanation:

$\frac{{x}^{3} - 2 {x}^{2} + 6 x + 9}{2 {x}^{2} - x + 3}$.

The quadratic on the denominator is an irreducible quadratic. Then, we can perform a partial fraction decomposition to write this quotient in the form

$A x + B + \frac{C x + D}{2 {x}^{2} - x + 3}$.

Simplifying this fraction gives

$\frac{2 A {x}^{3} - A {x}^{2} + 3 A x + 2 B {x}^{2} - B x + 3 B + C x + D}{2 {x}^{2} - x + 3}$,
$\frac{2 A {x}^{3} + \left(2 B - A\right) {x}^{2} + \left(C + 3 A - B\right) x + \left(D + 3 B\right)}{2 {x}^{2} - x + 3}$.

By equating coeffecients,

$A = \frac{1}{2}$,
$2 B - \frac{1}{2} = - 2 \setminus \implies B = - \frac{3}{4}$
$C + \frac{3}{2} + \frac{3}{4} = 6 \setminus \implies C = \frac{15}{4}$
$D + 3 B = 9 \setminus \implies D = \frac{45}{4}$.

Then

$\frac{{x}^{3} - 2 {x}^{2} + 6 x + 9}{2 {x}^{2} - x + 3} = \frac{1}{4} \left(2 x - 3 + \frac{15 x + 45}{2 {x}^{2} - x + 3}\right)$.
$\setminus \int \frac{{x}^{3} - 2 {x}^{2} + 6 x + 9}{2 {x}^{2} - x + 3} \text{d"x = 1/4 \int 2x-3 "d"x + 3/4 \int (x+3)/(2x^2-x+3) "d} x$
$\setminus \int \frac{{x}^{3} - 2 {x}^{2} + 6 x + 9}{2 {x}^{2} - x + 3} \text{d"x = 1/4 (2x^2-3x) + 3/4 \int (x+3)/(2x^2-x+3) "d} x$

We are then left with another integral to evaluate, $\setminus \int \frac{x + 3}{2 {x}^{2} - x + 3} \text{d} x$.

An important general integral result (especially when dealing with rational functions) is that,

\int (("f"'(x))/("f"(x))) "d"x = lnabs("f"(x))+C.

If we say $\text{f} \left(x\right) = 2 {x}^{2} - x + 3$, $\text{f} ' \left(x\right) = 4 x - 1$. If we make our numerator look like this, we will reduce the integral further.

We can say,

$\setminus \int \frac{x + 3}{2 {x}^{2} - x + 3} \text{d"x = 1/4 \int (4x-1+13)/(2x^2-x+3) "d} x$,
$\setminus \int \frac{x + 3}{2 {x}^{2} - x + 3} \text{d"x = 1/4 \int (4x-1)/(2x^2-x+3) "d} x + \frac{13}{4} \setminus \int \frac{1}{2 {x}^{2} - x + 3}$,
$\setminus \int \frac{x + 3}{2 {x}^{2} - x + 3} \text{d} x = \frac{1}{4} \ln \left\mid 2 {x}^{2} - x + 3 \right\mid + \frac{13}{4} \setminus \int \frac{1}{2 {x}^{2} - x + 3}$.

Then, substituting,

$\setminus \int \frac{{x}^{3} - 2 {x}^{2} + 6 x + 9}{2 {x}^{2} - x + 3} \text{d"x = 1/4 (2x^2-3x) + 3/16 lnabs(2x^2-x+3) + 39/16 \int 1/(2x^2-x+3) "d} x$.

Then we are left with one last integral to evaluate. As the quadratic on the denominator is irreducible (no real factors), this is an arctangent integral, so we will complete the square in order to solve it.

$2 {x}^{2} - x - 3 = 2 \left({\left(x - \frac{1}{4}\right)}^{2} + \frac{23}{16}\right)$,
$2 {x}^{2} - x - 3 = 2 {\left(x - \frac{1}{4}\right)}^{2} + \frac{23}{8}$,
$2 {x}^{3} - x - 3 = \frac{1}{8} \cdot \left(16 {\left(x - \frac{1}{4}\right)}^{2} + 23\right)$,
$2 {x}^{3} - x - 3 = \frac{1}{8} \cdot \left({\left(4 x - 1\right)}^{2} + 23\right)$.

Then $\int \frac{1}{2 {x}^{2} - x + 3} \text{d"x = \int (8)/((4x-1)^2+23) "d} x$.

It is a general result that,

$\setminus \int \frac{1}{{x}^{2} + {a}^{2}} = \frac{1}{a} \arctan \left(\frac{x}{a}\right) + C$.

In our case, $a = \sqrt{23}$.

Utilising this result and the inverse chain rule gives,

$\setminus \int \frac{8}{{\left(4 x - 1\right)}^{2} + 23} \text{d} x = 8 \cdot \frac{\frac{1}{\sqrt{23}} \cdot \arctan \left(\frac{4 x + 1}{\sqrt{23}}\right)}{4} + C$,
$\setminus \int \frac{8}{{\left(4 x - 1\right)}^{2} + 23} \text{d} x = \frac{2}{\sqrt{23}} \cdot \arctan \left(\frac{4 x + 1}{\sqrt{23}}\right) + C$.

...finally,

$\setminus \int \frac{{x}^{3} - 2 {x}^{2} + 6 x + 9}{2 {x}^{2} - x + 3} \text{d} x = \frac{1}{4} \left(2 {x}^{2} - 3 x\right) + \frac{3}{16} \ln \left\mid 2 {x}^{2} - x + 3 \right\mid + \frac{78}{16 \sqrt{23}} \arctan \left(\frac{4 x + 1}{\sqrt{23}}\right) + C$.