Integral of $$$\sqrt{x^{2} - 2 x + 5}$$$
Related calculator: Definite and Improper Integral Calculator
Your Input
Find $$$\int \sqrt{x^{2} - 2 x + 5}\, dx$$$.
Solution
Complete the square (steps can be seen »): $$$x^{2} - 2 x + 5 = \left(x - 1\right)^{2} + 4$$$:
$${\color{red}{\int{\sqrt{x^{2} - 2 x + 5} d x}}} = {\color{red}{\int{\sqrt{\left(x - 1\right)^{2} + 4} d x}}}$$
Let $$$u=x - 1$$$.
Then $$$du=\left(x - 1\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{\left(x - 1\right)^{2} + 4} d x}}} = {\color{red}{\int{\sqrt{u^{2} + 4} d u}}}$$
Let $$$u=2 \sinh{\left(v \right)}$$$.
Then $$$du=\left(2 \sinh{\left(v \right)}\right)^{\prime }dv = 2 \cosh{\left(v \right)} dv$$$ (steps can be seen »).
Also, it follows that $$$v=\operatorname{asinh}{\left(\frac{u}{2} \right)}$$$.
Therefore,
$$$\sqrt{ u ^{2} + 4} = \sqrt{4 \sinh^{2}{\left( v \right)} + 4}$$$
Use the identity $$$\sinh^{2}{\left( v \right)} + 1 = \cosh^{2}{\left( v \right)}$$$:
$$$\sqrt{4 \sinh^{2}{\left( v \right)} + 4}=2 \sqrt{\sinh^{2}{\left( v \right)} + 1}=2 \sqrt{\cosh^{2}{\left( v \right)}}$$$
$$$2 \sqrt{\cosh^{2}{\left( v \right)}} = 2 \cosh{\left( v \right)}$$$
Integral can be rewritten as
$${\color{red}{\int{\sqrt{u^{2} + 4} d u}}} = {\color{red}{\int{4 \cosh^{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=4$$$ and $$$f{\left(v \right)} = \cosh^{2}{\left(v \right)}$$$:
$${\color{red}{\int{4 \cosh^{2}{\left(v \right)} d v}}} = {\color{red}{\left(4 \int{\cosh^{2}{\left(v \right)} d v}\right)}}$$
Apply the power reducing formula $$$\cosh^{2}{\left(\alpha \right)} = \frac{\cosh{\left(2 \alpha \right)}}{2} + \frac{1}{2}$$$ with $$$\alpha= v $$$:
$$4 {\color{red}{\int{\cosh^{2}{\left(v \right)} d v}}} = 4 {\color{red}{\int{\left(\frac{\cosh{\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)} = \cosh{\left(2 v \right)} + 1$$$:
$$4 {\color{red}{\int{\left(\frac{\cosh{\left(2 v \right)}}{2} + \frac{1}{2}\right)d v}}} = 4 {\color{red}{\left(\frac{\int{\left(\cosh{\left(2 v \right)} + 1\right)d v}}{2}\right)}}$$
Integrate term by term:
$$2 {\color{red}{\int{\left(\cosh{\left(2 v \right)} + 1\right)d v}}} = 2 {\color{red}{\left(\int{1 d v} + \int{\cosh{\left(2 v \right)} d v}\right)}}$$
Apply the constant rule $$$\int c\, dv = c v$$$ with $$$c=1$$$:
$$2 \int{\cosh{\left(2 v \right)} d v} + 2 {\color{red}{\int{1 d v}}} = 2 \int{\cosh{\left(2 v \right)} d v} + 2 {\color{red}{v}}$$
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}$$$.
The integral becomes
$$2 v + 2 {\color{red}{\int{\cosh{\left(2 v \right)} d v}}} = 2 v + 2 {\color{red}{\int{\frac{\cosh{\left(w \right)}}{2} d w}}}$$
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)} = \cosh{\left(w \right)}$$$:
$$2 v + 2 {\color{red}{\int{\frac{\cosh{\left(w \right)}}{2} d w}}} = 2 v + 2 {\color{red}{\left(\frac{\int{\cosh{\left(w \right)} d w}}{2}\right)}}$$
The integral of the hyperbolic cosine is $$$\int{\cosh{\left(w \right)} d w} = \sinh{\left(w \right)}$$$:
$$2 v + {\color{red}{\int{\cosh{\left(w \right)} d w}}} = 2 v + {\color{red}{\sinh{\left(w \right)}}}$$
Recall that $$$w=2 v$$$:
$$2 v + \sinh{\left({\color{red}{w}} \right)} = 2 v + \sinh{\left({\color{red}{\left(2 v\right)}} \right)}$$
Recall that $$$v=\operatorname{asinh}{\left(\frac{u}{2} \right)}$$$:
$$\sinh{\left(2 {\color{red}{v}} \right)} + 2 {\color{red}{v}} = \sinh{\left(2 {\color{red}{\operatorname{asinh}{\left(\frac{u}{2} \right)}}} \right)} + 2 {\color{red}{\operatorname{asinh}{\left(\frac{u}{2} \right)}}}$$
Recall that $$$u=x - 1$$$:
$$\sinh{\left(2 \operatorname{asinh}{\left(\frac{{\color{red}{u}}}{2} \right)} \right)} + 2 \operatorname{asinh}{\left(\frac{{\color{red}{u}}}{2} \right)} = \sinh{\left(2 \operatorname{asinh}{\left(\frac{{\color{red}{\left(x - 1\right)}}}{2} \right)} \right)} + 2 \operatorname{asinh}{\left(\frac{{\color{red}{\left(x - 1\right)}}}{2} \right)}$$
Therefore,
$$\int{\sqrt{x^{2} - 2 x + 5} d x} = \sinh{\left(2 \operatorname{asinh}{\left(\frac{x}{2} - \frac{1}{2} \right)} \right)} + 2 \operatorname{asinh}{\left(\frac{x}{2} - \frac{1}{2} \right)}$$
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} - 2 x + 5} d x} = 2 \left(\frac{x}{2} - \frac{1}{2}\right) \sqrt{\left(\frac{x}{2} - \frac{1}{2}\right)^{2} + 1} + 2 \operatorname{asinh}{\left(\frac{x}{2} - \frac{1}{2} \right)}$$
Simplify further:
$$\int{\sqrt{x^{2} - 2 x + 5} d x} = \frac{\left(x - 1\right) \sqrt{\left(x - 1\right)^{2} + 4}}{2} + 2 \operatorname{asinh}{\left(\frac{x}{2} - \frac{1}{2} \right)}$$
Add the constant of integration:
$$\int{\sqrt{x^{2} - 2 x + 5} d x} = \frac{\left(x - 1\right) \sqrt{\left(x - 1\right)^{2} + 4}}{2} + 2 \operatorname{asinh}{\left(\frac{x}{2} - \frac{1}{2} \right)}+C$$
Answer
$$$\int \sqrt{x^{2} - 2 x + 5}\, dx = \left(\frac{\left(x - 1\right) \sqrt{\left(x - 1\right)^{2} + 4}}{2} + 2 \operatorname{asinh}{\left(\frac{x}{2} - \frac{1}{2} \right)}\right) + C$$$A