How can I find a correct value of the guess for my system of non linear equations ??

조회 수: 2 (최근 30일)
kamal kiki
kamal kiki 2012년 2월 15일
답변: Alex Sha 2020년 1월 8일
I want to solve the following system of 3 non linear equations using fsolve.The unknowns to be found are X , Y and Z.
X-241.4*[(1.919*10^-8)*Y^1.429-(5.492*10^-10)*Y^1.714]^(1/2)=0
X*(3.121*10^5)+42.29-X*Z*1117-2.482*Z=0
X+0.002222-0.001976*Y*Z^(-1/2)=0
In order to solve this system using fsolve I have to enter a value of a guess for the values of X , Y and Z.
Please is there any way of finding a correct guess for this system ????
When I run fsolve with a random guess, I receive the message
Maximum number of function evaluations reached:
increase options.MaxFunEvals.

답변 (2개)

Walter Roberson
Walter Roberson 2012년 2월 15일
You can use the first equation to isolate X in terms of Y. Substitute that X in to the second equation and then you can isolate Z in terms of Y. Substitute the X and Z in to the third equation to get an expression for Y. You can then work on just that expression in one variable.
When the floating point coefficients are converted to rational form, the expression for Y contains as a repeated sub-expression sqrt(56414126863825657569157648*Y^(1429/1000)-1614519984922625768635418*Y^(857/500)) . You can solve() this for Y and take the larger of the two solutions (the smaller is 0) and use that as an initial guess for your fsolve(). The actual solution is reasonably close by.
  댓글 수: 1
kamal kiki
kamal kiki 2012년 2월 16일
Hi Walter Roberson
Can you please explain more the second part of your answer (starting from the floating point coefficients ), because I understood only the first part of your answer.

댓글을 달려면 로그인하십시오.


Alex Sha
Alex Sha 2020년 1월 8일
it is not easy to get correct initial start values, try to use global optimization algorithm instead of local ones like fsolve, refer to solution below:
x: 29.1663547800969
y: 246736.308525207
z: 279.389144571331

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by