simplification



The general simplifier for trigonometric functions has a method for deciding when to apply a reflection identity; for example

  (%i1) sin(-x);
  (%o1) -sin(x)

  (%i2) cos(-x);
  (%o2) cos(x)

  (%i3) makelist(cos(x + (1-e) * %pi/2),e,[-1,0,1]);
  (%o3) [-cos(x),-sin(x),cos(x)]

Maxima uses an ordering predicate (defined on expressions, not just numbers)  to decide when to use the reflection identity:

 (%i4) sin(b-x);
 (%o4) -sin(x-b)

 (%i5) sin(b-a);
 (%o5) sin(b-a)

The aim of the algorithm is to simplify as many expressions to zero as possible:

(%i7) sin(b-x) + sin(x-b);
(%o7) 0

(%i8) sin(a-b) + sin(b-a);
(%o8) 0

Also, the function trigrat might be useful to you?  I didn't answer your question, but maybe some of this is useful.

--bw

________________________________________
From: maxima-bounces at math.utexas.edu [maxima-bounces at math.utexas.edu] on behalf of Jean Vittor [jean.vittor at free.fr]
Sent: Friday, April 13, 2012 06:39
To: maxima at math.utexas.edu
Subject: simplification

Hi,

I'm new to maxima and I have a hard time understanding how
simplification works.

My point is to use "sign" values (I mean integers which take their value
from {-1;1}) and to be able to automate some trigo simplifications like
(in the following, e is a sign and x a real expression):
   - sin(e*x) -> e*sin(x)
   - cos(e*x) -> cos(x)
   - cos(x+(1-e)*%pi/2) -> e*cos(x)
   - ...
   - and, of course, e^2 -> 1

Is there a way to do this with maxima ?


Thanks,

Jean

_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima