# How do you find the integral of int (1 + cos x)^2 dx?

Mar 8, 2018

$\int {\left(1 + \cos x\right)}^{2} \mathrm{dx} = \frac{1}{4} \left(6 x + 8 \sin x + \sin 2 x\right) + \text{c}$

#### Explanation:

First expand the integrand using the perfect square formula

$\int \left(1 + {\cos}^{2} x\right) \mathrm{dx} = \int 1 + 2 \cos x + {\cos}^{2} x \mathrm{dx}$

Then use the reduction formula on ${\cos}^{2} x$ to get it into an integrable form

$\int 1 + 2 \cos x + {\cos}^{2} x \mathrm{dx} = \int 1 + 2 \cos x + \frac{1}{2} + \frac{1}{2} \cos 2 x \mathrm{dx} = \int \frac{3}{2} + 2 \cos x + \frac{1}{2} \cos 2 x \mathrm{dx}$

Integrate each term using the power rule or standard integrals

$\int \frac{3}{2} + 2 \cos x + \frac{1}{2} \cos 2 x = \frac{3}{2} x + 2 \sin x + \frac{1}{4} \sin 2 x + \text{c"=1/4(6x+8sinx+sin2x)+"c}$

Mar 8, 2018

$\int {\left(1 + \cos x\right)}^{2} \mathrm{dx}$
=$\int \left(1 + 2 \cos x + {\cos}^{2} x\right) \mathrm{dx}$
=int(1+2cos x +(1/2cos 2x - 1/2) dx *
=$\int \left(\frac{1}{2} + 2 \cos x + \frac{1}{2} \cos 2 x\right) \mathrm{dx}$
=$\frac{1}{2} x + 2 \sin x + \frac{1}{4} \sin 2 x + c$

*$1 + 2 {\cos}^{2} x = \cos 2 x$
$\therefore {\cos}^{2} x = \frac{1}{2} \cos 2 x - \frac{1}{2}$