Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 7a9eb46

Browse files
committed
22325: preserve algorithm='maxima', add doctests
1 parent e04186d commit 7a9eb46

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/sage/functions/orthogonal_polys.py

+12-3
Original file line numberDiff line numberDiff line change
@@ -403,15 +403,24 @@ def __call__(self, *args, **kwds):
403403
404404
EXAMPLES::
405405
406-
sage: K.<a> = NumberField(x^3-x-1)
407-
sage: chebyshev_T(5, a)
408-
16*a^2 + a - 4
406+
sage: chebyshev_T(5, x)
407+
16*x^5 - 20*x^3 + 5*x
408+
sage: chebyshev_T(5, x, algorithm='pari')
409+
16*x^5 - 20*x^3 + 5*x
410+
sage: chebyshev_T(5, x, algorithm='maxima')
411+
16*x^5 - 20*x^3 + 5*x
412+
sage: chebyshev_T(5, x, algorithm='recursive')
413+
16*x^5 - 20*x^3 + 5*x
409414
"""
410415
algorithm = kwds.get('algorithm', None)
411416
if algorithm == 'pari':
412417
return self.eval_pari(*args, **kwds)
413418
elif algorithm == 'recursive':
414419
return self.eval_recursive(*args, **kwds)
420+
elif algorithm == 'maxima':
421+
from sage.calculus.calculus import maxima
422+
kwds['hold'] = True
423+
return maxima(self._eval_(*args, **kwds))._sage_()
415424

416425
return super(OrthogonalFunction,self).__call__(*args, **kwds)
417426

0 commit comments

Comments
 (0)