<s>[INST] How to evaluate $\int \cos^2x \ dx$ I am new to integration and I want to evaluate
$ \int \cos^2x \, dx $
What I done
Using simple chain rule,
$ \int(\cos x)^2 \\
= \int t^2 \,dt  \ (t = \cos x) \\
= \frac{t^3}{3} \ + C $
By substitution of $t = \cos(x)$ I got with answer.
 [/INST] You can make use of the double angle formula for cosine:
$$\begin{eqnarray}\cos(2x) & = & 2 \cos^2 (x) - 1 \\
\cos^2 (x) & = & \frac{1}{2}\left(\cos (2x) + 1\right)\\
\int \cos^2 x\ dx  & = & \frac{1}{2} \int \left(\cos(2x) + 1 \right) dx \\
& = & \frac{1}{2}\left[\frac{1}{2}\sin(2x) + x + C \right] \\
& = & \frac{1}{4}\sin(2x) + \frac{1}{2}x + C \end{eqnarray}$$
</s>