# `int (x^2+5) / (x^3-x^2+x+3) dx` Use partial fractions to find the indefinite integral

Indefinite integral are written in the form of `int f(x) dx = F(x) +C`

where:` f(x) ` as the integrand

`F(x)` as the anti-derivative function

`C`  as the arbitrary constant known as constant of integration

To determine the indefinite integral of `int (x^2+5)/(x^3-x^2+x+3) dx` , we apply partial fraction decomposition to expand the integrand: `f(x)=(x^2+5)/(x^3-x^2+x+3)`

The pattern on setting up partial fractions will depend on the factors  of the  denominator. The factored form of `x^3-x^2+x+3 =(x+1)(x^2-2x+3)` .

For the linear factor `(x+1)` , we will have partial fraction: `A/(x+1)` .

For the quadratic factor `(x^2-2x+3)` , we will have partial fraction: `(Bx+C)/(x^2-2x+3)` .

The integrand becomes:

`(x^2+5)/(x^3-x^2+x+3) =A/(x+1)+(Bx+C)/(x^2-2x+3)`

Multiply both side by the `LCD =(x+1)(x^2-2x+3)` .

`((x^2+5)/(x^3-x^2+x+3) )*(x+1)(x^2-2x+3)=(A/(x+1)+(Bx+C)/(x^2-2x+3))*(x+1)(x^2-2x+3)`

`x^2+5=A(x^2-2x+3)+(Bx+C)(x+1)`

We apply zero-factor property on `(x+1)(x^2-2x+3)` to solve for values we can assign on x.

`x+1 =0` then `x=-1`

`x^2-2x+3=0 then x=1+-sqrt(2)i`

To solve for `A` , we plug-in `x=-1` :

`(-1)^2+5=A((-1)^2-2*(-1)+3)+(B*(-1)+C)(-1+1)`

`1+5=A(1+2+3)+(-B+C)*0`

`6 = 6A`

`6/6= (6A)/6`

`A=1`

To solve for `C` , plug-in `A=1 `  and `x=0` so that `B*x` becomes `0` :

`0^2+5=1(0^2-2*0+3)+(B*0+C)(0+1)`

`0+5=1(0-0+3)+ (0+C)(1)`

`5 = 3 +C`

`C= 5-3`

`C =2` .

To solve for `B` , plug-in `A=1` , `C=2` , and `x=1` :

`1^2+5=1(1^2-2*1+3)+(B*1+2)(1+1)`

`1+5 = 1 (1-2+3)+(B+2)(2)`

`6 = 2 +2B+4`

`2B = 6-2-4`

`2B=0`

`(2B)/2 = 0/2`

`B =0`

Plug-in `A = 1` , `B =0` , and `C=2` , we get the partial fraction decomposition:

`(x^2+5)/(x^3-x^2+x+3) =1/(x+1)+(0x+2)/(x^2-2x+3)`

` =1/(x+1)+2/(x^2-2x+3)`

The integral becomes:

`int(x^2+5)/(x^3-x^2+x+3) dx = int [1/(x+1)+2/(x^2-2x+3)] dx`

Apply the basic integration property: `int (u+v) dx = int (u) dx + int (v) dx`

`int [1/(x+1)+2/(x^2-2x+3)] dx =int 1/(x+1)dx +int 2/(x^2-2x+3)dx`

For the first integral, we apply integration formula for logarithm:` int 1/u du = ln|u|+C` .

Let `u =x+1` then `du = dx`

`int 1/(x+1) dx =int 1/u du`

`= ln|u|`

`= ln|x+1|`

Apply indefinite integration formula for rational function:

`int 1/(ax^2+bx+c) dx = 2/sqrt(4ac-b^2)arctan((2ax+b)/sqrt(4ac-b^2)) +C`

By comparing "`ax^2 +bx +c` " with "`x^2-2x+3` ", we determine the corresponding values: `a=1` , `b=-2` , and `c=3` .

The second integral becomes:

`int 2/(x^2-2x+3)dx= 2int 1/(x^2-2x+3)dx`

`=2*[2/sqrt(4*1*3-(-2)^2)arctan((2*1x+(-2))/sqrt(4*1*3-(-2)^2))]`

`=2*[2/sqrt(12-4)arctan((2x-2)/sqrt(12-4))]`

`=2*[2/sqrt(8)arctan((2x-2)/sqrt(8))]`

`=2*[2/(2sqrt(2))arctan((2(x-1))/(2sqrt(2)))]`

`=2/sqrt(2)arctan((x-1)/sqrt(2)) `

`=(2arctan((x-1)/sqrt(2))) /sqrt(2)`

Combining the results, we get the indefinite integral as:

`int (x^2+5)/(x^3-x^2+x+3) dx =ln|x+1|+(2arctan((x-1)/sqrt(2))) /sqrt(2)+C`

`=ln|x+1|+ sqrt(2)arctan((sqrt(2)(x-1))/2) +C`

`=ln|x+1|+ sqrt(2)arctan((xsqrt(2)-sqrt(2))/2) +C`

Approved by eNotes Editorial Team