View Single Post
Emeritus
HW Helper
PF Gold
P: 7,395
 Quote by b0rsuk 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} $$\int(sin \frac{x}{2} - cos \frac{x}{2})^2 \mathrm{dx}$$ 3. The attempt at a solution (attachment?) I'd be grateful for highlighting my errors.
After splitting this up into two integrals, the first one is fine.

$\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$
$\displaystyle=-4\int\left(\sin(t)\cos(t)\right)dt$
After that you dropped a minus sign.

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

I know that's not the book's answer, but notice that
$1-2\sin^2(\theta)=\cos(2\theta)$

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

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

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