# Solution to system of non linear equations

what is the best way to solve this system of equations:

$$ax^2 +by^2-2y=0$$ $$axy+byz-z=0$$ $$ay^2+bz^2-c=0$$ Solve for x,y,z where a,b,c are constants.

• Are you sure of the second equation ? Commented May 2, 2016 at 8:10
• "best way" in what sense ?
– user65203
Commented May 2, 2016 at 8:11
• @ClaudeLeibovici sorry made a typo. Edited.
– saak
Commented May 2, 2016 at 8:11
• @YvesDaoust Easiest. Also would best great to know if there is procedure to approach such problems.
– saak
Commented May 2, 2016 at 8:12

Extract $y$ from the second equation to get $$y=\frac{z}{a x+b z}$$ Plug in the third equation which is a quadratic in $x$; the solutions are $$x_{\pm}=\frac{\pm\sqrt{a^3 c z^2-a^3 b z^4}-a b^2 z^3+a b c z}{a^2( b z^2- c)}$$ You are left with a nasty equation in $z$ using the first equation.

I suppose that you have four sets of solutions.

Have fun !

From the second equation,

$$x=\frac{1-by}{ay}z.$$

Plug this in the first,

$$\frac{(1-by)^2}{ay^2}z^2+by^2-2y=0.$$

Then you can eliminate $z^2$ with the third, giving

$$\frac{ay^2(2y-by^2)}{(1-by)^2}=\frac{c-ay^2}b,$$ and by magic the equation simplifies to $$(a-cb^2)y^2+2bcy-c=0.$$

Now the problem has turned to the resolution of a quadratic equation in a single unknown. There are at most two real solutions in $y$. $z$ and $x$ easily follow from $y$, for a total of four distinct solution sets.

Generally speaking, you can address such problems by putting the system in a triangular form, leading to higher degree univariate polynomials. (The degree reflects the number of possible solutions.) Good root-finding numerical methods are available.

There are systematic approaches (involving Gröbner bases), https://en.wikipedia.org/wiki/System_of_polynomial_equations, but this remains a difficult topic.

• Shouldn't it be (c-ay^2)/b when we substitute z^2?
– saak
Commented May 2, 2016 at 8:52
• @Akhilesh1990: quite right. I am fixing the typo.
– user65203
Commented May 2, 2016 at 8:55
• Much better than my junk ! Commented May 2, 2016 at 8:55
• Thank you so much! this was very helpful. @YvesDaoust
– saak
Commented May 2, 2016 at 9:01
• @ClaudeLeibovici: yep, leaving radicals called for trouble. And then it turns out that the problem is quite tractable :)
– user65203
Commented May 2, 2016 at 9:02