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

Commit

Permalink
22326: fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rwst committed Feb 9, 2017
1 parent 445931a commit 164d709
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/sage/functions/orthogonal_polys.py
Original file line number Diff line number Diff line change
Expand Up @@ -1990,12 +1990,17 @@ def _eval_(self, n, a, b, x):
"""
EXAMPLES::
sage: _ = var('n a b x')
sage: jacobi_P(1,n,n,n)
2*(n + 1)*n*gamma(2*n + 2)/gamma(n + 1)
(n + 1)*n
sage: jacobi_P(2,n,n,n)
1/2*(2*n + 3)*(2*n - 1)*(n + 2)*(n + 1)*gamma(2*n + 3)/gamma(n + 1)
1/4*(2*n - 1)*(n + 2)*(n + 1)^2
sage: jacobi_P(1,n,n,x)
2*(n + 1)*x*gamma(2*n + 2)/gamma(n + 1)
(n + 1)*x
sage: jacobi_P(3,2,1,x)
21/2*x^3 + 7/2*x^2 - 7/2*x - 1/2
sage: jacobi_P(1,a,b,x)
1/2*a*x + 1/2*b*x + 1/2*a - 1/2*b + x
TESTS:
Expand Down Expand Up @@ -2026,7 +2031,7 @@ def _eval_(self, n, a, b, x):
return
from sage.functions.other import gamma
s = sum(binomial(n,m) * gamma(a+b+n+m+1) / gamma(a+m+1) * ((x-1)/2)**m for m in range(n+1))
r = gamma(2*n+a+b+1) / factorial(n) / gamma(n+a+b+1) * s
r = gamma(a+n+1) / factorial(n) / gamma(n+a+b+1) * s
return r.to_gamma().gamma_normalize()

def _evalf_(self, n, a, b, x, **kwds):
Expand Down

0 comments on commit 164d709

Please sign in to comment.