# Integration by parts

• Aug 18th 2010, 04:58 PM
exothesis
Integration by parts
I'm trying to integrate this function using integration by parts, but I get stuck after a while.

The function is

$\displaystyle \int sin^2(\theta) d\theta$

I start by using the formula $\displaystyle \int f g' dx = fg-\int g f'dx$

So taking $\displaystyle f = g' = sin(\theta)$, then $\displaystyle f' = cos(\theta), g = -cos(\theta)$

$\displaystyle \int f g' dx = fg-\int g f'dx$

$\displaystyle = -cos(\theta)sin(\theta) -\int -cos(\theta)cos(\theta) d\theta$

Now what do I do?
• Aug 18th 2010, 05:05 PM
Prove It
No need for integration by parts, use trigonometric identities.

$\displaystyle \int{\sin^2{\theta}\,d\theta} = \int{\frac{1}{2} - \frac{1}{2}\cos{2\theta}\,d\theta}$

$\displaystyle = \frac{1}{2}\theta - \frac{1}{4}\sin{2\theta} + C$.
• Aug 18th 2010, 05:10 PM
exothesis
The question states to use integration by parts, I assume there would be a way?
• Aug 18th 2010, 05:30 PM
pickslides
You may need to integrate by parts twice here.

$\displaystyle \displaystyle \int \sin^2 \theta~d\theta = \int \sin \theta\times \sin \theta~d\theta$

$\displaystyle \displaystyle du = \sin \theta\implies u = -\cos\theta$ and $\displaystyle \displaystyle v = \sin \theta\implies dv = \cos\theta$

Now $\displaystyle \displaystyle \int du \times v = uv -\int dv \times u$

What do you get?
• Aug 20th 2010, 04:19 AM
HallsofIvy
Quote:

Originally Posted by exothesis
I'm trying to integrate this function using integration by parts, but I get stuck after a while.

The function is

$\displaystyle \int sin^2(\theta) d\theta$

I start by using the formula $\displaystyle \int f g' dx = fg-\int g f'dx$

So taking $\displaystyle f = g' = sin(\theta)$, then $\displaystyle f' = cos(\theta), g = -cos(\theta)$

$\displaystyle \int f g' dx = fg-\int g f'dx$

$\displaystyle = -cos(\theta)sin(\theta) -\int -cos(\theta)cos(\theta) d\theta$

Now what do I do?

So you have $\displaystyle \int sin^2(\theta) d\theta= -cos(\theta)sin(\theta)+ \int cos^2(\theta) d\theta$

Now do it again: integrate $\displaystyle \int cos^2(\theta)d\theta)$ by parts, taking $\displaystyle u= cos(\theta)$, $\displaystyle dv= cos(\theta)d\theta$.

You may get a $\displaystyle \int sin^2(\theta)d\theta)$ again but now you can solve the equation for $\displaystyle \int sin^2(\theta)d\theta$.
• Aug 22nd 2010, 09:30 PM
exothesis
I end up with 0? I don't think I'm doing it right. This is what I do:
$\displaystyle \int cos^2(\theta)d\theta = cos(\theta)sin(\theta)+ \int sin^2(\theta) d\theta$

But then all together that means:
$\displaystyle \int sin^2(\theta) d\theta= -cos(\theta)sin(\theta)+ cos(\theta)sin(\theta)+ \int sin^2(\theta) d\theta = 0$

What am I doing wrong here? My CAS calculator says the answer should be
$\displaystyle \frac{x}{2} - \frac{sin\theta cos\theta}{2}$
• Aug 22nd 2010, 10:18 PM
BayernMunich
Solving this one with integration by parts is a time's wasting.

Use this:

$\displaystyle sin^2(\theta)=\dfrac{1-cos(2\theta)}{2}$
• Aug 23rd 2010, 02:30 AM
Defunkt
Quote:

Originally Posted by BayernMunich
Solving this one with integration by parts is a time's wasting.

Use this:

$\displaystyle sin^2(\theta)=\dfrac{1-cos(2\theta)}{2}$

Quote:

Originally Posted by exothesis
The question states to use integration by parts, I assume there would be a way?

.
• Aug 23rd 2010, 02:46 AM
tom@ballooncalculus
http://www.ballooncalculus.org/forum...lllpartslllone

Ok, it's a video, but my link is to a .wmv file and I need to do it differently, clearly. Will fix. (Edit: fixed, but you have to follow the link to see the video - was hoping it would project right here!)

Anyway, just in case a picture helps...

http://www.ballooncalculus.org/draw/parts/one.png

... where (key in spoiler) ...

Spoiler:
http://www.ballooncalculus.org/asy/prod.png

... is the product rule. Straight continuous lines differentiate downwards or integrate up with respect to the main variable (in this case theta).

The general drift is...

http://www.ballooncalculus.org/asy/maps/parts.png

________________________________________

Don't integrate - balloontegrate!

Balloon Calculus; standard integrals, derivatives and methods

Balloon Calculus Drawing with LaTeX and Asymptote!
• Aug 23rd 2010, 03:34 AM
Prove It
If you MUST use integration by parts, then rewrite your integral as

$\displaystyle \int{\sin^2{\theta}\,d\theta} = \int{1 - \cos^2{\theta}\,d\theta}$

$\displaystyle = \int{(1 - \cos{\theta})(1 + \cos{\theta})\,d\theta}$

