# Analytical solution of system of non-linear equations

I need to analytically solve this system of non-linear equations: $$\begin{cases} x + (y-1)^2 + 2z^2 = 10 \\ x^2 + y^2 + 3z = 28 \\ 2x + y + z = 12 \end{cases}$$ I solve this system numerically with Gradient Descent method and with different initial approximations obtained the following solutions: $$\begin{array}{c|lll} \text{1} & x = 4 & y = 3 & z = 1 \\ \hline \text{2} & x \approx 4.75151 & y \approx 0.94466 & z \approx 1.62509 \end{array}$$ I tested the solutions with different software, such as Wolfram and Python libraries, and they gave about the same result.

But no matter how I try to solve a seemingly simple system analytically, I can't do it, because the solutions are too complicated. Perhaps I am doing something wrong, and I would be glad to get even if not a solution, at least tips on how to find it.

Thanks!

• @gpmath, thank you for answer! This solution seemed strange to me and I decided to double-check the system. I made a small mistake by forgetting the degree in first equation, sorry. Apr 30, 2023 at 13:09
• Your solution 2 is wrong, correct is $\{x\to 4.715115361323142,y\to 0.9446809049263751,z\to 1.625088372427342\}$ Apr 30, 2023 at 13:12
• Exact form for $x\approx 4.715115361323142$: wolframalpha.com/… Apr 30, 2023 at 13:19
• @gpmath Yes, y has accuracy problems, thanks for the note, but this is more about the my implementation of the numerical method of solving the system, not about an analytical solution Apr 30, 2023 at 13:23
• @Chonk The exact analytic solution is given in my link above. It is the root of cubic polynomial with integer coefficients Apr 30, 2023 at 13:37

$$(3)$$ gives $$z=-2 x-y+12$$
$$3 \times (2)-(1)$$ gives $$y=\frac{-5 x^2+77 x-255}{8 x-41}$$
Plug in $$(1)$$ to obtain $$\frac{3 (x-4) \left(89 x^3-1334 x^2+6809 x-11777\right)}{(8 x-41)^2}=0$$
Solbing the cubic equation using the hyperbolic solution for only one real root gives $$x=\frac{2}{267} \left(667-\sqrt{38447} \sinh \left(\frac{1}{3} \sinh^{-1}\left(\frac{9080939}{76894 \sqrt{38447}}\right)\right)\right)$$ which is $$4.7151153613231415366265466208961077638519627948872$$