Solving system of nonlinear equation with boundary condition

1 visualización (últimos 30 días)
az
az el 4 de Oct. de 2019
Comentada: az el 7 de Oct. de 2019
Hello , I have a sys tem of 3 non linear equation for x, y, z with the boundary conditions. How can I solve them simultaneously please?
a = 1 ; b = 1 ; c = 1 ;
P = 4, Q = 10, R = 3;
% syms x y z
eq1 = ( x^2/(a^2 + P)) + ( y^2/(b^2 + P)) + ( z^2/(c^2 + P)) -1 == 0; for P > -c^2
eq2 = ( x^2/(a^2 + Q)) + ( y^2/(b^2 + Q)) + ( z^2/(c^2 + Q)) -1 == 0; for -c^2 < Q < -b^2
eq3 = ( x^2/(a^2 + R)) + ( y^2/(b^2 + R)) + ( z^2/(c^2 + R)) -1 == 0 : for -b^2 < R < -a^2
Thanks.
  2 comentarios
az
az el 5 de Oct. de 2019
Sorry the parameter will not be the same
a = 1 ; b = 5 ; c = 30 ;
P = 4; Q = 10; R = 3;
syms x y z
% function F = root3d(x)
eq1 = ( x^2/(a^2 + P)) + ( y^2/(b^2 + P)) + ( z^2/(c^2 + P)) -1 == 0; % for P > -c^2
eq2 = ( x^2/(a^2 + Q)) + ( y^2/(b^2 + Q)) + ( z^2/(c^2 + Q)) -1 == 0; % for -c^2 < Q < - b^2
eq3 = ( x^2/(a^2 + R)) + ( y^2/(b^2 + R)) + ( z^2/(c^2 + R)) -1 == 0 ; % for -b^2 < R < - a^2
az
az el 5 de Oct. de 2019
the correction in the boundary condition. the 3 equation are basically same it is the boundary condition that will determine what will be the value of x, y and z.
a = 1 ; b = 5 ; c = 30 ;
P = 4; Q = 10; R = 3;
syms x y z
% function F = root3d(x)
eq1 = ( x^2/(a^2 + P)) + ( y^2/(b^2 + P)) + ( z^2/(c^2 + P)) -1 == 0; % for P > -c^2
eq2 = ( x^2/(a^2 + Q)) + ( y^2/(b^2 + Q)) + ( z^2/(c^2 + Q)) -1 == 0; % for -c^2 > Q > -b^2
eq3 = ( x^2/(a^2 + R)) + ( y^2/(b^2 + R)) + ( z^2/(c^2 + R)) -1 == 0 ; % for -b^2 > R > -a^2

Iniciar sesión para comentar.

Respuestas (1)

darova
darova el 5 de Oct. de 2019
Use isosurface to visualize roots
Use if .. else statement to choose parameter
if P > -c^2
T = P;
elseif -c^2 < Q && Q < -b^2
%% -----
eq1 = ( x^2/(a^2 + T)) % ...
  3 comentarios
darova
darova el 7 de Oct. de 2019
What do you want to find? What variable is uknown?
az
az el 7 de Oct. de 2019
I have values for a,b,c and P, Q, R.
I want to find values of x, y and z for the boundary condition
for P > -c^2
-c^2 > Q > -b^2
-b^2 > R > -a^2
the P, Q , R are the coordinate values in ellipsoidal coordinate and x, y, z are cartisian coordinate. so I just want to transform coordinate (p, q, R) to (x, y, z).
There are function like 'linsolve' , is there any for nonlinear solve?
Thank you.

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by