(fa, fd, ga, gd, DE)
return (a, (ba, bd), (ca, cd), h)
Normal part of the denominator.

    Given a derivation D on k[t] and f, g in k(t) with f weakly
    normalized with respect to t, either raise NonElementaryIntegralException,
    in which case the equation Dy + f*y == g has no solution in k(t), or the
    quadruplet (a, b, c, h) such that a, h in k[t], b, c in k<t>, and for any
    solution y in k(t) of Dy + f*y == g, q = y*h in k<t> satisfies
    a*Dq + b*q == c.

    This constitutes step 1 in the outline given in the rde.py docstring.
Normal part of the denominator.
Normal part of the denominator .
def normal_denom(fa, fd, ga, gd, DE):
    """
    Normal part of the denominator.

    Given a derivation D on k[t] and f, g in k(t) with f weakly
    normalized with respect to t, either raise NonElementaryIntegralException,
    in which case the equation Dy + f*y == g has no solution in k(t), or the
    quadruplet (a, b, c, h) such that a, h in k[t], b, c in k<t>, and for any
    solution y in k(t) of Dy + f*y == g, q = y*h in k<t> satisfies
    a*Dq + b*q == c.

    This constitutes step 1 in the outline given in the rde.py docstring.
    """
    dn, ds = splitfactor(fd, DE)
    en, es = splitfactor(gd, DE)

    p = dn.gcd(en)
    h = en.gcd(en.diff(DE.t)).quo(p.gcd(p.diff(DE.t)))

    a = dn*h
    c = a*h
    if c.div(en)[1]:
        # en does not divide dn*h**2
        raise NonElementaryIntegralException
    ca = c*ga
    ca, cd = ca.cancel(gd, include=True)

    ba = a*fa - dn*derivation(h, DE)*fd
    ba, bd = ba.cancel(fd, include=True)

    # (dn*h, dn*h*f - dn*Dh, dn*h**2*g, h)
    return (a, (ba, bd), (ca, cd), h)
def normal_denom ( fa , fd , ga , gd , DE ) : dn , ds = splitfactor ( fd , DE ) en , es = splitfactor ( gd , DE ) p = dn . gcd ( en ) h = en . gcd ( en . diff ( DE . t ) ) . quo ( p . gcd ( p . diff ( DE . t ) ) ) a = dn * h c = a * h if c . div ( en ) [ 1 ] : # en does not divide dn*h**2 raise NonElementaryIntegralException ca = c * ga ca , cd = ca . cancel ( gd , include = True ) ba = a * fa - dn * derivation ( h , DE ) * fd ba , bd = ba . cancel ( fd , include = True ) # (dn*h, dn*h*f - dn*Dh, dn*h**2*g, h) return ( a , ( ba , bd ) , ( ca , cd ) , h )