1143. Find the integrals:
1) $\int \sqrt{x^{2}-2 x-1} d x$
2) $\int \sqrt{5+4 x-x^{2}}$.
Solution. The integral $\int \sqrt{a x^{2}+b x+c} d x$ depending on the sign of the coefficient $a$ can be reduced to the integral $\int \sqrt{t^{2}+\sigma} d t$ or $\int \sqrt{\beta^{2}-t^{2}} d t$, each of which is calculated using trigonometric substitutions (see Remark § 3 and Example 15) or the method of integration by parts.

1) $I=\int \sqrt{x^{2}-2 x-1} d x=\int \sqrt{(x-1)^{2}-2} d x=\int \sqrt{t^{2}-2} d t$, where $t=x-1$. The last integral will be calculated using the method of integration by parts. Assuming $u=\sqrt{t^{2}-2}, d v=d t$, we have $d u=\frac{t}{\sqrt{t^{2}-2}} d t, v=t$, therefore,

$$
\begin{gathered}
I=t \sqrt{t^{2}-2}-\int t \frac{t}{\sqrt{t^{2}-2}} d t=t \sqrt{t^{2}-2}-\int \frac{t^{2}-2+2}{\sqrt{t^{2}-2}} d t= \\
=t \sqrt{\overline{t^{2}-2}}-\int \frac{t^{2}-2}{\sqrt{t^{2}-2}} d t-\int \frac{2}{\sqrt{t^{2}-2}} d t=t \sqrt{t^{2}-2}-I- \\
-2 \ln \left|t+\sqrt{t^{2}-2}\right|
\end{gathered}
$$

from which $2 I=t \sqrt{t^{2}-2}-2 \ln \left|t+\sqrt{t^{2}-2}\right|+2 C$ or

$$
I=\frac{t}{2} \sqrt{t^{2}-2}-\ln \left|t+\sqrt{t^{2}-2}\right|+C
$$

Considering that $t=x-1$, we get

$$
\begin{aligned}
& I=\frac{x-1}{2} \sqrt{x^{2}-2 x-1}-\ln \left|x-1+\sqrt{x^{2}-2 x-1}\right|+C \\
& \text { 2) } I=\int \sqrt{5+4 x-x^{2}} d x=\int \sqrt{9-(x-2)^{2}} d x=\int \sqrt{9-t^{2}} d t
\end{aligned}
$$

We apply the trigonometric substitution:

$$
\begin{aligned}
& t=3 \sin z, d t=3 \cos z d z \\
& I=\int \sqrt{9-9 \sin ^{2} z} 3 \cos z d z=9 \int \cos ^{2} z d z= \\
&=9 \int \frac{1+\cos 2 z}{2} d z=\frac{9}{2}\left(z+\frac{\sin 2 z}{2}\right)+C
\end{aligned}
$$

We transition to the variable $t$, and then to the variable $x$:

$$
\sin z=\frac{t}{3}, \quad z=\arcsin \frac{t}{3}
$$

$$
\sin 2 z=2 \sin z \cdot \cos z=2 \sin z \sqrt{1-\sin ^{2} z}=
$$

$$
=2 \cdot \frac{t}{3} \sqrt{1-\frac{t^{2}}{9}}=\frac{2}{9} t \sqrt{9-t^{2}}
$$

Substituting the found values of $z$ and $\sin 2 z$ into the equality (a), we have

$$
I=\frac{9}{2}\left(\arcsin \frac{t}{3}+\frac{t}{9} \sqrt{9-t^{2}}\right)+C
$$

Considering that $t=x-2$, we get

$$
I=\frac{1}{2}\left[9 \arcsin \frac{x-2}{3}+(x-2) \sqrt{5+4 x-x^{2}}\right]+C
$$

Find the integrals: