Integral of $$$\sqrt{- x^{2} + 6 x}$$$

The calculator will find the integral/antiderivative of $$$\sqrt{- x^{2} + 6 x}$$$, 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 \sqrt{- x^{2} + 6 x}\, dx$$$.

Solution

Complete the square (steps can be seen »): $$$- x^{2} + 6 x = 9 - \left(x - 3\right)^{2}$$$:

$${\color{red}{\int{\sqrt{- x^{2} + 6 x} d x}}} = {\color{red}{\int{\sqrt{9 - \left(x - 3\right)^{2}} d x}}}$$

Let $$$u=x - 3$$$.

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

The integral can be rewritten as

$${\color{red}{\int{\sqrt{9 - \left(x - 3\right)^{2}} d x}}} = {\color{red}{\int{\sqrt{9 - u^{2}} d u}}}$$

Let $$$u=3 \sin{\left(v \right)}$$$.

Then $$$du=\left(3 \sin{\left(v \right)}\right)^{\prime }dv = 3 \cos{\left(v \right)} dv$$$ (steps can be seen »).

Also, it follows that $$$v=\operatorname{asin}{\left(\frac{u}{3} \right)}$$$.

Therefore,

$$$\sqrt{9 - u ^{2}} = \sqrt{9 - 9 \sin^{2}{\left( v \right)}}$$$

Use the identity $$$1 - \sin^{2}{\left( v \right)} = \cos^{2}{\left( v \right)}$$$:

$$$\sqrt{9 - 9 \sin^{2}{\left( v \right)}}=3 \sqrt{1 - \sin^{2}{\left( v \right)}}=3 \sqrt{\cos^{2}{\left( v \right)}}$$$

Assuming that $$$\cos{\left( v \right)} \ge 0$$$, we obtain the following:

$$$3 \sqrt{\cos^{2}{\left( v \right)}} = 3 \cos{\left( v \right)}$$$

Integral becomes

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

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

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

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

$$9 {\color{red}{\int{\cos^{2}{\left(v \right)} d v}}} = 9 {\color{red}{\int{\left(\frac{\cos{\left(2 v \right)}}{2} + \frac{1}{2}\right)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(2 v \right)} + 1$$$:

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

Integrate term by term:

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

Apply the constant rule $$$\int c\, dv = c v$$$ with $$$c=1$$$:

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

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}$$$.

Thus,

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

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{9 v}{2} + \frac{9 {\color{red}{\int{\frac{\cos{\left(w \right)}}{2} d w}}}}{2} = \frac{9 v}{2} + \frac{9 {\color{red}{\left(\frac{\int{\cos{\left(w \right)} d w}}{2}\right)}}}{2}$$

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

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

Recall that $$$w=2 v$$$:

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

Recall that $$$v=\operatorname{asin}{\left(\frac{u}{3} \right)}$$$:

$$\frac{9 \sin{\left(2 {\color{red}{v}} \right)}}{4} + \frac{9 {\color{red}{v}}}{2} = \frac{9 \sin{\left(2 {\color{red}{\operatorname{asin}{\left(\frac{u}{3} \right)}}} \right)}}{4} + \frac{9 {\color{red}{\operatorname{asin}{\left(\frac{u}{3} \right)}}}}{2}$$

Recall that $$$u=x - 3$$$:

$$\frac{9 \sin{\left(2 \operatorname{asin}{\left(\frac{{\color{red}{u}}}{3} \right)} \right)}}{4} + \frac{9 \operatorname{asin}{\left(\frac{{\color{red}{u}}}{3} \right)}}{2} = \frac{9 \sin{\left(2 \operatorname{asin}{\left(\frac{{\color{red}{\left(x - 3\right)}}}{3} \right)} \right)}}{4} + \frac{9 \operatorname{asin}{\left(\frac{{\color{red}{\left(x - 3\right)}}}{3} \right)}}{2}$$

Therefore,

$$\int{\sqrt{- x^{2} + 6 x} d x} = \frac{9 \sin{\left(2 \operatorname{asin}{\left(\frac{x}{3} - 1 \right)} \right)}}{4} + \frac{9 \operatorname{asin}{\left(\frac{x}{3} - 1 \right)}}{2}$$

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} + 6 x} d x} = \frac{9 \sqrt{1 - \left(\frac{x}{3} - 1\right)^{2}} \left(\frac{x}{3} - 1\right)}{2} + \frac{9 \operatorname{asin}{\left(\frac{x}{3} - 1 \right)}}{2}$$

Simplify further:

$$\int{\sqrt{- x^{2} + 6 x} d x} = \frac{\sqrt{9 - \left(x - 3\right)^{2}} \left(x - 3\right)}{2} + \frac{9 \operatorname{asin}{\left(\frac{x}{3} - 1 \right)}}{2}$$

Add the constant of integration:

$$\int{\sqrt{- x^{2} + 6 x} d x} = \frac{\sqrt{9 - \left(x - 3\right)^{2}} \left(x - 3\right)}{2} + \frac{9 \operatorname{asin}{\left(\frac{x}{3} - 1 \right)}}{2}+C$$

Answer

$$$\int \sqrt{- x^{2} + 6 x}\, dx = \left(\frac{\sqrt{9 - \left(x - 3\right)^{2}} \left(x - 3\right)}{2} + \frac{9 \operatorname{asin}{\left(\frac{x}{3} - 1 \right)}}{2}\right) + C$$$A