# Thread: Integration by parts

1. ## Integration by parts

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

The function is

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

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

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

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

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

Now what do I do?

2. No need for integration by parts, use trigonometric identities.

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

$= \frac{1}{2}\theta - \frac{1}{4}\sin{2\theta} + C$.

3. The question states to use integration by parts, I assume there would be a way?

4. You may need to integrate by parts twice here.

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

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

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

What do you get?

5. 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

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

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

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

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

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

Now what do I do?
So you have $\int sin^2(\theta) d\theta= -cos(\theta)sin(\theta)+ \int cos^2(\theta) d\theta$

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

You may get a $\int sin^2(\theta)d\theta)$ again but now you can solve the equation for $\int sin^2(\theta)d\theta$.

6. I end up with 0? I don't think I'm doing it right. This is what I do:
$\int cos^2(\theta)d\theta = cos(\theta)sin(\theta)+ \int sin^2(\theta) d\theta$

But then all together that means:
$\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
$\frac{x}{2} - \frac{sin\theta cos\theta}{2}$

7. Solving this one with integration by parts is a time's wasting.

Use this:

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

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

Use this:

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

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

9. 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...

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

Spoiler:

... 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...

________________________________________

Don't integrate - balloontegrate!

Balloon Calculus; standard integrals, derivatives and methods

Balloon Calculus Drawing with LaTeX and Asymptote!

10. If you MUST use integration by parts, then rewrite your integral as

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

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

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

The integral becomes

$\int{(1 - \cos{\theta})(1 + \cos{\theta})\,d\theta} = (1 - \cos{\theta})(\theta + \sin{\theta}) - \int{\sin{\theta}(\theta + \sin{\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}$

So this gives

$\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}$

$2\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} = \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.

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

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

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

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

The integral becomes

$\int{(1 - \cos{\theta})(1 + \cos{\theta})\,d\theta} = (1 - \cos{\theta})(\theta + \sin{\theta}) - \int{\sin{\theta}(\theta + \sin{\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}$

So this gives

$\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}$

$2\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} = \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.

12. Thanks for all the help. I should have no trouble solving it using the methods described above.

13. Hello, exothesis!

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

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

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

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

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

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

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

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

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

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

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