stuck with vectors



This is what I got:

(%i1) P1:matrix([(-sigma) * x[1]+sigma * x[2]],[rho * x[1]-x[2]],[(-beta) 
* 
x[3]])$

P2:matrix([0],[(-x[1]) * x[3]],[x[1] * x[2]])$

SQ: matrix([x[1]],[x[2]],[x[3]]) . matrix([sigma * x[1]],[x[2]],[beta 
* x[3]]) - (rho+sigma) * x[1] * x[2]$

RR:matrix([x[1]],[x[2]],[x[3]]) . matrix([x[1]],[x[2]],[x[3]]);

xprime:(1+RR) * (1-RR) * P1 + (1+RR) * P2 + 2 * (1-RR) * SQ * matrix 
([x[1]],[x[2]],[x[3]])$

mm: xprime . xprime$

x[1]:1;x[2]:2;x[3]:.5$
expand(''mm);
(%i2) 
(%i3) 
(%i4) 
(%o4) x[3]^2+x[2]^2+x[1]^2
(%i5) 
(%i6) 
(%i7) 
(%o7) 1
(%o8) 2
(%i10) 
(%o10) 
633.31640625*sigma^2-289.0*rho*sigma+36.125*beta*sigma+578.0*sigma+416.56640625*rho^2+72.25*beta*rho-1500.25*rho+
171.8759765625*beta^2+187.53125*beta+1500.25
(%i11) sigma:5;rho:25;beta:3$
 expand(''mm);
(%o11) 5
(%o12) 25
(%i14) 
(%o14) 215016.0166015625

Notice that (%o10) and (%o14) are not 1 x 1 matrices. In the expression 
for xprime, did you change
three dot operators to star operators?

Barton

maxima-bounces at math.utexas.edu wrote on 01/06/2007 08:55:18 AM:

> sorry.  I used :
> 
> x[1]:1;x[2]:2;x[3]:.5; expand(''mm);
> the result of which was
> matrix([a polynomial in the parameters sigma, rho, beta])
> It's correct that it's a polynomial, but weird that it's a one by one 
> matrix
> 
> then picking values for the parameters
> sigma:5;rho:25;beta:3; expand(''mm);
> gives a pure number inside [ ], and it's not a matrix
>