Integral of $$$2 \sin^{2}{\left(x \right)} - 1$$$
Related calculator: Definite and Improper Integral Calculator
Your Input
Find $$$\int \left(2 \sin^{2}{\left(x \right)} - 1\right)\, dx$$$.
Solution
Integrate term by term:
$${\color{red}{\int{\left(2 \sin^{2}{\left(x \right)} - 1\right)d x}}} = {\color{red}{\left(- \int{1 d x} + \int{2 \sin^{2}{\left(x \right)} d x}\right)}}$$
Apply the constant rule $$$\int c\, dx = c x$$$ with $$$c=1$$$:
$$\int{2 \sin^{2}{\left(x \right)} d x} - {\color{red}{\int{1 d x}}} = \int{2 \sin^{2}{\left(x \right)} d x} - {\color{red}{x}}$$
Apply the constant multiple rule $$$\int c f{\left(x \right)}\, dx = c \int f{\left(x \right)}\, dx$$$ with $$$c=2$$$ and $$$f{\left(x \right)} = \sin^{2}{\left(x \right)}$$$:
$$- x + {\color{red}{\int{2 \sin^{2}{\left(x \right)} d x}}} = - x + {\color{red}{\left(2 \int{\sin^{2}{\left(x \right)} d x}\right)}}$$
Apply the power reducing formula $$$\sin^{2}{\left(\alpha \right)} = \frac{1}{2} - \frac{\cos{\left(2 \alpha \right)}}{2}$$$ with $$$\alpha=x$$$:
$$- x + 2 {\color{red}{\int{\sin^{2}{\left(x \right)} d x}}} = - x + 2 {\color{red}{\int{\left(\frac{1}{2} - \frac{\cos{\left(2 x \right)}}{2}\right)d x}}}$$
Apply the constant multiple rule $$$\int c f{\left(x \right)}\, dx = c \int f{\left(x \right)}\, dx$$$ with $$$c=\frac{1}{2}$$$ and $$$f{\left(x \right)} = 1 - \cos{\left(2 x \right)}$$$:
$$- x + 2 {\color{red}{\int{\left(\frac{1}{2} - \frac{\cos{\left(2 x \right)}}{2}\right)d x}}} = - x + 2 {\color{red}{\left(\frac{\int{\left(1 - \cos{\left(2 x \right)}\right)d x}}{2}\right)}}$$
Integrate term by term:
$$- x + {\color{red}{\int{\left(1 - \cos{\left(2 x \right)}\right)d x}}} = - x + {\color{red}{\left(\int{1 d x} - \int{\cos{\left(2 x \right)} d x}\right)}}$$
Apply the constant rule $$$\int c\, dx = c x$$$ with $$$c=1$$$:
$$- x - \int{\cos{\left(2 x \right)} d x} + {\color{red}{\int{1 d x}}} = - x - \int{\cos{\left(2 x \right)} d x} + {\color{red}{x}}$$
Let $$$u=2 x$$$.
Then $$$du=\left(2 x\right)^{\prime }dx = 2 dx$$$ (steps can be seen »), and we have that $$$dx = \frac{du}{2}$$$.
The integral can be rewritten as
$$- {\color{red}{\int{\cos{\left(2 x \right)} d x}}} = - {\color{red}{\int{\frac{\cos{\left(u \right)}}{2} 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(u \right)}$$$:
$$- {\color{red}{\int{\frac{\cos{\left(u \right)}}{2} d u}}} = - {\color{red}{\left(\frac{\int{\cos{\left(u \right)} d u}}{2}\right)}}$$
The integral of the cosine is $$$\int{\cos{\left(u \right)} d u} = \sin{\left(u \right)}$$$:
$$- \frac{{\color{red}{\int{\cos{\left(u \right)} d u}}}}{2} = - \frac{{\color{red}{\sin{\left(u \right)}}}}{2}$$
Recall that $$$u=2 x$$$:
$$- \frac{\sin{\left({\color{red}{u}} \right)}}{2} = - \frac{\sin{\left({\color{red}{\left(2 x\right)}} \right)}}{2}$$
Therefore,
$$\int{\left(2 \sin^{2}{\left(x \right)} - 1\right)d x} = - \frac{\sin{\left(2 x \right)}}{2}$$
Add the constant of integration:
$$\int{\left(2 \sin^{2}{\left(x \right)} - 1\right)d x} = - \frac{\sin{\left(2 x \right)}}{2}+C$$
Answer
$$$\int \left(2 \sin^{2}{\left(x \right)} - 1\right)\, dx = - \frac{\sin{\left(2 x \right)}}{2} + C$$$A