# Integral of $\big((1+\cos(x))\sin(x)\big)^2$

What is $$\int \big((1+\cos(x))\sin(x)\big)^2dx$$ ?

• What did you try? – Vinod Mar 29 '15 at 10:59
• I tried to open the expression like sin^2 + 2cos sin ^2 + cos ^2 sin^2 but could not go further – merveotesi Mar 29 '15 at 11:07
• @Vinod upper comment, thanks – merveotesi Mar 29 '15 at 11:21
• For the second term after multiplying out, use $u$-substitution. For the first term use either power reducing or parts. For the last term, use power reducing or a trig identity. – Michael Burr Mar 29 '15 at 11:28
• Hint: $sin^{2}(x) = 1/2(1 - cos2x),cos^{2}(x) = 1/2(1 + cos2x)$ – Vinod Mar 29 '15 at 11:30

use \begin{align}(1 + \cos t)^2\sin^2 t &= \sin^2 t + 2\sin^2 t \cos t + \sin^2 t \cos^2 t\\ &=\frac 12 - \frac 12 \cos 2t + 2\sin^2 t \cos t + \frac 18 - \frac 18 \cos 4t \\ &=\frac 58 - \frac 12 \cos 2t + 2\sin^2 t \cos t - \frac 18 \cos 4t \end{align}

now we can integrate $$\int (1 + \cos t)^2\sin^2 t\, dt = \frac 58 t - \frac 14 \sin 2t + \frac 23 \sin^3 t - \frac 1{32} \sin 4t + C$$

• There's a small error in the second line: it should end in $\dfrac 18 -\dfrac18\cos4t$, if I'm not mistaken. – Bernard Mar 29 '15 at 11:44
• @Bernard, thanks for spotting the error. i have fixed it. – abel Mar 29 '15 at 11:49
• Didn't you forget a $2$ in the rhs of the first line ? – Claude Leibovici Mar 29 '15 at 12:05
• @ClaudeLeibovici, thanks. is everybody happy now. – abel Mar 29 '15 at 12:12
• @abel. As I use to say, if I was given a cent for each of my typo's, I should be a billionaire ! Cheers :-) – Claude Leibovici Mar 29 '15 at 12:14

Use $\cos x=(e^{ix}+e^{-ix})/2$, $\sin x=-i(e^{ix}-e^{-ix})/2$

You get $$-\frac{1}{16}\int\bigl((2+e^{ix}+e^{-ix})(e^{ix}-e^{-ix})\bigr)^2\,dx$$ Let's simplify the internal product: $$(2+e^{ix}+e^{-ix})(e^{ix}-e^{-ix})= 2e^{ix}-2e^{-ix}+e^{2ix}-1+1-e^{-2ix}$$ and squaring it gives $$4e^{2ix}+4e^{-2ix}+e^{4ix}+e^{-4ix}-8+4e^{3ix}-4e^{-ix} -4e^{ix}+4e^{-3ix}-2$$ that we can reorder as $$e^{4ix}+e^{-4ix}+4e^{3ix}+4e^{-3ix}+4e^{2ix}+4e^{-2ix}-4e^{ix}-4e^{-ix}-10$$ or, switching back to the cosine, $$2\cos4x+8\cos3x+8\cos2x-8\cos x-10$$ so the integral is $$-\frac{1}{16}\int( 2\cos4x+8\cos3x+8\cos2x-8\cos x-10 )\,dx$$ and we get $$-\frac{1}{32}\sin 4x-\frac{1}{6}\sin3x-\frac{1}{4}\sin2x+\frac{1}{2}\sin x+\frac{5}{8}x+C$$