Maxima algebraic simplification



You might want to take a look at the various draw commands as well.  Draw can handle plotting equations even if they are not solved for y or x.  But you have to load that.  Check the help for these, draw is pretty complicated.

load(draw);

draw2d(

also there is implicit_plot()

load(implicit_plot);

Rich


 ------------Original Message------------
From: Rupert Swarbrick <rswarbrick at googlemail.com>
To: "Ronald Modesitt" <rmodesi at msn.com>
Cc: "'Richard Hennessy'" <rvh2007 at comcast.net>, "'Maxima List'" <maxima at math.utexas.edu>
Date: Sat, May-10-2008 4:22 PM
Subject: Re: [Maxima] Maxima algebraic simplification

"Ronald Modesitt" <rmodesi at msn.com> writes:

> Rich,
> You're right this is really a cool feature. One I'm exploring and one I am
> confused about. If I have two named expression e.g.
>  e1:y=-x-3 and
>  e2:y=3+4x-x^2
> How can I plot them? I've tried
>  Plot2d([e1,e2], [x,-3-8])
> And get no response. I know this is a newbie issue but I need some help
> understanding my error. Is there documentation on 'named expressions'
> somewhere?
>
> Ron.

If you imagine substituting in the values of e1, e2 into that, you get

Plot2d( [y=x-3, y=3+4x-x^2], [x,-3,-8] );

So there are several problems. I presume that the capitalisation, "4x"
and "-3,-8" are typos and you actually want

plot2d( [y=x-3, y=3+4*x-x^2], [x,-8,-3] );

But this doesn't work since plot2d wants expressions to evaluate, not
equalities and (since you've already solved for y), you just need the
rhs of each equation:

(%i11) [e1,e2]: [y=x-3, y=3+4*x-x^2];

                                           2
(%o11)                  [y = x - 3, y = - x  + 4 x + 3]
(%i12) map(rhs,[e1,e2]);

                                       2
(%o12)                      [x - 3, - x  + 4 x + 3]
(%i13) plot2d( map(rhs,[e1,e2]), [x,-8,-3] );


Works here.

Rupert


P.S. Is it a bug that plot2d fails silently if given equations? Or is
there a sensible reason? Anyone?