# Rational integral

• January 1st 2011, 08:34 PM
Krizalid
Rational integral
Solve $\displaystyle\int\frac{2x^3+3x^2+x-1}{(x+1)(x^2+2x+2)^2}\,dx$ by not using partial fractions.

I liked this particular integral, I solved it on another forum to show that sometimes we can avoid the annoying algebra when doing the partial fractions.
• January 1st 2011, 11:50 PM
simplependulum
$\displaystyle \int \frac{2x^3 + 3x^2 + x - 1 }{(x+1)(x^2 + 2x+2)^2} ~dx$

$\displaystyle =\int \frac{(x+1)(2x^2 + x ) - 1 }{(x+1)(x^2 + 2x+2)^2} ~dx$

$\displaystyle = \int \frac{(x+1)(2x^2 + 2x+1 ) - ((x+1)^2 + 1) }{(x+1)(x^2 + 2x+2)^2} ~dx$

$\displaystyle = \int \frac{ 2x^2 + 2x + 1 }{ (x^2 + 2x + 2 )^2 } ~dx - \int \frac{dx}{(x+1)(x^2 + 2x + 2 ) }$

$\displaystyle = \int \frac{ (x^2 + 2x + 2 ) + (x^2 - 1) }{ (x^2 + 2x + 2 )^2 } ~dx - \int \frac{dx}{(x+1)(x^2 + 2x + 2 ) }$

$\displaystyle = \int \frac{ dx}{ x^2 + 2x + 2 } + \int \frac{(x-1)(x+1)}{(x+1)(x^2 + 2x + 2 )^2 } ~dx - \int \frac{dx}{(x+1)(x^2 + 2x + 2 ) }$

Sub. $\displaystyle x+1 = 1/t$ on the third integral , we have

$\displaystyle \int \frac{dx}{(x+1)(x^2 + 2x + 2 ) } = - \int \frac{t~dt}{t^2 + 1 }$

$= - \frac{1}{2} \ln(t^2+ 1 ) + C = \ln|1+x| - \frac{1}{2} \ln(x^2 + 2x + 2) + C$

For the second integral , use integration by parts ,

$\displaystyle \int \frac{(x-1)(x+1)}{ (x^2 + 2x + 2 )^2 } ~dx$

$\displaystyle = - \frac{1}{2} ~ \frac{x-1}{x^2+2x+2} + \frac{1}{2}~\int \frac{dx}{x^2 + 2x + 2 }$

Therefore ,

$\displaystyle \int \frac{2x^3 + 3x^2 + x - 1 }{(x+1)(x^2 + 2x+2)^2} ~dx$

$\displaystyle = \frac{3}{2}~ \int \frac{ dx}{ x^2 + 2x + 2 } - \frac{1}{2} ~ \frac{x-1}{x^2+2x+2} - \ln|1+x| + \frac{1}{2} \ln(x^2 + 2x + 2) + C'$

$\displaystyle = \frac{3}{2} \tan^{-1}(x+1) - \frac{1}{2} ~ \frac{x-1}{x^2+2x+2} - \ln|1+x| + \frac{1}{2} \ln(x^2 + 2x + 2) + C'$
• January 2nd 2011, 06:05 AM
TheCoffeeMachine
I observe that:

$2x^3+3x^2+x-1 = (x+1)(x^2+2x+2)-(x^2+2x+2)+(x-1) (x+1)^2$

So we have:

\begin{aligned} \displaystyle\int\frac{2x^3+3x^2+x-1}{(x+1)(x^2+2x+2)^2}\;dx &=\int\frac{(x+1)(x^2+2x+2)-(x^2+2x+2)+(x-1) (x+1)^2}{(x+1)(x^2+2x+2)^2}\;dx \\ & = \int \frac{1}{x^2+2x+2}-\frac{1}{(x+1)(x^2+2x+2)}+\frac{x^2-1}{(x^2+2x+2)^2}\;{dx} \\ & = \int \frac{1}{(x+1)^2+1} \;{dx}-\int\frac{(x^2+2x+2)-(x+1)^2}{(x+1)(x^2+2x+2)}\;{dx}+\int \frac{x^2-1}{(x^2+2x+2)^2}\;{dx} \\ & = \arctan(x+1)-\int\frac{1}{x+1}\;{dx}+\int\frac{(x+1)}{(x+1)^2+1 }\;{dx}+\int \frac{x^2-1}{(x^2+2x+2)^2}\;{dx} \\ & = \arctan(x+1)-\ln(x+1)+\frac{1}{2}\int\frac{2x+2}{x^2+2x+2}\;{dx }+\int \frac{x^2-1}{(x^2+2x+2)^2}\;{dx}} \\ & = \arctan(x+1)-\ln(x+1)+\frac{1}{2}\ln(x^2+2x+2)+\int \frac{x^2-1}{(x^2+2x+2)^2}\;{dx} \\ & \end{aligned}

Where for the last integral we use the substitution $t = (x+1)$ to get:

\begin{aligned} \int \frac{x^2-1}{(x^2+2x+2)^2}\;{dx} & = \int\frac{(x+1)(x-1)}{[(x+1)^2+1]^2}\;{dx} = \int\frac{t^2-2t}{(t^2+1)^2}\;{dt}\\& = \int\frac{t^2}{(t^2+1)^2}\;{dt}-\int\frac{2t}{(t^2+1)^2}\;{dt}\\& = \frac{1}{t^2+1}+\int\frac{t^2}{(t^2+1)^2}\;{dt}\\& \end{aligned}

