(n, a, b, x=None, **args)
Generates Jacobi polynomial of degree `n` in `x`.
Generates Jacobi polynomial of degree `n` in `x`.
Generates Jacobi polynomial of degree n in x .
def jacobi_poly(n, a, b, x=None, **args):
    """Generates Jacobi polynomial of degree `n` in `x`. """
    if n < 0:
        raise ValueError("can't generate Jacobi polynomial of degree %s" % n)

    K, v = construct_domain([a, b], field=True)
    poly = DMP(dup_jacobi(int(n), v[0], v[1], K), K)

    if x is not None:
        poly = Poly.new(poly, x)
    else:
        poly = PurePoly.new(poly, Dummy('x'))

    if not args.get('polys', False):
        return poly.as_expr()
    else:
        return poly
def jacobi_poly ( n , a , b , x = None , * * args ) : if n < 0 : raise ValueError ( "can't generate Jacobi polynomial of degree %s" % n ) K , v = construct_domain ( [ a , b ] , field = True ) poly = DMP ( dup_jacobi ( int ( n ) , v [ 0 ] , v [ 1 ] , K ) , K ) if x is not None : poly = Poly . new ( poly , x ) else : poly = PurePoly . new ( poly , Dummy ( 'x' ) ) if not args . get ( 'polys' , False ) : return poly . as_expr ( ) else : return poly