6 December 2005
Hi,
Thanks for the response.
I am interested in solving sets of nonlinear equations having symbolic
parameters (taking on real values).
>From the documentation of solver.mac (solver1.pdf, Studienarbeit of E.
Hennig, TU Braunschweig) this was developed originally in Macsyma and
specifically to address the above-mentioned application.
Any assistance with the following problems in the Maxima version would be
appreciated.
(1) I am trying to solve a set of 4 nonlinear equations in 4 variables. There
is also a symbolic parameter V > 0.
y : [2 *x2 + (2 + lam1 *x2) *x3, 2* x1 + (2 + lam1 *x1)* x3, 2 *x1 +
(2+lam1*x1)* x2, -V + x1*x2*x3];
assume( V > 0 );
xvar : [x1,x2,x3,lam1];
(%i127) display2d:false;
(%o127) FALSE
(%i128) solver(map("=",y,[0,0,0,0]),xvar,[V]);
Warning: GET(OP(EXPR),'Valuation) was declared mode FIXNUM, has value: FALSE
Warning: GET(OP(EXPR),'Valuation) was declared mode FIXNUM, has value: FALSE
Warning: GET(OP(EXPR),'Valuation) was declared mode FIXNUM, has value: FALSE
Warning: GET(OP(EXPR),'Valuation) was declared mode FIXNUM, has value: FALSE
Warning: GET(OP(EXPR),'Valuation) was declared mode FIXNUM, has value: FALSE
Warning: GET(OP(EXPR),'Valuation) was declared mode FIXNUM, has value: FALSE
Division by 0
Division by 0
Division by 0
(%o128) [[x1 = -2*V^(1/3)/(SQRT(3)*%I+1),x2 = -2*V^(1/3)/(SQRT(3)*%I+1),
x3 = (SQRT(3)*%I-1)*V^(1/3)/2,
lam1 = (4*SQRT(3)*%I-4)/((SQRT(3)*%I+1)*V^(1/3))],
[x1 = 2*V^(1/3)/(SQRT(3)*%I-1),x2 = 2*V^(1/3)/(SQRT(3)*%I-1),
x3 = -(SQRT(3)*%I+1)*V^(1/3)/2,
lam1 = (4*SQRT(3)*%I+4)/((SQRT(3)*%I-1)*V^(1/3))],
[x1 = V^(1/3),x2 = V^(1/3),x3 = V^(1/3),lam1 = -4/V^(1/3)],[x3 = 0]]
(%i129)
(1.1) It's not clear how to fix the bug causing the warning messages ??
(1.2) The values for x1, x2 and lam1 do not appear in the last "solution"
[[x3=0]], possibly a bug ??
(1.3)What are the Maxima commands to filter out the complex solutions above
(in the same manner as algsys() does when realonly : true ) ??
(1.4) I am interested in the second last solution. I also obtain this with
the Matlab symbolic toolbox (using solve(), isreal(), etc):
[ x1 = V^(1/3), x2 = V^(1/3), x3 = V^(1/3), lam1 = -4/V^(1/3) ]
A two step approach via algsys() also gives this solution (courtesy Robert
Dodier).
A straightforward (one step) application of algsys() does not work:
(%i15) algsys(y,xvar);
(%o15) []
(%i16)
(2) solver() does not work properly in straightfoward linear equations
(substitutions), due to some bug ??
(%i129) solver([x1-1=0,x2-2=0,x3-3=0],[x1,x2,x3]);
(%o129) [[x2 = 2]]
(%i130)
In this case algsys() does work:
(%i131) algsys([x1-1=0,x2-2=0,x3-3=0],[x1,x2,x3]);
(%o131) [[x1 = 1,x2 = 2,x3 = 3]]
(%i132)
(If somebody can send me the email address of the developer Eckhard Hennig or
Dr. -Ing. Ralf Sommer, or Macsyma developers that are familiar with
solver(), then this would be appreciated).
Thanks very much.
Regards,
C. Frangos.