Here is the link for the Maxima trigsimp() code.  It was written in
1981, according to the comments!!!
http://maxima.cvs.sourceforge.net/viewvc/maxima/maxima/share/trigonometry/trgsmp.mac?revision=1.4&view=markup

I emailed the authors of the Fu et al. paper to see if they would be
willing to share their implementation of the algorithm -- maybe we can
save ourselves some work this way.

I want to start coding for this, because much of the stuff I am doing
in PyDy is heavy on kinematics and the expressions become excessively
long unless intelligent trigsimplification is possible.  Many of my
unittests simply will not work because some results I know to be true
cannot be achieved with the current state of trigsimp, so this has
become a significant limitation for me.

What should be the general framework for implementing the 'rules' that
are laid out in the Fu paper?  There are certainly other rules we
could find, either on Wikipedia, Mathworld, or in a engineering/
mathematics reference manual.

I have read over how trigsimp() and trigsimp_nonrecursive() are
currently implemented, and I think I get the gyst of what the approach
is.  Can somebody explain what this is doing exactly:
for pattern, simp in matchers:
        res = result.match(pattern)
        ....

I'm not 100% clear on the use of the .match() method, does somebody
have a quick example of use?

It seems like the flow of trigsimp (in the case of recursive==False
and deep==False):
1)  call trigsimp_nonrecursive(expr, deep==False), store the result in
'result'
2)  do some final pattern matching on 'result', currently this will
only simplify a*sin(b)**c/cos(b)**c --> a*tan(b)**c

So, should all the rules in Fu et al. be implemented as a tuple of
length 2 tuples, similar to the existing matchers tuple?

I'm kind of thinking out loud right now and trying to figure out the
next step to take....

~Luke


On May 21, 7:42 am, Akshay Srinivasan <akshaysriniva...@gmail.com>
wrote:
> Luke wrote:
> > I tried both of those options and had no luck :(
>
> > Have you looked at the paper by Fu, Zhong, and Zeng:
> >http://vv.cn/d/d.aspx?Id=21987_1.0.42119
>
> > I read it, and think it seemed reasonable, but I'm no expert and want
> > to see what else was out there... maybe there are other approaches
> > worth considering.  Before investing in a lot of coding time, it would
> > nice to be sure that a good algorithm is being used, although I must
> > say their comparisons with the other popular packages out there seem
> > favorable.
>
> > ~Luke
>
> > On May 20, 7:50 am, Alan Bromborsky <abro...@verizon.net> wrote:
>
> >> Luke wrote:
>
> >>> Last  night I was deriving the moment of inertia for a solid torus
> >>> using Sympy.  It mostly worked, except for the step where the
> >>> determinant of the Jacobian for the change of variables mapping was to
> >>> be computed, the result was unable to be simplified bytrigsimp.  I
> >>> gave it a shot anyway, and it resulted in integrate() stalling on the
> >>> triple integral that is necessary.  Using other means to compute the
> >>> Jacobian of the determinant, then using that result in integrate()
> >>> resulted in the correct solution for the moment of inertia, which is
> >>> comforting, but at the same time, really makes me want to gettrigsimp
> >>> to work better.
>
> >>> I know of the paper by Fu, Zhong, and Zeng, but I was wondering if
> >>> anybody had any other recommendations for approaches to trigonometric
> >>> simplification.  It would be really nice if this part of sympy worked
> >>> better.  If there is somebody else out there who would like to tackle
> >>> this together, let me know and we could figure out a reasonable
> >>> approach.
>
> >>> Thanks,
> >>> ~Luke
>
> >> Did you try the deep and recursive switches on the most recent version
> >> oftrigsimp.  I also would liketrigsimpto do better for the same
> >> reasons you gave and would also like it to apply to hyperbolic trig
> >> functions. One thing I would do fortrigsimpis to convert all trig
> >> functions in the expression to sin's and cos's before simplifying.
>
> I have started implementing the algorithm, although I haven't really got
> much done. I couldn't find any other algorithm to do the simplification.
> I wonder what Maxima does to simplify trigonometric expressions.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to