Nonlinear 3 equations 3 unknowns , hyperbolic, fsolve stopped because the last step was ineffective
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
fredo ferdian
am 12 Jun. 2016
Kommentiert: fredo ferdian
am 12 Jun. 2016
I have 3 equations and 3 unknowns (x(1), x(2), and x(3)) which expressed in my objective function below:
function F2=F2(x)
F2(1)= 210+x(1)*asinh((sqrt((100^2/(x(1))^2)+(2*100/(x(1))))))-sqrt(100^2+2*x(1)*100)-x(3)
F2(2)= 210+x(2)*asinh((sqrt((100^2/(x(2))^2)+(2*100/(x(2))))))-sqrt(100^2+2*x(2)*100)+x(3)
F2(3)= 100000-981*x(1)+981*x(2)
end
then I recalled my initial guess of x(1) ; x(2); x(3) and try to solve it by this script in command window:
x0 = [150,5,15];
x = fsolve(@Obj,x0,optimset('disp','iter','LargeScale','off','TolFun',.01,'MaxFunEvals',1E5,'MaxIter',1E5))
but I got this following error message
No solution found.
fsolve stopped because the last step was ineffective. However, the vector of function
values is not near zero, as measured by the selected value of the function tolerance.
Anybody could give me some suggestion? I'm quite new in programming. and I did triple check about those three equation itself. Still no idea how I should approach this problem.
Regards,
Fredo Ferdian
0 Kommentare
Akzeptierte Antwort
Roger Stafford
am 12 Jun. 2016
Bearbeitet: Roger Stafford
am 12 Jun. 2016
It is relatively easy to convert your three equations in three unknowns into a single equation in a single unknown. That would allow you to make a plot of the single equation’s expression as a function of the single unknown and determine visually the approximate point or points at which the curve crosses zero (assuming that ever happens.)
Add F2(1) and F2(2), which eliminates x(3). Then in F2(3) you can easitly solve for x(2) in terms of x(1) and substitute that for x(2) in the F2(2) expression. Now you are down to a single equation and the single unknown x(1). You can use ‘fzero’ to solve for it using the approximation(s) suggested from the plot. Once it is determined, it is then easy to find x(2) and x(3).
3 Kommentare
Roger Stafford
am 12 Jun. 2016
Bearbeitet: Roger Stafford
am 12 Jun. 2016
I assume you are looking for real-valued solutions, (as opposed to complex-valued ones.) If so, in order to avoid complex numbers, you must have x(2) >= -50 because of the expression
sqrt(100^2+2*x(2)*100) = 10*sqrt(2)*sqrt(50+x(2))
and also because of the expression
sqrt(100^2/x(2)^2+2*100/x(2)) =
10*sqrt(2)*sqrt((50+x(2))/x(2)^2)
Subject to this restriction I plotted the value F2(1)+F2(2) as a function of x(2) and its value never goes below 256, so, in particular, it doesn’t cross zero. That means there are no real-valued solutions to your equations.
If this is based on a real-life problem, presumably there has been some error in putting it into mathematical form. You had better review your thinking on these equations.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!