4.1. Solve the equation $\left(x^{2}-2 x+4\right)^{x^{2}-2 x+3}=625$. In the answer, specify the sum of the squares of all its roots. If there are no roots, put 0.
Answer: 6. Solution. Since $x^{2}-2 x+3>0$, then $x^{2}-2 x+4>1$. The function $f(z)=z^{z-1}$ is increasing for $z>1$ (if $1<z_{1}<z_{2}$, then $f\left(z_{1}\right)=z_{1}^{z_{1}-1}<z_{1}^{z_{2}-1}<z_{2}^{z_{2}-1}=f\left(z_{2}\right)$. Therefore, the original equation, which is of the form $f\left(x^{2}-2 x+4\right)=f(5)$, is equivalent to the equation $x^{2}-2 x+4=5$. From this, $x=1 \pm \sqrt{2}$. The sum of the squares of the roots of the equation is $(1+\sqrt{2})^{2}+(1-\sqrt{2})^{2}=6$.