Solving system of nonlinear equation with boundary condition

1 view (last 30 days)
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 Comments
az
az on 5 Oct 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 on 5 Oct 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

Sign in to comment.

Answers (1)

darova
darova on 5 Oct 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 Comments
az
az on 7 Oct 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.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!