# How to solve 4 non linear equations with 5 unknowns using least square method

4 views (last 30 days)
AMBILY P N on 12 Oct 2021
Answered: John D'Errico on 13 Oct 2021
Hi..I have 4 nonlinear equations with 5 unknowns and initial values. Using least square method followed by Newton Raphson is it possible to solve this.

Matt J on 13 Oct 2021
There are probably going to be infinite solutions, but you can use fsolve() to find one of them.

John D'Errico on 13 Oct 2021
You have an under-determined problem. If any solution exists, then there will be infinitely many solutions. (This is the case in general. There will be specific cases where that is not true.)
The point about infinitely many solutions is that any of those solutions will be exact, and so any one solution will be no better than any other solution. With 5 degrees of freedom here, you just have too much flexibility.
Can you find a solution? Of course. As suggested by Matt J, use a tool like fsolve. The solution it arrives at will be completely determined by your choice of starting values.
Think of a curved path through your 5-dimensional parameter space. Every point along that path will be a solution, equally good. Of couse, since the problem is a nonlinear one, that path generally cannot be described using any simple algebraic form. You can find individual points along the path (again using fsolve), but nothing more than that. And of course, that curved path can be rather nasty in terms of its shape. You may even have multiple disjoint such paths.