On Thu, Sep 16, 2010 at 5:32 PM, Aaron S. Meurer <asmeu...@gmail.com> wrote:
> I get 8.94, 0.01, 0.00 on the first run and 1.31, 0.01, 0.00 on subsequent 
> runs (cache enabled).
>
> But more importantly, I get this:
>
> In [69]: a = sin(40*x).expand(trig=True)
>
> In [70]: b = chebyshevt(40, cos(x))
>
> In [71]: c = chebyshevt_poly(40, cos(x))
>
> In [72]: a == b
> Out[72]: False
>
> In [73]: a == c
> Out[73]: False
>
> In [74]: b == c
> Out[74]: True
>
> In [75]: print a
> -149387552489472*cos(x)**29*sin(x) - 112939386273792*cos(x)**25*sin(x) - 
> 61332132986880*cos(x)**33*sin(x) - 30004268236800*cos(x)**21*sin(x) - 
> 5222680231936*cos(x)**37*sin(x) - 2814663720960*cos(x)**17*sin(x) - 
> 85201715200*cos(x)**13*sin(x) - 669442048*cos(x)**9*sin(x) - 
> 842688*cos(x)**5*sin(x) - 40*cos(x)*sin(x) + 10640*cos(x)**3*sin(x) + 
> 31380096*cos(x)**7*sin(x) + 9128755200*cos(x)**11*sin(x) + 
> 549755813888*cos(x)**39*sin(x) + 569634324480*cos(x)**15*sin(x) + 
> 10501493882880*cos(x)**19*sin(x) + 22883585753088*cos(x)**35*sin(x) + 
> 66175421644800*cos(x)**23*sin(x) + 112442243809280*cos(x)**31*sin(x) + 
> 148655260565504*cos(x)**27*sin(x)
>
> In [76]: print b
> 1 - 800*cos(x)**2 + 106400*cos(x)**4 - 5617920*cos(x)**6 + 
> 156900480*cos(x)**8 - 2677768192*cos(x)**10 + 30429184000*cos(x)**12 - 
> 243433472000*cos(x)**14 + 1424085811200*cos(x)**16 - 6254808268800*cos(x)**18 
> + 21002987765760*cos(x)**20 - 54553214976000*cos(x)**22 + 
> 110292369408000*cos(x)**24 - 173752901959680*cos(x)**26 + 
> 212364657950720*cos(x)**28 - 199183403319296*cos(x)**30 + 
> 140552804761600*cos(x)**32 - 72155450572800*cos(x)**34 + 
> 25426206392320*cos(x)**36 - 5497558138880*cos(x)**38 + 549755813888*cos(x)**40
>
> So are you sure that that identity is true?  If I plot a - b in Maple, it 
> doesn't appear to be 0.

Yes, it works:

In [1]: n = 40

In [2]: sin(n*x).expand(trig=True) == (chebyshevu(n-1, cos(x))*sin(x)).expand()
Out[2]: True

My link in my first post is correct, only my benchmarks are wrong.

Ondrej

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sy...@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