# Integrating trig functions

1. Jan 10, 2014

### MathewsMD

$\frac {1}{4} \int sin^2 (2x)dx = I = \frac {1}{4} [- \frac {1}{2} sin(2x)cos(2x) + \int cos^2 (2x)dx]$ when $u = sin(2x), dv = sin(2x)dx, v= - \frac {cos(2x)}{2}$ and $du = 2cos(2x)dx$

Now simplifying $\int cos^2 (2x)dx$ you get $x - \int sin^2 (2x)dx = x - I$

Then,

$I = \frac {1}{4} [- \frac {1}{2}sin(2x)cos(2x) + x - I)]$

$\frac {5}{4} I = \frac {1}{4} [- \frac {1}{2}sin(2x)cos(2x) + x]$

$I = \frac {1}{5} [ -\frac {1}{2}sin(2x)cos(2x) + x]$

Could anyone verify my solution? The next part is actually making this an indefinite integral of $\int^{\frac {∏}{2}}_0 sin^2 (2x)dx$ and when I solve this, my answer is always $\frac {∏}{10}$ and this is incorrect.

Last edited: Jan 10, 2014
2. Jan 10, 2014

### brmath

I can't figure out where the 1/4 came from.

3. Jan 10, 2014

### vela

Staff Emeritus
I didn't check your work carefully, but the final result doesn't look right. Did you try differentiating it and seeing if you recover the integrand?

By the way, there's a much more straightforward way to do this integral than using integration by parts. Are you required to integrate by parts for this problem?

4. Jan 10, 2014

### MathewsMD

Sorry, there was a $\frac {1}{4}$ in the beginning. Error on my part, sorry. I've corrected it in the original now.

5. Jan 10, 2014

### MathewsMD

I tried it and got something different. I kept trying the question again but kept coming with the same integral. I understand I could have used half angle identities instead of integration by parts, but by using integration by parts. I keep getting an incorrect answer and if someone could point out what is wrong, that would be great.

6. Jan 10, 2014

### vela

Staff Emeritus
The 1/5 is a problem. When I differentiated what's inside the square brackets, I got $2\sin^2 2x$, so you're pretty close. It's probably just arithmetical errors somewhere.

7. Jan 10, 2014

### vela

Staff Emeritus
The problem's here: $I \ne \int \sin^2 2x\,dx$

8. Jan 10, 2014

### MathewsMD

$I = \frac {1}{4}\int \sin^2 2x\,dx$ is the correct equation, right?

Okay, so:

$\frac {1}{4}I = \frac {1}{4} [- \frac {1}{2}sin(2x)cos(2x) + x - I)]$

$\frac {1}{2} I = \frac {1}{4} [- \frac {1}{2}sin(2x)cos(2x) + x]$

$I = \frac {1}{2} [ -\frac {1}{2}sin(2x)cos(2x) + x]$

In case I didn't do exactly what you wanted, I still get $\frac {∏}{4}$ as the answer which is still not right...

9. Jan 10, 2014

### Staff: Mentor

Have you tried using the identity $sin^2θ=\frac{1-cos(2θ)}{2}$?

10. Jan 10, 2014

### vela

Staff Emeritus
Yes, you defined it that way, after all. So $\int \sin^2 2x\,dx = 4I$, right?

It would be better to say that
$$I = \frac{1}{4}\left[x-\frac{1}{2}\sin 2x\cos 2x - 4I\right]$$ rather than changing the definition of $I$ midstream, which is probably why you're getting the wrong answer.

11. Jan 10, 2014

### MathewsMD

Given:

$\int sin(x)cos(x)dx = I$ and $u = sin(x), du = cos(x)dx$ so $I = \int udu = \frac {1}{2}sin^2(x)$

Using $w = cos(x), -dw = sin(x)dx$ I found $I = -\int wdw = -\frac{1}{2}w^2 = -\frac{1}{2}cos^2(x)$

Using the two methods, I found two different answers and I am not completely sure why....
Once again, and clarification on what I did wrong or am thinking about incorrectly would be very helpful! :)

12. Jan 10, 2014

### vela

Staff Emeritus
Those two results differ only by a constant.

13. Jan 10, 2014

### MathewsMD

Oh boy...let's not make that mistake again haha thank you, I should really develop better strategies to check my work.

14. Jan 10, 2014

### Staff: Mentor

$$\frac {1}{4} \int sin^2 (2x)dx = \frac {1}{32} \int {(1-cos(4x))d(4x)}=\frac{x}{8}-\frac{sin(4x)}{32}+C$$

15. Jan 10, 2014

### MathewsMD

And there we go...defining $I$ early and changing it was a bad idea...Thank you everyone for the great help!