5. In $\triangle A B C$, $\angle B A C=90^{\circ}, A C=A B=4$, point $D$ is inside $\triangle A B C$, and $A D=\sqrt{2}$. Then the minimum value of $B D+C D$ is $\qquad$ .
$5.2 \sqrt{10}$.
With $A$ as the origin, lines $A B$ and $A C$ as the $x$-axis and $y$-axis respectively, establish a Cartesian coordinate system.
Let $D(x, y)$. Then $x^{2}+y^{2}=(\sqrt{2})^{2}=2$.
Let $x+y=s \leqslant 2$, then $x y=\frac{s^{2}-2}{2}$.
Therefore, $B D+C D$
$$
\begin{array}{l}
=\sqrt{(x-4)^{2}+y^{2}}+\sqrt{x^{2}+(y-4)^{2}} \\
=\sqrt{18-8 x}+\sqrt{18-8 y} \\
\geqslant 2 \sqrt[4]{(18-8 x)(18-8 y)} \\
=2 \sqrt[4]{4(9-4 x)(9-4 y)} \\
=2 \sqrt[4]{4\left(8 s^{2}-36 s+65\right)} \\
\geqslant 2 \sqrt[4]{4\left(8 \times 2^{2}-36 \times 2+65\right)} \\
=2 \sqrt[4]{4 \times 25}=2 \sqrt{10} .
\end{array}
$$

When $x=y=1$, the equality holds.
Therefore, the minimum value of $B D+C D$ is $2 \sqrt{10}$.