Complex system of equations



"Thomas D. Dean" <tomdean at speakeasy.org> writes:
> Now, the part I do not understand:
>
> (%i8) subst(sk, xx);
> subst: improper argument: sk
>  -- an error. To debug this try: debugmode(true);
>
> I do not understand how the subst(sk,...) expression works in the
> context of makelist and expand.
>
> Can someone explain this?

makelist is a macro and you read it as follows.

  makelist(expand(subst(sk, xx)),sk, args(sol));

means:

 (1) For each element of args(sol) (which is a list), bind a dummy
     variable called sk to its value

 (2) Now call the code "expand(subst(sk, xx))" with this name binding in
     place.

So you should find that

  expand(subst(args(sol)[1], xx))

works and gives you the first element of the list you got with Barton's
code.


Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20110517/456a84bd/attachment-0001.pgp>;