Integral of $$$\sqrt{\left(2 - x\right) \left(x - 1\right)}$$$
Related calculator: Definite and Improper Integral Calculator
Your Input
Find $$$\int \sqrt{\left(2 - x\right) \left(x - 1\right)}\, dx$$$.
Solution
The input is rewritten: $$$\int{\sqrt{\left(2 - x\right) \left(x - 1\right)} d x}=\int{\sqrt{- x^{2} + 3 x - 2} d x}$$$.
Complete the square (steps can be seen »): $$$- x^{2} + 3 x - 2 = \frac{1}{4} - \left(x - \frac{3}{2}\right)^{2}$$$:
$${\color{red}{\int{\sqrt{- x^{2} + 3 x - 2} d x}}} = {\color{red}{\int{\sqrt{\frac{1}{4} - \left(x - \frac{3}{2}\right)^{2}} d x}}}$$
Let $$$u=x - \frac{3}{2}$$$.
Then $$$du=\left(x - \frac{3}{2}\right)^{\prime }dx = 1 dx$$$ (steps can be seen »), and we have that $$$dx = du$$$.
So,
$${\color{red}{\int{\sqrt{\frac{1}{4} - \left(x - \frac{3}{2}\right)^{2}} d x}}} = {\color{red}{\int{\sqrt{\frac{1}{4} - u^{2}} d u}}}$$
Let $$$u=\frac{\sin{\left(v \right)}}{2}$$$.
Then $$$du=\left(\frac{\sin{\left(v \right)}}{2}\right)^{\prime }dv = \frac{\cos{\left(v \right)}}{2} dv$$$ (steps can be seen »).
Also, it follows that $$$v=\operatorname{asin}{\left(2 u \right)}$$$.
Therefore,
$$$\sqrt{\frac{1}{4} - u ^{2}} = \sqrt{\frac{1}{4} - \frac{\sin^{2}{\left( v \right)}}{4}}$$$
Use the identity $$$1 - \sin^{2}{\left( v \right)} = \cos^{2}{\left( v \right)}$$$:
$$$\sqrt{\frac{1}{4} - \frac{\sin^{2}{\left( v \right)}}{4}}=\frac{\sqrt{1 - \sin^{2}{\left( v \right)}}}{2}=\frac{\sqrt{\cos^{2}{\left( v \right)}}}{2}$$$
Assuming that $$$\cos{\left( v \right)} \ge 0$$$, we obtain the following:
$$$\frac{\sqrt{\cos^{2}{\left( v \right)}}}{2} = \frac{\cos{\left( v \right)}}{2}$$$
Therefore,
$${\color{red}{\int{\sqrt{\frac{1}{4} - u^{2}} d u}}} = {\color{red}{\int{\frac{\cos^{2}{\left(v \right)}}{4} 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}{4}$$$ and $$$f{\left(v \right)} = \cos^{2}{\left(v \right)}$$$:
$${\color{red}{\int{\frac{\cos^{2}{\left(v \right)}}{4} d v}}} = {\color{red}{\left(\frac{\int{\cos^{2}{\left(v \right)} d v}}{4}\right)}}$$
Apply the power reducing formula $$$\cos^{2}{\left(\alpha \right)} = \frac{\cos{\left(2 \alpha \right)}}{2} + \frac{1}{2}$$$ with $$$\alpha= v $$$:
$$\frac{{\color{red}{\int{\cos^{2}{\left(v \right)} d v}}}}{4} = \frac{{\color{red}{\int{\left(\frac{\cos{\left(2 v \right)}}{2} + \frac{1}{2}\right)d v}}}}{4}$$
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(2 v \right)} + 1$$$:
$$\frac{{\color{red}{\int{\left(\frac{\cos{\left(2 v \right)}}{2} + \frac{1}{2}\right)d v}}}}{4} = \frac{{\color{red}{\left(\frac{\int{\left(\cos{\left(2 v \right)} + 1\right)d v}}{2}\right)}}}{4}$$
Integrate term by term:
$$\frac{{\color{red}{\int{\left(\cos{\left(2 v \right)} + 1\right)d v}}}}{8} = \frac{{\color{red}{\left(\int{1 d v} + \int{\cos{\left(2 v \right)} d v}\right)}}}{8}$$
Apply the constant rule $$$\int c\, dv = c v$$$ with $$$c=1$$$:
$$\frac{\int{\cos{\left(2 v \right)} d v}}{8} + \frac{{\color{red}{\int{1 d v}}}}{8} = \frac{\int{\cos{\left(2 v \right)} d v}}{8} + \frac{{\color{red}{v}}}{8}$$
Let $$$w=2 v$$$.
Then $$$dw=\left(2 v\right)^{\prime }dv = 2 dv$$$ (steps can be seen »), and we have that $$$dv = \frac{dw}{2}$$$.
Therefore,
$$\frac{v}{8} + \frac{{\color{red}{\int{\cos{\left(2 v \right)} d v}}}}{8} = \frac{v}{8} + \frac{{\color{red}{\int{\frac{\cos{\left(w \right)}}{2} d w}}}}{8}$$
Apply the constant multiple rule $$$\int c f{\left(w \right)}\, dw = c \int f{\left(w \right)}\, dw$$$ with $$$c=\frac{1}{2}$$$ and $$$f{\left(w \right)} = \cos{\left(w \right)}$$$:
$$\frac{v}{8} + \frac{{\color{red}{\int{\frac{\cos{\left(w \right)}}{2} d w}}}}{8} = \frac{v}{8} + \frac{{\color{red}{\left(\frac{\int{\cos{\left(w \right)} d w}}{2}\right)}}}{8}$$
The integral of the cosine is $$$\int{\cos{\left(w \right)} d w} = \sin{\left(w \right)}$$$:
$$\frac{v}{8} + \frac{{\color{red}{\int{\cos{\left(w \right)} d w}}}}{16} = \frac{v}{8} + \frac{{\color{red}{\sin{\left(w \right)}}}}{16}$$
Recall that $$$w=2 v$$$:
$$\frac{v}{8} + \frac{\sin{\left({\color{red}{w}} \right)}}{16} = \frac{v}{8} + \frac{\sin{\left({\color{red}{\left(2 v\right)}} \right)}}{16}$$
Recall that $$$v=\operatorname{asin}{\left(2 u \right)}$$$:
$$\frac{\sin{\left(2 {\color{red}{v}} \right)}}{16} + \frac{{\color{red}{v}}}{8} = \frac{\sin{\left(2 {\color{red}{\operatorname{asin}{\left(2 u \right)}}} \right)}}{16} + \frac{{\color{red}{\operatorname{asin}{\left(2 u \right)}}}}{8}$$
Recall that $$$u=x - \frac{3}{2}$$$:
$$\frac{\sin{\left(2 \operatorname{asin}{\left(2 {\color{red}{u}} \right)} \right)}}{16} + \frac{\operatorname{asin}{\left(2 {\color{red}{u}} \right)}}{8} = \frac{\sin{\left(2 \operatorname{asin}{\left(2 {\color{red}{\left(x - \frac{3}{2}\right)}} \right)} \right)}}{16} + \frac{\operatorname{asin}{\left(2 {\color{red}{\left(x - \frac{3}{2}\right)}} \right)}}{8}$$
Therefore,
$$\int{\sqrt{- x^{2} + 3 x - 2} d x} = \frac{\sin{\left(2 \operatorname{asin}{\left(2 x - 3 \right)} \right)}}{16} + \frac{\operatorname{asin}{\left(2 x - 3 \right)}}{8}$$
Using the formulas $$$\sin{\left(2 \operatorname{asin}{\left(\alpha \right)} \right)} = 2 \alpha \sqrt{1 - \alpha^{2}}$$$, $$$\sin{\left(2 \operatorname{acos}{\left(\alpha \right)} \right)} = 2 \alpha \sqrt{1 - \alpha^{2}}$$$, $$$\cos{\left(2 \operatorname{asin}{\left(\alpha \right)} \right)} = 1 - 2 \alpha^{2}$$$, $$$\cos{\left(2 \operatorname{acos}{\left(\alpha \right)} \right)} = 2 \alpha^{2} - 1$$$, $$$\sinh{\left(2 \operatorname{asinh}{\left(\alpha \right)} \right)} = 2 \alpha \sqrt{\alpha^{2} + 1}$$$, $$$\sinh{\left(2 \operatorname{acosh}{\left(\alpha \right)} \right)} = 2 \alpha \sqrt{\alpha - 1} \sqrt{\alpha + 1}$$$, $$$\cosh{\left(2 \operatorname{asinh}{\left(\alpha \right)} \right)} = 2 \alpha^{2} + 1$$$, $$$\cosh{\left(2 \operatorname{acosh}{\left(\alpha \right)} \right)} = 2 \alpha^{2} - 1$$$, simplify the expression:
$$\int{\sqrt{- x^{2} + 3 x - 2} d x} = \frac{\sqrt{1 - \left(2 x - 3\right)^{2}} \left(2 x - 3\right)}{8} + \frac{\operatorname{asin}{\left(2 x - 3 \right)}}{8}$$
Add the constant of integration:
$$\int{\sqrt{- x^{2} + 3 x - 2} d x} = \frac{\sqrt{1 - \left(2 x - 3\right)^{2}} \left(2 x - 3\right)}{8} + \frac{\operatorname{asin}{\left(2 x - 3 \right)}}{8}+C$$
Answer
$$$\int \sqrt{\left(2 - x\right) \left(x - 1\right)}\, dx = \left(\frac{\sqrt{1 - \left(2 x - 3\right)^{2}} \left(2 x - 3\right)}{8} + \frac{\operatorname{asin}{\left(2 x - 3 \right)}}{8}\right) + C$$$A