20. Given
$$
f(x)=\left\{\begin{array}{ll}
\sqrt{2 x+1}, & -\frac{1}{2} \leqslant x<0 ; \\
\frac{\mathrm{e}^{x}+\mathrm{e}^{-x}}{2}, & x \geqslant 0 .
\end{array}\right.
$$

Then $f^{-1}(x)=$ $\qquad$ .
20. $\left\{\begin{array}{ll}\frac{x^{2}-1}{2}, & 0 \leqslant x<1 ; \\ \ln \left(x+\sqrt{x^{2}-1}\right), & x \geqslant 1 .\end{array}\right.$

When $-\frac{1}{2} \leqslant x<0$, we have $y=\sqrt{2 x+1}$, then $0 \leqslant y<1$, solving for $x$ gives $x=\frac{y^{2}-1}{2}$;

When $x \geqslant 0$, we have $y=\frac{\mathrm{e}^{x}+\mathrm{e}^{-x}}{2}$. Then $y \geqslant 1$, solving for $\mathrm{e}^{x}$ gives $\mathrm{e}^{x}=$ $y+\sqrt{y^{2}-1}$, i.e., $x=\ln \left(y+\sqrt{y^{2}-1}\right)$.
Therefore, $f^{-1}(x)=\left\{\begin{array}{ll}\frac{x^{2}-1}{2}, & 0 \leqslant x<1 ; \\ \ln \left(x+\sqrt{x^{2}-1}\right), & x \geqslant 1 .\end{array}\right.$