8,9

The base of the triangular pyramid $A B C D$ is the triangle $A B C$, in which $\angle A=\frac{\pi}{2}, \angle C=\frac{\pi}{6}, B C=2 \sqrt{2}$. The edges $A D, B D, C D$ are equal to each other. A sphere of radius 1 touches the edges $A D, B D$, the extension of the edge $C D$ beyond point $D$, and the plane $A B C$. Find the segment of the tangent drawn from point $A$ to the sphere.
## First Method

Since the lateral edges $D A, D B$, and $D C$ of the triangular pyramid $A B C D$ are equal, its height, drawn from vertex $D$, passes through the center $H$ of the circumscribed circle around the base $A B C$. Since triangle $A B C$ is a right triangle, point $H$ is the midpoint of its hypotenuse $B C$. Additionally, the plane of the face $B C D$ is perpendicular to the plane of the base of the pyramid because it passes through the perpendicular $D H$ to this plane. Let a sphere with center $O$ and radius 1 touch the plane of the base $A B C$ at point $M$, and the lines $D C, D A$, and $D B$ at points $P, Q$, and $R$ respectively. Consider the section of the sphere by the plane of the face $B C D$. We obtain a circle with center at some point $O 1$, inscribed in the angle $P D R$. Since triangle $B D C$ is isosceles, the bisector of its external angle $P D R$ at the vertex is parallel to the base $B C$. Therefore, the line $D O 1$ is parallel to the plane of the base of the pyramid. Let $F$ be the orthogonal projection of point $O 1$ onto the line $B C$. Then $O 1 F$ is a perpendicular to the plane of the base $A B C$, and since $O O 1$ is a perpendicular to the plane of the face $B C D$, we have $D H=O 1 F=O M=1$. From the right triangle $B H D$, we find that

$$
D B=\sqrt{D H^{2}+B H^{2}}=\sqrt{1+2}=\sqrt{3} \text {. }
$$

Let $A M=x$. Then $A Q=A M=x$ as segments of tangents drawn from point $A$ to the sphere. Therefore,

$$
\begin{gathered}
D R=D Q=D A-A Q=\sqrt{3}-x \\
B M=B R=D B-D R=\sqrt{3}-(\sqrt{3}-x)=x \\
D P=D R=\sqrt{3}-x
\end{gathered}
$$

From the equality $M A=M B$, it follows that point $M$ lies on the perpendicular bisector of side $A B$ of triangle $A B C$, i.e., on the midline $H E$ of this triangle or on its extension. Then either $M H=E H+E M$ or $M H=E H-E M$. In the first case, we have:

$$
\begin{gathered}
M H=O D=\sqrt{O P^{2}+D P^{2}}=\sqrt{1+(\sqrt{3}-x)^{2}}=\sqrt{x^{2}-2 x \sqrt{3}+4} \\
E H=\frac{1}{2} A C=\frac{1}{2} B C \cos 30^{\circ}=\frac{\sqrt{6}}{2} \\
E M=\sqrt{A M^{2}-A E^{2}}=\sqrt{x^{2}-\left(\frac{\sqrt{2}}{2}\right)^{2}}=\sqrt{x^{2}-\frac{1}{2}} \\
\sqrt{x^{2}-2 x \sqrt{3}+4}=\sqrt{x^{2}-\frac{1}{2}}+\frac{\sqrt{6}}{2}
\end{gathered}
$$

From the obtained equation, we find that $x=\sqrt{3}-1$. In the second case,

$$
\sqrt{x^{2}-2 x \sqrt{3}+4}=\frac{\sqrt{6}}{2}-\sqrt{x^{2}-\frac{1}{2}}
$$

The roots of this equation do not satisfy the condition of the problem.

## Second Method

Since the lateral edges $D A, D B$, and $D C$ of the triangular pyramid $A B C D$ are equal, its height, drawn from vertex $D$, passes through the center $H$ of the circumscribed circle around the base $A B C$. Since triangle $A B C$ is a right triangle, point $H$ is the midpoint of its hypotenuse $B C$. Additionally, the plane of the face $B C D$ is perpendicular to the plane of the base of the pyramid because it passes through the perpendicular $D H$ to this plane. Let a sphere with center $O$ and radius 1 touch the plane of the base $A B C$ at point $M$, and the lines $D C, D A$, and $D B$ at points $P, Q$, and $R$ respectively. Consider the section of the sphere by the plane of the face $B C D$. We obtain a circle with center at some point $O 1$, inscribed in the angle $P D R$. Since triangle $B D C$ is isosceles, the bisector of its external angle $P D R$ at the vertex is parallel to the base $B C$. Therefore, the line $D O 1$ is parallel to the plane of the base of the pyramid. Let $F$ be the orthogonal projection of point $O 1$ onto the line $B C$. Then $O 1 F$ is a perpendicular to the plane of the base $A B C$, and since $O O 1$ is a perpendicular to the plane of the face $B C D$, we have $D H=O 1 F=O M=1$. From the right triangle $B H D$, we find that

$$
D B=\sqrt{D H^{2}+B H^{2}}=\sqrt{1+2}=\sqrt{3}
$$

The segments of tangents drawn from one point to the sphere are equal, so

$$
D R=D P=D Q, A M=A Q=D A-D Q, B M=B R=B D-D R
$$

Therefore, $A M=B M$. Hence, point $M$ lies on the perpendicular bisector of side $A B$ of triangle $A B C$, i.e., on the midline $H E$ of this triangle or on its extension. Thus, $M H \| A C$. The sides of the isosceles triangle $A D C$ are equal to $\sqrt{3}, \sqrt{3}$, and $\sqrt{6}$. Therefore, this triangle is a right triangle, with $\angle A C D=45^{\circ}$. Since $O D\|M H\| A C, \angle O D P=\angle A C D=45^{\circ}$. Therefore, $D Q=D P=1$. Consequently, $A M=A Q=A D-D Q=\sqrt{3}$. 1.

## Answer

$\sqrt{3}-1$.