3. Given the equation in terms of $x$
$$
\frac{1}{|x|}+x^{2}=2 x+\frac{3|x|}{x} \text {. }
$$

The number of real solutions to this equation is ( ).
(A) 1
(B) 2
(C) 3
(D) 4
3. B.

From the original equation, it is easy to know that $x>0$. Then the original equation can be transformed into
$$
\begin{array}{l}
\frac{1}{x}=-x^{2}+2 x+3 . \\
\text { Let } f(x)=\frac{1}{x}, g(x)=-x^{2}+2 x+3 .
\end{array}
$$

Obviously, $f(1)=1<4=g(1)$.