Can't use the result of solve() to define a function



2010/5/6 Takahashi Hideo2 <hideo.at.yokohama at gmail.com>:

> I want to do some coordinate transformation between (x,y) and (?,?)
> For a simple try, I want to map a triangle (x1,y1) - (x2,y2) - (x3,y3) to
> {(?,?) | ?>=0, ? >=0, ?+? <= 1}
> This appears in beginner-level finite element method problems.

Terrific, it's always gratifying to see people using Maxima to solve problems.

>     N?(x,y) := rhs(results[1][1]);   /* But this does not define a function
> that I want */

Try this: N?(x,y) := ''(rhs(results[1][1]));
Note the two single-quotes (not a double-quote).
That tells Maxima to paste in the following stuff (rhs(...)) when the
expression is read by the parser.
(In a := expression, the function body is neither evaluated nor
simplified.)

Or try this: define(N?(x,y), rhs(results[1][1]));

Hope this helps, & welcome to Maxima.

Robert Dodier