Letting $t = \tan{u}$ in the remaining integral we have:

\begin{aligned} \int\frac{t^2}{(t^2+1)^2}\;{dt} & = \int\frac{\tan^2{u}\sec^2{u}}{\sec^4{u}}\;{du} = \int \sin^2{u}\;{du} = \frac{1}{2}\;{u}-\frac{1}{4}\sin{2u}+k \\& = \frac{1}{2}\arctan{t}-\frac{1}{4}\sin\left(2\arctan{t}\right)+k = \frac{1}{2}\arctan{t}-\frac{t}{2(t^2+1)}+k \\& = \frac{1}{2}\arctan(x+1)-\frac{x+1}{2(x^2+2x+2)}+k \end{aligned}

Thus

$\displaystyle\int\frac{2x^3+3x^2+x-1}{(x+1)(x^2+2x+2)^2}\;dx$ $\displaystyle = \frac{3}{2}\arctan(x+1)+\ln\left|\frac{1}{x+1}\rig ht|+\frac{1}{2}\ln\left|(x+1)^2+1\right|$ $\displaystyle -\frac{1}{2}\left(\frac{x+1}{(x+1)^2+1}\right)+\lef t(\frac{1}{(x+1)^2+1}\right)+k$
• January 2nd 2011, 08:50 AM
Krizalid
good! pretty different solutions from the one i have:

consider $\displaystyle\int{\frac{{{t}^{2}}}{{{\left( {{t}^{2}}+1 \right)}^{2}}}\,dt}=\int{t\left( -\frac{1}{2\left( {{t}^{2}}+1 \right)} \right)'\,dt}=-\frac{t}{2\left( {{t}^{2}}+1 \right)}+\frac12\int{\frac{dt}{{{t}^{2}}+1}},$ (1); now from $\displaystyle\int\frac{dt}{t(t^2+1)^2}$ put $u=\dfrac1{t^2}+1$ and the integral becomes $\displaystyle-\frac12\int\frac{u-1}{u^2}\,du,$ (2).

on the original integral put $t=x+1$ then

\begin{aligned}
\int{\frac{2{{x}^{3}}+3{{x}^{2}}+x-1}{(x+1){{\left( {{x}^{2}}+2x+2 \right)}^{2}}}\,dx}&=\int{\frac{2{{x}^{3}}+3{{x}^{ 2}}+x-1}{(x+1){{\left( {{(x+1)}^{2}}+1 \right)}^{2}}}\,dx} \\
& =\int{\frac{2{{t}^{3}}-3{{t}^{2}}+t-1}{t{{\left( {{t}^{2}}+1 \right)}^{2}}}\,dt} \\
& =\int{\frac{{{t}^{2}}}{{{\left( {{t}^{2}}+1 \right)}^{2}}}\,dt}-3\int{\frac{t}{{{\left( {{t}^{2}}+1 \right)}^{2}}}\,dt}+\int{\frac{dt}{{{t}^{2}}+1}}-\int{\frac{dt}{t{{\left( {{t}^{2}}+1 \right)}^{2}}}},
\end{aligned}

from (1) and (2) the latter equals

$\displaystyle-\frac{t}{2\left( {{t}^{2}}+1 \right)}+\frac32\arctan (t)+\frac{3}{2\left( {{t}^{2}}+1 \right)}+\frac{1}{2}\left[ \ln \left(\frac{{{t}^{2}}+1}{{{t}^{2}}}\right)+\frac{{ {t}^{2}}}{{{t}^{2}}+1} \right]+k,$

and the original integral equals

$\displaystyle-\frac{x+1}{2\left( {{(x+1)}^{2}}+1 \right)}+\frac{3}{2}\arctan (x+1)+\frac{3}{2\left( {{(x+1)}^{2}}+1 \right)}+\frac{1}{2}\left[ \ln \left( \frac{{{(x+1)}^{2}}+1}{{{(x+1)}^{2}}} \right)+\frac{{{(x+1)}^{2}}}{{{(x+1)}^{2}}+1} \right]+k.$
• January 3rd 2011, 08:23 AM
Jester
What about letting $x + 1 = \tan \theta$ right away. The integral becomes

$\displaystyle \int \dfrac{2 \tan^3 \theta - 3 \tan^2 \theta + \tan \theta - 1}{\tan \theta \sec^2 \theta} d \theta$

or

$\displaystyle \int 2 \sin^2 \theta - 3 \sin \theta \cos \theta + \cos^2 \theta - \frac{\cos^3 \theta }{\sin \theta }\; d \theta$

or

$\displaystyle \int \frac{3}{2} - \frac{1}{2} \cos 2 \theta - 2 \sin \theta \cos \theta - \dfrac{\cos \theta}{\sin \theta} \; d \theta$

Integrating gives

$\frac{3}{2} \theta - \frac{1}{4} \sin 2 \theta - \sin^2 \theta - \ln \sin \theta + c$

Then backsubstitute noting that

$\theta = \tan^{-1}(x+1),\;\; \sin \theta = \dfrac{x+1}{\sqrt{x^2+2x+2}},\;\; \cos \theta = \dfrac{1}{\sqrt{x^2+2x+2}}.$