Solving system of 2 non linear equations
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Matteo Canestri
am 11 Jan. 2023
Kommentiert: Matteo Canestri
am 12 Jan. 2023
Good evening everyone,
I must solve this system of two non linear equations:
0.00014/(3.85E-05*cos((x-y)*0.006))-(0.196*0.026*tan((x-y)*0.0062)*tanh(x*0.026))/0.006+0.196-0.00014/3.85E-05=2.0051
2.005+(y-300)*((y-300)*6.31E-05/2-((0.196*3.85E-05-0.00014)*sin((x-y)*0.0062))/0.0062+0.196*0.026*cos((x-y)*0.0062)*tanh(x*0.026))=2.9905
What is the best approach to obtain a solution? I know that x and y should be in the range of (0,300), and x is lower than y.
Thanks in advance
1 Kommentar
Alex Sha
am 12 Jan. 2023
if x and y are limited in the range of [0,300], the result will be:
x: 106.852495887777
y: 221.905657509353
Akzeptierte Antwort
Paul
am 12 Jan. 2023
syms x y real
eq1 = 0.00014/(3.85E-05*cos((x-y)*0.006))-(0.196*0.026*tan((x-y)*0.0062)*tanh(x*0.026))/0.006+0.196-0.00014/3.85E-05 == 2.0051;
eq2 = 2.005+(y-300)*((y-300)*6.31E-05/2-((0.196*3.85E-05-0.00014)*sin((x-y)*0.0062))/0.0062+0.196*0.026*cos((x-y)*0.0062)*tanh(x*0.026)) == 2.9905;
sol = vpasolve([eq1,eq2],[x y],[0 300;0 300])
% verify
vpa(subs(lhs([eq1;eq2]),sol)-rhs([eq1;eq2]))
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Numbers and Precision 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!