Integral of $$$\cos^{2}{\left(\theta \right)}$$$
Related calculator: Integral Calculator
Solution
Rewrite the cosine using the power reducing formula $$$\cos^{2}{\left(\alpha \right)} = \frac{\cos{\left(2 \alpha \right)}}{2} + \frac{1}{2}$$$ with $$$\alpha=\theta$$$:
$${\color{red}{\int{\cos^{2}{\left(\theta \right)} d \theta}}} = {\color{red}{\int{\left(\frac{\cos{\left(2 \theta \right)}}{2} + \frac{1}{2}\right)d \theta}}}$$
Apply the constant multiple rule $$$\int c f{\left(\theta \right)}\, d\theta = c \int f{\left(\theta \right)}\, d\theta$$$ with $$$c=\frac{1}{2}$$$ and $$$f{\left(\theta \right)} = \cos{\left(2 \theta \right)} + 1$$$:
$${\color{red}{\int{\left(\frac{\cos{\left(2 \theta \right)}}{2} + \frac{1}{2}\right)d \theta}}} = {\color{red}{\left(\frac{\int{\left(\cos{\left(2 \theta \right)} + 1\right)d \theta}}{2}\right)}}$$
Integrate term by term:
$$\frac{{\color{red}{\int{\left(\cos{\left(2 \theta \right)} + 1\right)d \theta}}}}{2} = \frac{{\color{red}{\left(\int{1 d \theta} + \int{\cos{\left(2 \theta \right)} d \theta}\right)}}}{2}$$
Apply the constant rule $$$\int c\, d\theta = c \theta$$$ with $$$c=1$$$:
$$\frac{\int{\cos{\left(2 \theta \right)} d \theta}}{2} + \frac{{\color{red}{\int{1 d \theta}}}}{2} = \frac{\int{\cos{\left(2 \theta \right)} d \theta}}{2} + \frac{{\color{red}{\theta}}}{2}$$
Let $$$u=2 \theta$$$.
Then $$$du=\left(2 \theta\right)^{\prime }d\theta = 2 d\theta$$$ (steps can be seen »), and we have that $$$d\theta = \frac{du}{2}$$$.
Thus,
$$\frac{\theta}{2} + \frac{{\color{red}{\int{\cos{\left(2 \theta \right)} d \theta}}}}{2} = \frac{\theta}{2} + \frac{{\color{red}{\int{\frac{\cos{\left(u \right)}}{2} d u}}}}{2}$$
Apply the constant multiple rule $$$\int c f{\left(u \right)}\, du = c \int f{\left(u \right)}\, du$$$ with $$$c=\frac{1}{2}$$$ and $$$f{\left(u \right)} = \cos{\left(u \right)}$$$:
$$\frac{\theta}{2} + \frac{{\color{red}{\int{\frac{\cos{\left(u \right)}}{2} d u}}}}{2} = \frac{\theta}{2} + \frac{{\color{red}{\left(\frac{\int{\cos{\left(u \right)} d u}}{2}\right)}}}{2}$$
The integral of the cosine is $$$\int{\cos{\left(u \right)} d u} = \sin{\left(u \right)}$$$:
$$\frac{\theta}{2} + \frac{{\color{red}{\int{\cos{\left(u \right)} d u}}}}{4} = \frac{\theta}{2} + \frac{{\color{red}{\sin{\left(u \right)}}}}{4}$$
Recall that $$$u=2 \theta$$$:
$$\frac{\theta}{2} + \frac{\sin{\left({\color{red}{u}} \right)}}{4} = \frac{\theta}{2} + \frac{\sin{\left({\color{red}{\left(2 \theta\right)}} \right)}}{4}$$
Therefore,
$$\int{\cos^{2}{\left(\theta \right)} d \theta} = \frac{\theta}{2} + \frac{\sin{\left(2 \theta \right)}}{4}$$
Add the constant of integration:
$$\int{\cos^{2}{\left(\theta \right)} d \theta} = \frac{\theta}{2} + \frac{\sin{\left(2 \theta \right)}}{4}+C$$
Answer: $$$\int{\cos^{2}{\left(\theta \right)} d \theta}=\frac{\theta}{2} + \frac{\sin{\left(2 \theta \right)}}{4}+C$$$