5. The maximum value of the algebraic expression $a \sqrt{2-b^{2}}+b \sqrt{2-a^{2}}$ is $\qquad$ .
5.2.

It is known that $|a| \leqslant \sqrt{2},|b| \leqslant \sqrt{2}$. Let
$$
a=\sqrt{2} \sin \alpha, b=\sqrt{2} \sin \beta, \alpha, \beta \in\left[-\frac{\pi}{2}, \frac{\pi}{2}\right] \text {. }
$$

Then $a \sqrt{2-b^{2}}+b \sqrt{2-a^{2}}$
$$
\begin{array}{l}
=2(\sin \alpha \cdot \cos \beta+\sin \beta \cdot \cos \alpha) \\
=2 \sin (\alpha+\beta) \leqslant 2 .
\end{array}
$$

Equality holds if and only if $\alpha+\beta=\frac{\pi}{2}$, i.e., $a^{2}+b^{2}=2, a, b \geqslant 0$.