# `int (x^4 + x - 4)/(x^2 + 2) dx` Find the indefinite integral.

In Substitution Rule, we follow` int f(g(x))g'(x) dx = int f(u) du ` where  we let `u = g(x)` .

Before we use this, we look for possible way to simplify the function using math operation or algebraic techniques.

For the problem: `int (x^4+x-4)/(x^2+2) dx` ,we expand first using long division.

`(x^4+x-4)/(x^2+2) = x^2-2+x/(x^2+2)`

Applying `int (f(x) +- g(x))dx = int f(x) dx +- intg(x)dx :`

` `

We get` int x^2 dx - int 2 dx + int x/(x^2+2) dx.`

`int x^2 dx = x^3/3`

`int 2 dx =2x`

`int x/(x^2+2) dx = 1/2 ln|x^2+2|`

We use u-substitution on int `x/(x^2+2) dx ` by letting `u = x^2 +2`

then` du = 2x *dx` rearrange into` x* dx= (du)/2`

Substituting  u =x^2+2  and x * dx = (du)/2, the integral becomes:

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

` = 1/2 int (du)/u`

`= 1/2 ln|u|`

Substitute `u=x^2+2 `  then `int 1/2 ln|u| = 1/2ln |x^2+2|`

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

Approved by eNotes Editorial Team