Solving system of 2 non linear equations

3 Ansichten (letzte 30 Tage)
Matteo Canestri
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
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

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Paul
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])
sol = struct with fields:
x: 106.85249588777741184146319523654 y: 221.90565750935273789837170961006
% verify
vpa(subs(lhs([eq1;eq2]),sol)-rhs([eq1;eq2]))
ans = 

Weitere Antworten (0)

Produkte


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by