Solving system of nonlinear equation with boundary condition

1 visualizzazione (ultimi 30 giorni)
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 Commenti
az
az il 5 Ott 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 il 5 Ott 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

Accedi per commentare.

Risposte (1)

darova
darova il 5 Ott 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 Commenti
darova
darova il 7 Ott 2019
What do you want to find? What variable is uknown?
az
az il 7 Ott 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.

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by