# Thread: Trig sub intehral w/ completing the sq

1. ## Trig sub intehral w/ completing the sq

$\displaystyle \int \frac{dx}{(x^2+2x+2)^2}$
$\displaystyle u=x+1$ & $\displaystyle du=dx$
$\displaystyle \int \frac{du}{(u^2+1)^2}$

What should I do at this point? I considered expanding the square, but that seems to make things more messy and it seems like something else should be going on. It also didn't seem to lead me to an answer either. Thanks!

2. After you complete the square

let $\displaystyle x + 1 =tan(u)$

$\displaystyle dx = sec^2(u)~du$

$\displaystyle tan^2(u) + 1 = sec^2(u)$

so your integral looks like this

$\displaystyle \int \frac{sec^2(u)}{sec^4(u)}~du = \int \frac{1}{sec^2(u)}~du = \int cos^2(u)$

From here use half angle formula

$\displaystyle cos^2(u) = \frac{1+cos(2u)}{2}$

and you get

$\displaystyle \int \frac{1 + cos(2u)}{2}~du$

Now that should be an easier integral to evaluate and back substitute for u

3. $\displaystyle \int {\frac{1} {{\left( {x^2 + 2x + 2} \right)^2 }}} dx = \int {\frac{1} {{\left[ {\left( {x + 1} \right)^2 + 1} \right]^2 }}} \hfill \\$

$\displaystyle {\text{Let us substitute, }}x + 1 = \tan \theta \Rightarrow \theta = \tan ^{ - 1} \left( {x + 1} \right) \hfill \\$

$\displaystyle {\text{so that, }}xdx = \sec ^2 \theta d\theta \hfill \\$

$\displaystyle {\text{Also, }}\tan \theta = \frac{{x + 1}} {1} \Rightarrow \sin \theta = \frac{{x + 1}} {{\left( {x + 1} \right)^2 + 1}} = \frac{{x + 1}} {{x^2 + 2x + 2}} \hfill \\$

$\displaystyle {\text{and also, }} \Rightarrow \cos \theta = \frac{1} {{\left( {x + 1} \right)^2 + 1}} = \frac{1} {{x^2 + 2x + 2}} \hfill \\$

$\displaystyle {\text{Now see, }} = \int {\frac{1} {{\left( {\tan ^2 \theta + 1} \right)^2 }}} \sec ^2 \theta d\theta = \int {\frac{{\sec ^2 \theta }} {{\left( {\sec ^2 \theta } \right)^2 }}} d\theta \hfill \\$

$\displaystyle = \int {\cos ^2 \theta d\theta } \hfill \\$

$\displaystyle = \int {\frac{{1 + \cos 2\theta }} {2}} d\theta \hfill \\$

$\displaystyle = \frac{1} {2}\left( {\theta + \sin 2\theta } \right) + c \hfill \\$

$\displaystyle = \frac{1} {2}\left( {\theta + 2\sin \theta \cos \theta } \right) + c \hfill \\$

$\displaystyle = \frac{1} {2}\left[ {\tan ^{ - 1} \left( {x + 1} \right) + 2\left( {\frac{{x + 1}} {{x^2 + 2x + 2}}} \right)\left( {\frac{1} {{x^2 + 2x + 2}}} \right)} \right] + c \hfill \\$

$\displaystyle = \frac{1} {2}\tan ^{ - 1} \left( {x + 1} \right) + \frac{{\left( {x + 1} \right)}} {{\left( {x^2 + 2x + 2} \right)^2 }} + c \hfill \\$

4. I was wondering why your answer differed slightly from my books answer and I found the problem here...

Originally Posted by Shyam
$\displaystyle = \int {\frac{{1 + \cos 2\theta }} {2}} d\theta \hfill \\$

$\displaystyle = \frac{1} {2}\left( {\theta + \sin 2\theta } \right) + c \hfill \\$
However, I believe that if $\displaystyle dv=\cos 2\theta d\theta$ then $\displaystyle v=\tfrac{1}{2}\sin 2\theta$.
This will make the final answer: $\displaystyle = \frac{1} {2} \left[\tan ^{ - 1} \left( {x + 1} \right) + \frac{{\left( {x + 1} \right)}} {{\left( {x^2 + 2x + 2} \right)^2 }}\right] + c \hfill \\$

I also don't understand how you did this step, could you go into more detail please?:

Originally Posted by Shyam
$\displaystyle {\text{Also, }}\tan \theta = \frac{{x + 1}} {1} \Rightarrow \sin \theta = \frac{{x + 1}} {{\left( {x + 1} \right)^2 + 1}} = \frac{{x + 1}} {{x^2 + 2x + 2}} \hfill \\$

$\displaystyle {\text{and also, }} \Rightarrow \cos \theta = \frac{1} {{\left( {x + 1} \right)^2 + 1}} = \frac{1} {{x^2 + 2x + 2}} \hfill \\$

5. $\displaystyle \int \frac{1 + cos(2\theta)}{2}~d\theta$

$\displaystyle \int \frac{d\theta}{2}~+~\int\frac{cos(2\theta) d\theta}{2}$

Now so you can see this more clearly lets make some substitiutions for the second intergal

$\displaystyle u = 2\theta$

$\displaystyle d\theta = \frac{du}{2}$

$\displaystyle \int\frac{cos(2\theta) d\theta}{2} = \frac{1}{4}\int cos(u)du = \frac{sin(u)}{4}$

Now back substitute for u

so this is what you should get

$\displaystyle \frac{\theta}{2} +\frac{sin2\theta}{4} + C$

now you have to back substitute for the other substituion used

Also using the identity

$\displaystyle sin(2\theta) =2sin\theta cos\theta$

Ok to find out what $\displaystyle \theta$ is you have to remember that we substituted

$\displaystyle x+1 = tan\theta$

so to find $\displaystyle \theta$ you use arctan

$\displaystyle arctan(x+1) = \theta$

now to find out what $\displaystyle sin\theta~\text{and}~cos\theta$ are you need to know

$\displaystyle tan\theta = \frac{\text{opposite}}{\text{adjacent}}$

$\displaystyle sin\theta = \frac{\text{opposite}}{\text{hypotenuse}}$

$\displaystyle cos\theta = \frac{\text{adjacent}}{\text{hypotenuse}}$

You can figure these out because you are given

$\displaystyle tan\theta = \frac{x+1}{1}$

so all you have to do is find out what the hypotenuse is since you are already given the opposite and adjacent

$\displaystyle H^2 = (x+1)^2 +1^2$

$\displaystyle H = \sqrt{x^2 + 2x +2}$

So after alot of typing lol your final integral should look like this

$\displaystyle \frac{arctan(x+1)}{2} + \frac{x+1}{2x^2+4x+4} + C$

6. Right, 11rdc11. I was getting fouled up because Shyam had not integrated $\displaystyle \int \frac{1 + cos(2\theta)}{2}~d\theta$ correctly and it took me a bit to catch this.
Also, the values he put for $\displaystyle \sin\theta$ and $\displaystyle \cos\theta$ should have included sqrt in the denominator.

In the end, I can only say that it helped me hone some of my math skills

But, thanks to both of you for the help! I finally figured it out!

Final answer: $\displaystyle \frac{1}{2} \left[ \tan^{-1}{(x+1)} + \frac{x+1}{x^2+2x+2}\right] + C$