4A. Solve the equation

$$
2^{|x|}-\cos y+\lg \left(1+x^{2}+|y|\right)=0
$$
The equation will be written in the form

$$
2^{|x|}+\lg \left(1+x^{2}+|y|\right)=\cos y
$$

For arbitrary $x, y \in \mathbb{R}$, we have $|x| \geq 0$ and $1+x^{2}+|y| \geq 1$, from which we obtain the inequalities $2^{|x|} \geq 1, \lg \left(1+x^{2}+|y|\right) \geq 0, \cos y \leq 1$ are true. Therefore,

$$
\cos y \leq 1 \leq 2^{|x|}+\lg \left(1+x^{2}+|y|\right)
$$

Equality is possible if and only if the initial and final expressions in (1) are equal to one, i.e.,

$$
\cos y=1 \text { and } 2^{|x|}+\lg \left(1+x^{2}+|y|\right)=1
$$

From the equation $\cos y=1$, we obtain that the solutions are $y=0+2 k \pi, k \in \mathbb{Z}$.

From the exact inequality $2^{|x|} \geq 1$ in the set of real numbers, for the equation

$$
2^{|x|}+\lg \left(1+x^{2}+|y|\right)=1
$$

we get

$$
\begin{gathered}
2^{|x|}=1 \\
\lg \left(1+x^{2}+|y|\right)=0
\end{gathered}
$$

The solution to (2) is $|x|=0$, i.e., $x=0$, and the solution to (3) when $x=0$ is $1+|y|=1$, i.e., $y=0$.

Finally, we obtain that the only solution to the original equation is $x=y=0$.