A variety of maxima queries



On Sun, Oct 28, 2012 at 11:55 PM, Daniel Dalton
<daniel.dalton47 at gmail.com>wrote:

> On Sun, Oct 28, 2012 at 04:05:08PM +0000, Dan wrote:
> Hi DAn,
> > On Sun, 28 Oct 2012, Daniel Dalton wrote:
> ...

> Using radcan(%), instead of ratsimp(%), will give sqrt(2) sqrt(3) v.
> It works, thank you. Any reason why sqrt(2)*sqrt(3) isn't simplified?
>

radcan considers sqrt(2)*sqrt(3) simpler than sqrt(6).  Its goal is to get
things into a standard form ("*rad*ical *can*onical") to ensure that all
relevant simplifications are performed.  Additional standardization is
performed when algebraic=true.

ratsimp considers them "equally" simple, and doesn't transform one into the
other.

map( radcan, [sqrt(2)*sqrt(3),sqrt(6)] ) => [sqrt(2)*sqrt(3),
sqrt(2)*sqrt(3)]
map( radsimp, [sqrt(2)*sqrt(3),sqrt(6)] ) => [sqrt(2)*sqrt(3),sqrt(6)]


There is no universal definition for "simple".

...
> Also, can I use radcan () as a replacement for ratsimp or is it still
> best to use ratsimp when you aren't dealing with exponents and logs?
> ...


radcan is very similar (perhaps identical?) to ratsimp when there are no
non-integer exponents or logs.  It is more expensive computationally, but
this doesn't matter for modest-sized expressions.  Both of them may
surprise you at times by returning things that don't look "simple", e.g.
ratsimp(1+exp(-x)) =>%e^-x * (%e^x + 1).  Why?  Because both treat this as
a rational function with kernel exp(x)==%e^x.


> Again should the to_poly_solve function be used instead of solve? Or is
> it only useful in some cases?
>

%solve in the to_poly_solve package handles many cases that regular solve
does not.  It also produces more complete solutions for multiple-valued
functions.  That may be confusing in simple applications: that is, some
users may prefer the principal-value solution solve(sin(x)=0,x) => [x=0];
others may prefer the complete solution
%union([x=2*%pi*%z31+%pi],[x=2*%pi*%z33]).
 One problem with the results of %solve is that Maxima doesn't yet have a
full set of functions for manipulating and simplifying %union.  In this
case, for example, it would have been nicer to return [x=%pi*%z34].

          -s