Integration by parts with c value? Ive asked this question a few times but still don't understand how to go about and there have been a few answers that a different so can anyone clarify what the correct answer for this integral would be - including the $c$ value? 
Calculate $∫\cos(x)(1−\sin x)^2 dx$ .
Can you integrate the different products separately?
Does it have something to do with integration by parts?
I have tried letting $u=(1−\sin x)^2$ but I don't think I'm heading in the right direction! Can anyone help?
Thanks
 A: One standard way to do the integral is to let $1-\sin x=u$. Then $du=\cos x\,dx$, and we end up with the integral 
$$\int -u^2\,du,$$
which is easy. Our integral turns out to be 
$$-\frac{1}{3}(1-\sin x)^3+C.\tag{1}$$
Another way of doing it is to expand the square. So we want to integrate 
$\cos x -2\cos x\sin x+\cos x\sin^2 x$. For the calculations of the integrals of the last two parts, $u=\sin x$ is again useful. We end up with
$$\sin x-\sin^2 x+\frac{1}{3}\sin^3 x+C.\tag{2}$$
It is easy to verify that $-\frac{1}{3}(1-\sin x)^3$ is not the same function as 
$\sin x-\sin^2 x+\frac{1}{3}\sin^3 x$. However, they differ by a constant, so both (1) and (2) are valid answers to our integration problem. Another valid answer would be $x+\cos^2 x+\frac{1}{3}\sin^3 x+C$, because $x+\cos^2 x+\frac{1}{3}\sin^3 xx$ and $x-\sin^2 x+\frac{1}{3}\sin^3 x$ differ by a constant. 
Remark: We could undoubtedly attack the problem using integration by parts. But it would be harder work than the simple substitution $u=1-\sin x$ that we used in the first calculation. 
