Solving system of nonlinear equation with boundary condition

1 回表示 (過去 30 日間)
az
az 2019 年 10 月 4 日
コメント済み: az 2019 年 10 月 7 日
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 件のコメント
az
az 2019 年 10 月 5 日
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 2019 年 10 月 5 日
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

サインインしてコメントする。

回答 (1 件)

darova
darova 2019 年 10 月 5 日
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 件のコメント
darova
darova 2019 年 10 月 7 日
What do you want to find? What variable is uknown?
az
az 2019 年 10 月 7 日
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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by