(n, m, p0, q0, p, q, x0, x, c, check=None)
return frobdict
r"""
    Returns a dict with keys as coefficients and values as their values in terms of C0
r"""
    Returns a dict with keys as coefficients and values as their values in terms of C0
r Returns a dict with keys as coefficients and values as their values in terms of C0
def _frobenius(n, m, p0, q0, p, q, x0, x, c, check=None):
    r"""
    Returns a dict with keys as coefficients and values as their values in terms of C0
    """
    n = int(n)
    # In cases where m1 - m2 is not an integer
    m2 = check

    d = Dummy("d")
    numsyms = numbered_symbols("C", start=0)
    numsyms = [next(numsyms) for i in range(n + 1)]
    C0 = Symbol("C0")
    serlist = []
    for ser in [p, q]:
        # Order term not present
        if ser.is_polynomial(x) and Poly(ser, x).degree() <= n:
            if x0:
                ser = ser.subs(x, x + x0)
            dict_ = Poly(ser, x).as_dict()
        # Order term present
        else:
            tseries = series(ser, x=x0, n=n+1)
            # Removing order
            dict_ = Poly(list(ordered(tseries.args))[: -1], x).as_dict()
        # Fill in with zeros, if coefficients are zero.
        for i in range(n + 1):
            if (i,) not in dict_:
                dict_[(i,)] = S(0)
        serlist.append(dict_)

    pseries = serlist[0]
    qseries = serlist[1]
    indicial = d*(d - 1) + d*p0 + q0
    frobdict = {}
    for i in range(1, n + 1):
        num = c*(m*pseries[(i,)] + qseries[(i,)])
        for j in range(1, i):
            sym = Symbol("C" + str(j))
            num += frobdict[sym]*((m + j)*pseries[(i - j,)] + qseries[(i - j,)])

        # Checking for cases when m1 - m2 is an integer. If num equals zero
        # then a second Frobenius series solution cannot be found. If num is not zero
        # then set constant as zero and proceed.
        if m2 is not None and i == m2 - m:
            if num:
                return False
            else:
                frobdict[numsyms[i]] = S(0)
        else:
            frobdict[numsyms[i]] = -num/(indicial.subs(d, m+i))

    return frobdict
def _frobenius ( n , m , p0 , q0 , p , q , x0 , x , c , check = None ) : n = int ( n ) # In cases where m1 - m2 is not an integer m2 = check d = Dummy ( "d" ) numsyms = numbered_symbols ( "C" , start = 0 ) numsyms = [ next ( numsyms ) for i in range ( n + 1 ) ] C0 = Symbol ( "C0" ) serlist = [ ] for ser in [ p , q ] : # Order term not present if ser . is_polynomial ( x ) and Poly ( ser , x ) . degree ( ) <= n : if x0 : ser = ser . subs ( x , x + x0 ) dict_ = Poly ( ser , x ) . as_dict ( ) # Order term present else : tseries = series ( ser , x = x0 , n = n + 1 ) # Removing order dict_ = Poly ( list ( ordered ( tseries . args ) ) [ : - 1 ] , x ) . as_dict ( ) # Fill in with zeros, if coefficients are zero. for i in range ( n + 1 ) : if ( i , ) not in dict_ : dict_ [ ( i , ) ] = S ( 0 ) serlist . append ( dict_ ) pseries = serlist [ 0 ] qseries = serlist [ 1 ] indicial = d * ( d - 1 ) + d * p0 + q0 frobdict = { } for i in range ( 1 , n + 1 ) : num = c * ( m * pseries [ ( i , ) ] + qseries [ ( i , ) ] ) for j in range ( 1 , i ) : sym = Symbol ( "C" + str ( j ) ) num += frobdict [ sym ] * ( ( m + j ) * pseries [ ( i - j , ) ] + qseries [ ( i - j , ) ] ) # Checking for cases when m1 - m2 is an integer. If num equals zero # then a second Frobenius series solution cannot be found. If num is not zero # then set constant as zero and proceed. if m2 is not None and i == m2 - m : if num : return False else : frobdict [ numsyms [ i ] ] = S ( 0 ) else : frobdict [ numsyms [ i ] ] = - num / ( indicial . subs ( d , m + i ) ) return frobdict