solve non linear equations symbolically
19 ビュー (過去 30 日間)
古いコメントを表示
I have 4 variables & 3 non linear equations. Objective is to get 4th non linear equations expressed in 2 variables.
Variables are
a b M phi
Equations are
x/sqrt(x^2+y^2) = -1 + 1/M * cos(phi)
y/sqrt(x^2+y^2) = 1/M * sin(phi)
arg(diff((x- jy)/sqrt(x^2+y^2)),a) = pi/2 - phi
where,
x = cos(a) - a*b*sin(a) - 1
y = a*b*cos(a) + sin(a)
Objective: Express variable 'b' in terms of 'M'
5 件のコメント
Walter Roberson
2016 年 12 月 1 日
Can we constrain a, b, phi, M to real-valued? If though you use imaginary components in the expression?
採用された回答
Walter Roberson
2016 年 12 月 2 日
My investigations indicate that if there are symbolic solutions at all, then they are impractical to reach.
It is practical to solve the first two equations to get b and phi, leaving the third equation in terms of a and M . However, solving the resulting third equation (after substitution) for a is not practical (if it is possible at all.)
I have had a symbolic session running for the last hour just trying to evaluate that third equation at a = -Pi/5
My investigations show that there are an infinite number of matching real-valued a values for any M value for which there is a real-valued solution at all -- the arg() makes the solution either periodic or quasi-periodic (that is, same shape but possibly the distance changes.)
There do not happen to be any real-valued solutions for positive a . If you rewrite the equation from the form arg(X)=Y to be the expression arg(X)-Y and look for the zeros, then for a number of positive a values, there are both positive and negative values (depending on M), but there are no 0s because the positive values are discontinuous from the negative values.
There are solutions for some negative a values. There is an area near 0 in negative a where the above-mentioned expression has both positive and negative values but is discontinuous. By a = -Pi/4 there are real-valued solutions in M. My attempt to evaluate at a = -Pi/5 was probing to see where the discontinuity boundary is, more precisely. Guess I should have used floating point...
If you consider M values instead of a values, then there is a range of M values on both sides of 0 for which there are no real-valued solutions. I have not yet characterized how far that range extends.
4 件のコメント
Walter Roberson
2016 年 12 月 2 日
Notice:
"Non-linear Eq. (40) can be solved easily by Newton iterative method when Ms is given between 1.2 and 2.0 with step value of 0.05 respectively."
Newton iterative method is a numeric method, not a symbolic method.
その他の回答 (1 件)
Juan Ponce
2017 年 8 月 25 日
編集済み: Walter Roberson
2017 年 8 月 25 日
Hi Dhiraj R,
I obtain the following solutions, only with b and phi as variables.
% Variables Modelo
syms a b phi real
% a:Variable asociada a w*l ()
% b:Variable asociada a n2/l ()
% phi:Posicion angular (rad)
% n2:Constante de tiempo del filtro (s)
% Parametros Simbolicos
syms M real
% M:Sensitividad maxima Ms ()
% Ecuaciones auxiliares
x=cos(a)-a*b*sin(a)-1;
y=a*b*cos(a)+sin(a);
L=(x-j*y)/(x^2+y^2)^(1/2);
% Calculo Derivada Parcial
dL=diff(L,a);
% Calculo Argumento o Angulo
arg=atan(dL);
% Construccion Ecuaciones
% Nodos o Mallas, Fuerzas, Torques, Conservacion Energias
eq1=x/(x^2+y^2)^(1/2)-(-1+1/M*cos(phi)); % x/(x^2+y^2)^(1/2)=-1+1/M*cos(phi)
eq2=y/(x^2+y^2)^(1/2)-(1/M*sin(phi)); %y/(x^2+y^2)^(1/2)=1/M*sin(phi)
eq3=arg-(pi/2-phi); %arg=pi/2-phi
%%%%%%%%%%%%%%%%
F =
1 - (a*b*sin(a) - cos(a) + 1)/((sin(a) + a*b*cos(a))^2 + (a*b*sin(a) - cos(a) + 1)^2)^(1/2) - cos(phi)/M
(sin(a) + a*b*cos(a))/((sin(a) + a*b*cos(a))^2 + (a*b*sin(a) - cos(a) + 1)^2)^(1/2) - sin(phi)/M
phi - pi/2 - atan((sin(a) + i*cos(a) + b*sin(a) + a*b*cos(a) + b*i*cos(a) - a*b*i*sin(a))/((sin(a) + a*b*cos(a))^2 + (a*b*sin(a) - cos(a) + 1)^2)^(1/2) - ((2*(sin(a) + a*b*cos(a))*(cos(a) + b*cos(a) - a*b*sin(a)) + 2*(a*b*sin(a) - cos(a) + 1)*(sin(a) + b*sin(a) + a*b*cos(a)))*(i*sin(a) - cos(a) + a*b*sin(a) + a*b*i*cos(a) + 1))/(2*((sin(a) + a*b*cos(a))^2 + (a*b*sin(a) - cos(a) + 1)^2)^(3/2)))
X =
b
phi
mxd_nuevo =
[ -(2*sin(a - 4*pi*k) + 2*sin(a + 4*pi*k) + 4*sin(a) + 8*cos(2*pi*k)*(2*M*cos(2*pi*k) - cos(2*k*pi)^2)^(1/2) - 4*cos(2*pi*k - a)*(2*M*cos(2*pi*k) - cos(2*k*pi)^2)^(1/2) + 2*cos(2*pi*k - 2*a)*(2*M*cos(2*pi*k) - cos(2*k*pi)^2)^(1/2) - 2*cos(2*a - 2*pi*k)*(2*M*cos(2*pi*k) - cos(2*k*pi)^2)^(1/2) + cos(a)*(8*M*(2*M*cos(2*pi*k) - cos(2*k*pi)^2)^(1/2) + 8*M^2*sin(a)) - 4*cos(a + 2*pi*k)*(2*M*cos(2*pi*k) - cos(2*k*pi)^2)^(1/2) - 8*M*(2*M*cos(2*pi*k) - cos(2*k*pi)^2)^(1/2) - 8*M*sin(a - 2*pi*k) - 8*M*sin(a + 2*pi*k))/(a*cos(4*pi*k - 2*a) - a*cos(2*a - 4*pi*k) + 8*a*cos(2*pi*k)^2 - 16*M*a*cos(2*pi*k) + 8*M^2*a*cos(a)^2 - 4*M*a*cos(2*pi*k - 2*a) + 4*M*a*cos(2*a - 2*pi*k)), pi - acos(M*(sin(a) - 1))]
[ (sin(a - 4*pi*k) + sin(a + 4*pi*k) - sin(2*pi*k)*(4*(2*sin(a/2)^2 - 1)*(M^2 - sin(2*k*pi)^2)^(1/2) + 4*(M^2 - sin(2*k*pi)^2)^(1/2)) - sin(a)*(4*M^2*(2*sin(a/2)^2 - 1) + 2))/(4*a*(sin(a)^2 - 1)*M^2 + 4*a + 4*a*(sin(2*pi*k)^2 - 1)), pi - acos(M*(sin(a) - 1))]
Note: Each row of mxd_nuevo representa a solution bi,phi (i=1,2)
I dont know if this is right.
Good luck!!
Juan Ponce
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!