By expressing $\cos^2 x$ as the product $\cos x \cos x$, use integration by parts to show that $2\int \cos^2 x\,dx = \cos x \sin x+x+c$. If I make the trigonometric substitution $\cos^2(x) = \frac{1}{2}(1+\cos2x)$ at the beginning then I can solve this without any problem.
But if I do the question as it is worded above, I just end up back where I started. I cannot solve this using integration by parts.
Is there a way or was the question worded badly?
 A: Let $I=\int_a^b\cos^2(x)dx$. We have
\begin{aligned}
\int_a^b\cos^2(x)dx&=\int_a^b\cos(x)\cos(x)dx\\
&=\int_a^b\frac{d(\sin(x))}{dx}\cos(x)dx\\
&=\sin(x)\cos(x)|_a^b-\int_a^b\sin(x)\frac{d(\cos(x))}{dx}dx\\
&=\sin(x)\cos(x)|_a^b+\int_a^b\sin^2(x)dx\\
&=\sin(x)\cos(x)|_a^b+(b-a-I).
\end{aligned}
In sum,
$$
\int_a^b\cos^2(x)dx=\frac{1}{2}(\sin(x)\cos(x)|_a^b+b-a).
$$
In particular,
$$
\int_{x_0}^x\cos^2(s)ds=\frac{1}{2}(\sin(x)\cos(x)+x+c).
$$
where $c=-x_0-\sin(x_0)\cos(x_0)$.
A: Call your integral I. After integration by parts you will come to a result that contains I. Therefore you have an equation for I. Solve it.
A: we have $$2\int \cos(x)^2dx$$ setting $$u=\cos(x),v'=\cos(x)$$ we have
$$2\int\cos(x)^2dx=2\left(\cos(x)\sin(x)+\int\sin(x)^2dx\right)$$
with $$\sin(x)^2=1-\cos(x)^2$$ you will get to the solution
A: Let I = $\int$ cos x * cos dx
= cos x * $\int$ cos x dx - $\int \left(\frac{d}{dx}\cos x  \int \cos x dx \right) dx$
= cos x * sin x - $\int$ -sin x * sin x dx 
= cos x * sin x + $\int \sin^2 x $dx 
= cos x sin x + $\int  (1 - \cos^2 x)$dx
= cos x sin x + x - $\int cos^2 x $dx 
= cos x sin x + x - I + C
I + I = cos x sin x + x + C
I = [cos x sin x + x]/2 + C
And original term,
2  $\int$ cos x * cos dx = 2I
= cos x sin x + x + C'
Where C' = 2C.
A: Well, you can use integration by parts but not straightforward.
$$\int \cos^2x = \sin x \cos x + \int \sin^2 x+ c$$
Calling $I_1$ and $I_2$ these two integrals respectively and using the fundamental goniometric identity ($\sin^2 x + \cos^2 x = 1$), we get:
$$I_1-I_2 = \sin x \cos x + c$$
$$I_1+I_2 = x + c$$
Now just sum up to get the result.
A: Integration by parts: $$\int \:f.g'\:dx = f.g - \int\:f'g\:dx$$
Defining: f(x)=cosx --> f '(x)= - senx;  g'(x)= cosx --> g(x) = senx
$$\int \:cos^2x\:dx = cosx.sinx - \int\:-senx.senx\:dx$$
$$\int \:cos^2x\:dx = cosx.sinx + \int\:sen^2x\:dx$$
$$\int \:cos^2x\:dx = cosx.sinx + \int\:1-cos^2x\:dx$$
$$\int \:cos^2x\:dx = cosx.sinx + \int\:1\:dx-\int\:cos^2x\:dx$$
$$\int \:cos^2x\:dx = cosx.sinx + x-\int\:cos^2x\:dx$$
$$2\int \:cos^2x\:dx = cosx.sinx + x$$
$$\int \:cos^2x\:dx = \frac{(cosx.sinx + x)}{2}+c$$
Remember that: $$cos^2x + sen^2x = 1$$
$$sen^2x =1 - cos^2x $$
