Three nonlinear equation with initial guess

10 vues (au cours des 30 derniers jours)
Nihal Yilmaz
Nihal Yilmaz le 6 Juin 2022
Commenté : MOSLI KARIM le 12 Août 2022
How can I solve this question? Please help me, Thank you.
equations are
-0.06*(x^2)-1.06*(z^2)+3.18*x+3.18*z+1.59*y-2.06*x*y-3.12*x*z-2.385-1.06*y*z=0
2.63*(x^2)-1.63*(y^2)-2.63*(z^2)-3.945*x+3.945*y+3.945*z-4.76*y*z=0
z-7.5*y+5x*y+5*y*z=0
initial guess x=y=z=0
x=?
y=?
z=?
  1 commentaire
MOSLI KARIM
MOSLI KARIM le 12 Août 2022
function bvp_prb14
tspan=[0; 15];
y0=[0;0;0];
[t,x]=ode45(@fct,tspan,y0)
X=x(:,1) %%% x solution
Y=x(:,2) %%% YOUR Y
Z=x(:,3) %%%YOUR Z
table(X,Y,Z)
function yp=fct(t,x)
yp=[-0.06*(x(1)^2)-1.06*(x(3)^2)+3.18*x(1)+3.18*x(3)+1.59*x(2)-2.06*x(1)*x(2)-3.12*x(1)*x(3)-2.385-1.06*x(2)*x(3);
2.63*(x(1)^2)-1.63*(x(2)^2)-2.63*(x(3)^2)-3.945*x(1)+3.945*x(2)+3.945*x(3)-4.76*x(2)*x(3);
x(3)-7.5*x(2)+5*x(1)*x(2)+5*x(2)*x(3)];
end
end

Connectez-vous pour commenter.

Réponses (3)

Torsten
Torsten le 6 Juin 2022
fun = @(x,y,z)[-0.06*(x^2)-1.06*(z^2)+3.18*x+3.18*z+1.59*y-2.06*x*y-3.12*x*z-2.385-1.06*y*z;2.63*(x^2)-1.63*(y^2)-2.63*(z^2)-3.945*x+3.945*y+3.945*z-4.76*y*z;z-7.5*y+5*x*y+5*y*z];
u0=[0; 0; 0];
[sol,fval]=fsolve(@(u)fun(u(1),u(2),u(3)),u0)
Equation solved. fsolve completed because the vector of function values is near zero as measured by the value of the function tolerance, and the problem appears regular as measured by the gradient.
sol = 3×1
0.7079 0.1909 0.3868
fval = 3×1
1.0e-10 * -0.0873 0.4509 0.4931

Bjorn Gustavsson
Bjorn Gustavsson le 6 Juin 2022
Have a look at the help and documentation of fsolve. That should be the function for this task
HTH

Walter Roberson
Walter Roberson le 6 Juin 2022
with the symbolic toolbox you can find 8 solutions including a complex conjugate pair. The real solutions are approximately
0.7079 0.1909 0.3868
0.0375 0.5366 1.0654
0.9235 -0.3927 1.1749
0.6229 -0.5919 1.3247
-0.4412 -3.4575 2.0604
0.0323 -0.6798 2.0795
As you start from 0,0,0 the implication is that negative components are valid

Catégories

En savoir plus sur Systems of Nonlinear Equations dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by