Filter löschen
Filter löschen

solving for a single unknown variable(non-linear equation)

1 Ansicht (letzte 30 Tage)
shunmugam hemalatha
shunmugam hemalatha am 17 Mär. 2020
Kommentiert: Ameer Hamza am 18 Mär. 2020
E=0.0313; E^2=0.00098; E^3=0.00003;
d=5000; K=100; h=5; lamda=0.5; C=25; S=50; P=0.05;
a=1-E;
b=((2*y)+(y*E)+1))^2;
y=(1/a)*(1/b)*((2*d*S)-(2*d*C)-(2*d*lamda)+(4*D*K)+(2*d*K*E)-(2*h*y^2)+(2*h*y^2*E^2)-(h*y^2*E)+(h*y^2*E^3)-(2*h*y)+(2*h*y*E^2);

Antworten (1)

Ameer Hamza
Ameer Hamza am 17 Mär. 2020
Bearbeitet: Ameer Hamza am 17 Mär. 2020
You need to use fsolve to solve such an equation. First, define a function handle and then use fsolve
E=0.0313;
d=5000; K=100; h=5; lamda=0.5; C=25; S=50; P=0.05;
a=1-E;
b=@(y) ((2*y)+(y*E)+1)^2;
f = @(y) y - (1/a)*(1/b(y))*((2*d*S)-(2*d*C)-(2*d*lamda)+(4*d*K)+(2*d*K*E)-(2*h*y^2)+(2*h*y^2*E^2)-(h*y^2*E)+(h*y^2*E^3)-(2*h*y)+(2*h*y*E^2));
y_solution = fsolve(f, 0);
  2 Kommentare
shunmugam hemalatha
shunmugam hemalatha am 18 Mär. 2020
Thankyou Mr. Ameer Hamza for your response.But still I could't find the solution. Will you please, suggest some other codings.
Ameer Hamza
Ameer Hamza am 18 Mär. 2020
Why do you think the solution is incorrect? Check the value of y_solution.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Mathematics 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!

Translated by