View Single Post
Dec26-11, 01:02 PM
Sci Advisor
HW Helper
PF Gold
P: 7,782
Quote Quote by b0rsuk View Post
1. The problem statement, all variables and given/known data

I'm unable to solve this integral. I get a result, but it doesn't match the solution.

\int(sin \frac{x}{2} - cos \frac{x}{2})^2 \mathrm{dx}
[tex]\int(sin \frac{x}{2} - cos \frac{x}{2})^2 \mathrm{dx}[/tex]

3. The attempt at a solution

I'd be grateful for highlighting my errors.
After splitting this up into two integrals, the first one is fine.

You then made offsetting errors -- or simply had a typo.
[itex]\displaystyle -2\int\left(\sin\left(\frac{x}{2}\right)\cos\left( \frac{x}{2}\right)\right)dx=-4\int\left(\frac{1}{2}\sin\left(\frac{x}{2}\right)cos\left(\frac{x}{2}\ right)\right)dx[/itex]
After that you dropped a minus sign.

So, the final answer should be [itex]\displaystyle x-2\sin^2\left(\frac{x}{2}\right)+C[/itex]

I know that's not the book's answer, but notice that

So substituting x/2 for θ and doing a bit of algebra gives

[itex]\displaystyle -2\sin^2\left(\frac{x}{2}\right)=\cos(x)-1[/itex]
Therefore, [itex]\displaystyle x-2\sin^2\left(\frac{x}{2}\right)+C=x+\cos(x)-1+C[/itex]

-1+C is just a constant, one unit less than C.

So, your answer was correct except for a sign error.
Attached Thumbnails