beginner questions: return on Maxima console and working with implicit functions



Ivo,

Thanks for your feedback -- very helpful to have the perspective of a
Mathematica user.

What exactly do you mean by the " 'rational' assumption"?

Re FullSimplify:

(self-plagiarized from an email I wrote 6 years ago):

Simplification is an interesting and subtle concept.  Though sometimes you
want the shortest possible expression, sometimes you prefer one that
reflects the structure of the expression, or puts it in a
particular form.  Even the simplest cases are unclear.  Consider (x+1)*(x+2)
vs. x^2+3*x+2.  The second is slightly shorter in characters (though larger
as a tree), and more explicit about the
leading term (which may be of most interest for large x) and the constant
term (which may be of most interest for small x), but the first is more
explicit about the roots. Which is simpler: 1/(t+1)-1/(t-1) or 2/(1-t^2)?
The second is somewhat shorter, but the first tells you more about the
poles. How about sin(x)^2 vs.1/2-cos(2*x)/2? It is clearer that the first
is non-negative, but the period is more explicit about the period.  Does
which is is simpler change with a simple linear transformation:
1-2*sin(x)^2 vs. cos(2*x)?

If the goal is the shortest representation, what about consistency between
subparts?  Both the trigexpand and the trigreduce+ratsimp/trigrat of
sin(5*x)+sin(x)^5 are larger than the
original expression, but which ones are actually useful?  (Not to mention
that it might be hard to find the unexpanded version if you're starting
from the trigexpand'ed version.)


Various of us have written "try hard to simplify" routines over the years.
 There are several issues there.  First, some kinds of simplifications are
really hard to find, e.g. starting from expand( (a+b)^10 - (a-b+3)^10 ), go
back to the unexpanded form.  Secondly, different forms are "simplest",
depending on the purpose (see above). Third, some approaches to this will
very quickly take impractical amounts of time.

Nonetheless, some of us have thrown caution to the winds and tried some
simple cases of this which just essentially try all combinations of some
simplification routines and minimize tree size or string size.  I'll see if
I can find one I wrote in my archives....

              -s



On Fri, Sep 28, 2012 at 12:25 PM, ivo welch <ivo.welch at gmail.com> wrote:

> thanks, volker, stavros, and andrew.  this was very helpful.
>
> I would put a notice about the required '$' or ';' lineend somewhere
> in a prominent popup or startup line the first few times that Maxima
> is invoked.  This has probably let many "silent" users to give up
> prematurely over the years.
>
> I am definitely warming up to Maxima over Mathematica.
>
> I like the "rational" assumption in Maxima, as well as its more
> central assume feature.  Maxima seems faster, too.  Its default
> wxMaxima notation output seems nicer.
>
> Mathematica seems to have a more sophisticated FullSimplify
> simplification routine---in fact, I wonder whether Maxima there is not
> a heuristic simplification that has some IQ and tries all sorts of
> different approaches by itself without me having to know what packages
> I could try.
>
> Mathematica puts its graphs into its notebook, while wxMaxima put them
> into external gnuplot windows.  I believe wxplot can embed plots, but
> when I want to use other plots, such as implicit plots, I probably
> lose this.  I wish wxMaxima had a configure choice to integrate all
> graphs.
>
> Mathematica has one big advantage, which is books.  I would purchase a
> 150 page book that is a reasonable beginner's guide.  fortunately,
> Mathematica's drawback is that its books are 2,000 pages.  I usually
> just read the first few chapters.
>
> one thing about Maxima that cannot be changed: is that the name of the
> package is too generic.  google searches lead to all sorts of
> irrelevant results.  I now know a lot more about Nissan maximas.
>
> in any case, Maxima is an impressive package.
>
> Cheers.
>
> /iaw
>
>
>
>
> On Fri, Sep 28, 2012 at 3:12 AM, Volker van Nek <volkervannek at gmail.com>
> wrote:
> >
> > 2012/9/28 ivo welch <ivo.welch at anderson.ucla.edu>
> >>
> >> dear maxima experts---
> >>
> >> [1] I am trying to switch from Mathematica to Maxima.  I downloaded
> >> and installed it on ubuntu linux 12.04.1 .    I can use wxMaxima
> >> successfully.  I would like to use the basic command line interface.
> >> I type $ maxima, and then "solve( y + 2 == 0, y)" to the (%i1) prompt
> >> and hit enter...and nothing happens.  then I try shift-enter.  a ^c
> >> gets me a console interrupt.
> >
> >
> > Maxima needs a terminator at the end of an expression. Use ; to view the
> > answer and $ if the answer should not be displayd.
> >
> > wxMaxima automatically adds a semicolon.
> >
> > The operator for an equation is simply =
> >
> >>
> >> [2] I am trying to work with implicit functions.  an illustration of
> >> what I want to accomplish is
> >>
> >> eqn : solve( y + log(y) + x = 0, y)
> >> plot(eqn, [x,0,1])
> >
> >
> >  To answer this I need to load an additional package:
> >
> > (%i2) eqn : y + log(y) + x = 0$
> >
> > (%i3) load(implicit_plot);
> >
> > (%o3) "/usr/local/share/maxima/5.28.0/share/contrib/implicit_plot.lisp"
> > (%i4) implicit_plot(eqn, [x,0,1], [y,0,1])$
> >
> >
> > solve cannot solve eqn. So I load another package:
> >
> > (%i5) load(to_poly_solve);
> >
> > Loading maxima-grobner $Revision: 1.6 $ $Date: 2009-06-02 07:49:49 $
> > (%o5)
> "/usr/local/share/maxima/5.28.0/share/to_poly_solve/to_poly_solve.mac"
> > (%i6) to_poly_solve(eqn, y);
> >
> > (%o6) %union([y = lambert_w(%e^-x)])
> > (%i7) plot2d(lambert_w(%e^-x), [x,0,1])$
> >
> > To compute dy/dx I type
> >
> > (%i8) diff(lambert_w(%e^-x), x);
> >
> > (%o8) -%e^(-lambert_w(%e^-x)-x)/(lambert_w(%e^-x)+1)
> >
> > I don't know much about Lambert's W function. So I can't help with dy/dx
> >
> > 0.
> >
> > I hope someone else can answer here.
> >
> > Volker van Nek
> >
> >>
> >> I know this is wrong...but how would I do this correctly?  (I also
> >> want to use M to ascertain whether dy/dx > 0 .)
> >>
> >> help for a poor beginner is appreciated.
> >>
> >> /iaw
> >>
> >>
> >> ----
> >> Ivo Welch (ivo.welch at gmail.com)
> >> http://www.ivo-welch.info/
> >> J. Fred Weston Professor of Finance
> >> Anderson School at UCLA, C519
> >> Editor, Critical Finance Review,
> http://www.critical-finance-review.org/
> >> _______________________________________________
> >> Maxima mailing list
> >> Maxima at math.utexas.edu
> >> http://www.math.utexas.edu/mailman/listinfo/maxima
> >
> >
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>