Repeatedly applying trigsimp, ratsimp etc.



re scsimp in particular, the "rules" aren't defrule rules, but just
equations.  See example(scsimp).

          -s

On Wed, Oct 31, 2012 at 4:04 PM, David Scherfgen <d.scherfgen at googlemail.com
> wrote:

> Hello,
>
> Maxima has a lot of different simplification functions.
> I'm looking for a way to "try them all" and find the simplest expression.
> Basically I want to do this:
>
> Given an expression e, compute trigsimp(e), ratsimp(e), radcan(e) ...
> See which of these gives the "simplest" result and do the same again with
> this simpler result.
> Stop when none of the functions can produce a simpler result any more.
>
> First I thought that "scsimp" was the right function to do this, and I
> tried it like this:
>
> matchdeclare(x, true);
> defrule(r1, x, trigsimp(x));
> defrule(r2, x, ratsimp(x));
> // more rules follow
>
> // my expression to be simplified
> // it equals to 1, if you apply "trigsimp"
> expr : tan(x) * cot(x)
>
> scsimp(expr, r1, r2, ...);
>
> However, "scsimp" doesn't apply any of the rules.
> If I manually apply rule "r1", it gives me the correct result "1".
>
> Am I doing something wrong? Or does "scsimp" just not work like this?
> How could I do it manually? Is there a Maxima function that computes the
> length of an expression, so I could use it to select the best result in
> each step?
>
> I'm very grateful for any help.
>
> Kind regards,
> David Scherfgen
> ______________________________**_________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/**mailman/listinfo/maxima<http://www.math.utexas.edu/mailman/listinfo/maxima>;
>