def jacobi_normalized(n, a, b, x):
 nfactor = ((((S(2) ** ((a + b) + 1)) * (gamma(((n + a) + 1)) * gamma(((n + b) + 1)))) / ((((2 * n) + a) + b) + 1)) / (factorial(n) * gamma((((n + a) + b) + 1))))
 return (jacobi(n, a, b, x) / sqrt(nfactor))

def jacobi_normalized ( n , a , b , x ) : nfactor = ( ( ( ( S ( 2 ) ** ( ( a + b ) + 1 ) ) * ( gamma ( ( ( n + a ) + 1 ) ) * gamma ( ( ( n + b ) + 1 ) ) ) ) / ( ( ( ( 2 * n ) + a ) + b ) + 1 ) ) / ( factorial ( n ) * gamma ( ( ( ( n + a ) + b ) + 1 ) ) ) ) return ( jacobi ( n , a , b , x ) / sqrt ( nfactor ) )
jacobi polynomial :math:p_n^{left}(x) jacobi_normalized gives the nth jacobi polynomial in x .