2. Let the function $f(x)$ have the domain $(0,+\infty)$, and satisfy $f(x)-2 x f\left(\frac{1}{x}\right)+x^{2}=0$, then the minimum value of $f(x)$ is
$$
\left\{\begin{array}{l}
f(x)-2 x f\left(\frac{1}{x}\right)=-x^{2}, \\
f\left(\frac{1}{x}\right)-\frac{2}{x} f(x)=-\frac{1}{x^{2}}
\end{array} \Rightarrow 3 f(x)=x^{2}+\frac{2}{x} \Rightarrow f(x)=\frac{1}{3}\left(x^{2}+\frac{1}{x}+\frac{1}{x}\right) \geqslant 1,\right.
$$

The equality holds when $x=1$. Therefore, the minimum value of $f(x)$ is 1.