Possibility/ease of doing some vector ops in Maxima



Hi,

 Here's a method that might work and yet retain some generality for your
problem.  At the Maxima prompt, type:
f:x*y*(x-y)^2;
v:[x,y];
g:makelist(diff(f,v[i]),i,1,2);

The first line is your function (took p=2 here), the second is a list of
variables, i.e., your L_1, etc., and the third line is the gradient.  This
last command produces a list (vector) with elements being those of grad(f).

 I hope this helps, and gives you a few ideas...

 Dave Holmgren

----- Original Message -----
From: "Neilen" <nmarais at hertz>
To: <Maxima@www.ma.utexas.edu>
Sent: Wednesday, September 18, 2002 5:55 PM
Subject: Possibility/ease of doing some vector ops in Maxima


> Hi.
>
> I'm currently investigating the possibility of using Maxima to automate
> the generation of the basis functions I want to use as part of a FEM
> code.
>
> At the moment I don't have much experience with Maxima, and no previous
> computer algebra experience, so newbie advice would also be appreciated
> :)
>
> To automate the basis function generation, I need to be able to evaluate
> functions like this one:
>
> grad(L_1*L_2*(L_1-L_2)^(p-1)), where p is the order of the basis being
> generated, and L_1 and L_2 (and also L_3) represent the 2D area
> coordinates.
>
> Then I would like to simplify the expression, so that it is still in
> terms of L_1,L_2,L_3 (ie, no need to take into account the linear
> dependence of the area coordinates), and grad(L_1), grad(L_2),
> grad(L_3).
>
> Basically, I want the answer as coefficients of grad(L_i), i=1..3.
>
> Could this be done simply, or would I need to write some code? In either
> case, some pointers as to which part of the, rather formidable, Maxima
> reference I should look at would also be nice.
>
> Thanks in advance
> Neilen
>
>
>
> --
> We are the fossils, relics of our time
> Mutilate the meanings of our youth tonight
> -- Smashing Pumpkins
>
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima