1. ## Integral of cos^2(x)dx

Problem:

$\int cos^2(x)dx$

Attempt:

u = cos(x)
du = -sin(x)dx
dv = cos(x) dx
v = sin(x)
$cos(x)sin(x) - \int -sin(x)sin(x)$

$cos(x)sin(x) + \int sin(x)sin(x)$

Focusing on $\int sin(x)sin(x)$
u = sin(x)
du = cos(x)dx
dv = sin(x)
v = -cos(x)
$

-sin(x)cos(x) - \int cos(x)-cos(x)
$

$-sin(x)cos(x) + \int cos(x)cos(x)$

Am I doing this wrong?

$\frac{sin(2x)}{4} + x/2 + C$
2. Your answer is correct. Though it would be easier to just use the fact that $\cos^2 x = \frac{1+\cos 2x}{2}$ and $\sin^2 x = \frac{1-\cos 2x}{2}$
Your answer is correct. Though it would be easier to just use the fact that $\cos^2 x = \frac{1+\cos 2x}{2}$
Yeah, this is derived from the double angle formula $\cos{2x}=2\cos^2x-1$