#9706: Symbolic Chebyshev polynomials
-------------------------------------+-------------------------------------
       Reporter:  maldun             |        Owner:  burcin, maldun
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-5.13
      Component:  symbolics          |   Resolution:
       Keywords:  orthogonal         |    Merged in:
  polynomials, symbolics             |    Reviewers:  Burcin Erocal, Travis
        Authors:  Stefan Reiterer,   |  Scrimshaw, Stefan Reiterer, Jeroen
  Travis Scrimshaw                   |  Demeyer
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
   Dependencies:  #864, #9640,       |     Stopgaps:
  #10018, #11868, #15422             |
-------------------------------------+-------------------------------------

Comment (by maldun):

 Replying to [comment:111 jdemeyer]:
 > Replying to [comment:110 maldun]:
 > > Is it really a good idea to replace *args and **kwds in the
 OrthogonalPolynomial class?
 > >
 > > Since not all ortho polys only have 2 arguments, e.g. Gegenbauer
 polynomials [http://en.wikipedia.org/wiki/Gegenbauer_polynomials] which
 have an additional parameter alpha
 > > It makes perfect sense for the chebyshev polys though
 > Ok, it's always difficult to design an interface for something you don't
 have an implementation for, but I made the change such that the Gegenbauer
 polynomials should (in theory) work.

 Maybe you should have a short look ino this patch:
 
[http://trac.sagemath.org/attachment/ticket/9706/trac_9706_orthogonal_polys.patch]
 it contains already prototypes of the most ortho polys.

 I have some remarks concerning your patch:


 {{{
 sage: chebyshev_T(n,Mod(0,8))
 1/2*(-1)^(1/2*n)*((-1)^n + 1)
 }}}
 but this makes no sense since 1/2 is not defined in Mod(8). This was the
 reason for the 0 in CC check at this point.

 You evaluate numerical expressions for n in NN with recursion. this is
 favorable for chebyshev polynomials, but not for all ortho polys you can
 evaluate numeric values in O(log n). You have already problems with the
 legendre polynomials, since the coefficients depend on n, and the
 recursion is not stable. Thus other evaluation methods should be used.
 Thats the reason why _evalf_ with mpmath should come first.
 In case of chebyshev I catched this with call of the recursion.

 The _old_maxima_ method is used for some oddballs, where the only useful
 implementation is in maxima, and for some special cases. So removing is
 probably not a good idea.

 The reason why negative values are checked in special values, is that in
 later versions, or for other polys non integral negative values can be
 treated analogously, as in the case of their algebraic counterpart. E.g
 negative legendre polynomials would return associated legendre functions,
 but have no algebraic sense.

 Another reason to allow the special values check for non symbolic input,
 is that e.g. (-1)^100000000 is evaluated faster, than applying the
 recursion, or other special points.
 I use this feature sometimes to evaluate certain polynomials at the end
 points of an intervall e.g. [-1,1]

--
Ticket URL: <http://trac.sagemath.org/ticket/9706#comment:112>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" 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/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to