Having trouble to solve equations

1 view (last 30 days)
E=1.42;
x=sym('x%d',[1,3]);
a=((E+x(1))*0.1+(-x(2)-7*x(3))*(((E+x(1))*(E+x(1))*(E+x(1))*(E+x(1)))/(((E+x(1))*(E+x(1))*(E+x(1))*(E+x(1)))+1)))*(1-x(1))-0.1*x(1);
b=((1+x(2))*0.1+x(1)*(((1+x(2))*(1+x(2))*(1+x(2))*(1+x(2)))/(((1+x(2))*(1+x(2))*(1+x(2))*(1+x(2)))+1)))*(1-x(2))-0.1*x(2);
c=((1+x(3))*0.1+23*x(1)*(((1+x(3))*(1+x(3))*(1+x(3))*(1+x(3)))/(((1+x(3))*(1+x(3))*(1+x(3))*(1+x(3)))+1)))*(1-x(3))-0.1*x(3);
[solutions_x1, solutions_x2, solutins_x3] = solve(a == 0, b == 0, c == 0, x(1), x(2), x(3))
This is the code that I am trying to run in order to find the respective solutions but MATLAB is taking forever to give an answer. May I know how to find the solutions in MATLAB? Can anyone help me out?

Accepted Answer

madhan ravi
madhan ravi on 19 May 2019
E=1.42;
F=@(x)[((E+x(1))*0.1+(-x(2)-7*x(3))*(((E+x(1))*(E+x(1))*(E+x(1))*(E+x(1)))/(((E+x(1))*(E+x(1))*(E+x(1))*(E+x(1)))+1)))*(1-x(1))-0.1*x(1);
((1+x(2))*0.1+x(1)*(((1+x(2))*(1+x(2))*(1+x(2))*(1+x(2)))/(((1+x(2))*(1+x(2))*(1+x(2))*(1+x(2)))+1)))*(1-x(2))-0.1*x(2);
((1+x(3))*0.1+23*x(1)*(((1+x(3))*(1+x(3))*(1+x(3))*(1+x(3)))/(((1+x(3))*(1+x(3))*(1+x(3))*(1+x(3)))+1)))*(1-x(3))-0.1*x(3)];
x=fsolve(F,[0;0;0])
  3 Comments
madhan ravi
madhan ravi on 20 May 2019
Try changing the initial guess.
Debanita Das
Debanita Das on 21 May 2019
Thank you Sir for your response
It worked. Thank you for your hep.

Sign in to comment.

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!