I have not looked at your expression, however it may be that the methods
used for so-called Poisson Series in celestial mechanics and mathematically
analogous computations will solve your problems in a jiffy.
Maxima has Poisson series,  which are special canonical forms
for sums of sines and cosines   where there are some set of angle variables
say u,v,w,x,y,z
and each individual term looks like   (rational function)   *{sin or cos}( 
  a*u + b*v + ...+f*z)

and a,b,c...f  are integers.

If your data fits this model, a special encoding makes the major expense,
multiplication of these guys, maybe 10000 times faster, and 50X more 
compact.
depending of course on what you are comparing it to.
RJF



On Thursday, February 16, 2012 12:54:29 PM UTC-8, Vinzenz wrote:
>
> Hi,
>
> I'd like to symbolically simplify trigonometric expressions, which may 
> become quite large.
> In another thread Aaron Meurer pointed out that 
> expand(expand(a.rewrite(exp)).rewrite(cos)) may be a solution.
>
> The result is good for the small example expression (takes reasonable 
> time). But for larger expressions the expand after rewrite(exp) won't 
> finish or take too much memory. I tried to disable caching, to split the 
> expression with e.g. Add.make_args and to disable some of expand's hints 
> (also force=True or using expand_mul). That was rather not successful yet.
>
> Here is example code: 
> http://www.ovgu.de/bargsten/download/simptest.tar.bz2 (8KB)
>
> What would you recommend?
>
> Note that I have problems to run this code with my python3 sympy 
> installation (immediately recursion limit exceeded). This is not a 
> problem with python 2.7 .
>
> Regards,
> Vinzenz
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/b50d083c-fad3-4960-96bb-f3614859d4ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to