Integral of $$$\cos^{2}{\left(\frac{x}{2} \right)}$$$

The calculator will find the integral/antiderivative of $$$\cos^{2}{\left(\frac{x}{2} \right)}$$$, with steps shown.

Related calculator: Definite and Improper Integral Calculator

Please write without any differentials such as $$$dx$$$, $$$dy$$$ etc.
Leave empty for autodetection.

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please contact us.

Your Input

Find $$$\int \cos^{2}{\left(\frac{x}{2} \right)}\, dx$$$.

Solution

Let $$$u=\frac{x}{2}$$$.

Then $$$du=\left(\frac{x}{2}\right)^{\prime }dx = \frac{dx}{2}$$$ (steps can be seen »), and we have that $$$dx = 2 du$$$.

So,

$${\color{red}{\int{\cos^{2}{\left(\frac{x}{2} \right)} d x}}} = {\color{red}{\int{2 \cos^{2}{\left(u \right)} d u}}}$$

Apply the constant multiple rule $$$\int c f{\left(u \right)}\, du = c \int f{\left(u \right)}\, du$$$ with $$$c=2$$$ and $$$f{\left(u \right)} = \cos^{2}{\left(u \right)}$$$:

$${\color{red}{\int{2 \cos^{2}{\left(u \right)} d u}}} = {\color{red}{\left(2 \int{\cos^{2}{\left(u \right)} d u}\right)}}$$

Apply the power reducing formula $$$\cos^{2}{\left(\alpha \right)} = \frac{\cos{\left(2 \alpha \right)}}{2} + \frac{1}{2}$$$ with $$$\alpha= u $$$:

$$2 {\color{red}{\int{\cos^{2}{\left(u \right)} d u}}} = 2 {\color{red}{\int{\left(\frac{\cos{\left(2 u \right)}}{2} + \frac{1}{2}\right)d u}}}$$

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(2 u \right)} + 1$$$:

$$2 {\color{red}{\int{\left(\frac{\cos{\left(2 u \right)}}{2} + \frac{1}{2}\right)d u}}} = 2 {\color{red}{\left(\frac{\int{\left(\cos{\left(2 u \right)} + 1\right)d u}}{2}\right)}}$$

Integrate term by term:

$${\color{red}{\int{\left(\cos{\left(2 u \right)} + 1\right)d u}}} = {\color{red}{\left(\int{1 d u} + \int{\cos{\left(2 u \right)} d u}\right)}}$$

Apply the constant rule $$$\int c\, du = c u$$$ with $$$c=1$$$:

$$\int{\cos{\left(2 u \right)} d u} + {\color{red}{\int{1 d u}}} = \int{\cos{\left(2 u \right)} d u} + {\color{red}{u}}$$

Let $$$v=2 u$$$.

Then $$$dv=\left(2 u\right)^{\prime }du = 2 du$$$ (steps can be seen »), and we have that $$$du = \frac{dv}{2}$$$.

Thus,

$$u + {\color{red}{\int{\cos{\left(2 u \right)} d u}}} = u + {\color{red}{\int{\frac{\cos{\left(v \right)}}{2} d v}}}$$

Apply the constant multiple rule $$$\int c f{\left(v \right)}\, dv = c \int f{\left(v \right)}\, dv$$$ with $$$c=\frac{1}{2}$$$ and $$$f{\left(v \right)} = \cos{\left(v \right)}$$$:

$$u + {\color{red}{\int{\frac{\cos{\left(v \right)}}{2} d v}}} = u + {\color{red}{\left(\frac{\int{\cos{\left(v \right)} d v}}{2}\right)}}$$

The integral of the cosine is $$$\int{\cos{\left(v \right)} d v} = \sin{\left(v \right)}$$$:

$$u + \frac{{\color{red}{\int{\cos{\left(v \right)} d v}}}}{2} = u + \frac{{\color{red}{\sin{\left(v \right)}}}}{2}$$

Recall that $$$v=2 u$$$:

$$u + \frac{\sin{\left({\color{red}{v}} \right)}}{2} = u + \frac{\sin{\left({\color{red}{\left(2 u\right)}} \right)}}{2}$$

Recall that $$$u=\frac{x}{2}$$$:

$$\frac{\sin{\left(2 {\color{red}{u}} \right)}}{2} + {\color{red}{u}} = \frac{\sin{\left(2 {\color{red}{\left(\frac{x}{2}\right)}} \right)}}{2} + {\color{red}{\left(\frac{x}{2}\right)}}$$

Therefore,

$$\int{\cos^{2}{\left(\frac{x}{2} \right)} d x} = \frac{x}{2} + \frac{\sin{\left(x \right)}}{2}$$

Simplify:

$$\int{\cos^{2}{\left(\frac{x}{2} \right)} d x} = \frac{x + \sin{\left(x \right)}}{2}$$

Add the constant of integration:

$$\int{\cos^{2}{\left(\frac{x}{2} \right)} d x} = \frac{x + \sin{\left(x \right)}}{2}+C$$

Answer

$$$\int \cos^{2}{\left(\frac{x}{2} \right)}\, dx = \frac{x + \sin{\left(x \right)}}{2} + C$$$A


Please try a new game Rotatly