Now apply integration by parts with $\displaystyle u = 1 - \cos{\theta}$ so $\displaystyle du = \sin{\theta}$ and $\displaystyle dv = 1 + \cos{\theta}$ so $\displaystyle v = \theta + \sin{\theta}$.

The integral becomes

$\displaystyle \int{(1 - \cos{\theta})(1 + \cos{\theta})\,d\theta} = (1 - \cos{\theta})(\theta + \sin{\theta}) - \int{\sin{\theta}(\theta + \sin{\theta})\,d\theta}$

$\displaystyle = \theta + \sin{\theta} - \theta\cos{\theta} - \sin{\theta}\cos{\theta} - \int{\theta\sin{\theta}\,d\theta} - \int{\sin^2{\theta}\,d\theta}$

So this gives

$\displaystyle \int{\sin^2{\theta}\,d\theta} = \theta + \sin{\theta} - \theta\cos{\theta} - \sin{\theta}\cos{\theta} - \int{\theta\sin{\theta}\,d\theta} - \int{\sin^2{\theta}\,d\theta}$

$\displaystyle 2\int{\sin^2{\theta}\,d\theta} = \theta + \sin{\theta} - \theta\cos{\theta} - \sin{\theta}\cos{\theta} - \int{\theta\sin{\theta}\,d\theta}$

$\displaystyle \int{\sin^2{\theta}\,d\theta} = \frac{1}{2}\left(\theta + \sin{\theta} - \theta\cos{\theta} - \sin{\theta}\cos{\theta} - \int{\theta\sin{\theta}\,d\theta}\right)$.

Apply integration by parts once more, then you will have your answer.
• Aug 23rd 2010, 03:45 AM
tom@ballooncalculus
Quote:

Originally Posted by Prove It
If you MUST use integration by parts, then rewrite your integral as

$\displaystyle \int{\sin^2{\theta}\,d\theta} = \int{1 - \cos^2{\theta}\,d\theta}$

$\displaystyle = \int{(1 - \cos{\theta})(1 + \cos{\theta})\,d\theta}$

Now apply integration by parts with $\displaystyle u = 1 - \cos{\theta}$ so $\displaystyle du = \sin{\theta}$ and $\displaystyle dv = 1 + \cos{\theta}$ so $\displaystyle v = \theta + \sin{\theta}$.

The integral becomes

$\displaystyle \int{(1 - \cos{\theta})(1 + \cos{\theta})\,d\theta} = (1 - \cos{\theta})(\theta + \sin{\theta}) - \int{\sin{\theta}(\theta + \sin{\theta})\,d\theta}$

$\displaystyle = \theta + \sin{\theta} - \theta\cos{\theta} - \sin{\theta}\cos{\theta} - \int{\theta\sin{\theta}\,d\theta} - \int{\sin^2{\theta}\,d\theta}$

So this gives

$\displaystyle \int{\sin^2{\theta}\,d\theta} = \theta + \sin{\theta} - \theta\cos{\theta} - \sin{\theta}\cos{\theta} - \int{\theta\sin{\theta}\,d\theta} - \int{\sin^2{\theta}\,d\theta}$

$\displaystyle 2\int{\sin^2{\theta}\,d\theta} = \theta + \sin{\theta} - \theta\cos{\theta} - \sin{\theta}\cos{\theta} - \int{\theta\sin{\theta}\,d\theta}$

$\displaystyle \int{\sin^2{\theta}\,d\theta} = \frac{1}{2}\left(\theta + \sin{\theta} - \theta\cos{\theta} - \sin{\theta}\cos{\theta} - \int{\theta\sin{\theta}\,d\theta}\right)$.

Apply integration by parts once more, then you will have your answer.

A scenic route?!

Surely, just convert cos squared to 1 minus sin squared as soon as you encounter it in the original version of parts. Sorry my web host have a problem but the pics will hopefully re-appear in a short while.
• Aug 23rd 2010, 06:19 PM
exothesis
Thanks for all the help. I should have no trouble solving it using the methods described above.
• Aug 23rd 2010, 08:41 PM
Soroban
Hello, exothesis!

The formula I use has this form: .$\displaystyle \int u\,dv \;=\;uv - \int v\,du$

Quote:

Integrate by parts: .$\displaystyle I \;=\;\int \sin^2x \, dx$

By parts: . $\displaystyle \begin{array}{cccccccc} u &=& \sin x && dv &=& \sin x\,dx \\ du &=& \cos x\,dx && v &=& -\cos x \end{array}$

And we have: .$\displaystyle I \;=\;-\sin x\cos x - \int(-\cos x)\cos x\,dx$

. . . . . . . . . . $\displaystyle I \;=\;-\sin x\cos x + \int\cos^2x\,dx$

. . . . . . . . . . $\displaystyle I \;=\;-\sin x\cos x + \int(1 - \sin^2x)\,dx$

. . . . . . . . . . $\displaystyle I \;=\;-\sin x\cos x + \int dx - \underbrace{\int\sin^2x\,dx}_{\text{This is }I}$

So we have: .$\displaystyle I \;=\;-\sin x\cos x + \int dx - I$

. . . . . . . . . $\displaystyle 2I \;=\;-\sin x\cos x + \int dx$

. . . . . . . . . $\displaystyle 2I \;=\;-\sin x\cos x + x + C$

Therefore: . . $\displaystyle I \;=\;\frac{1}{2}(x - \sin x\cos x) + C$