def _solve_hyper_RE(f, x, RE, g, k):
 terms = Add.make_args(RE)
 if (len(terms) == 2):
  gs = list(RE.atoms(Function))
  (P, Q) = map(RE.coeff, gs)
  m = (gs[1].args[0] - gs[0].args[0])
  if (m < 0):
   (P, Q) = (Q, P)
   m = abs(m)
  return rsolve_hypergeometric(f, x, P, Q, k, m)

def _solve_hyper_RE ( f , x , RE , g , k ) : terms = Add . make_args ( RE ) if ( len ( terms ) == 2 ) : gs = list ( RE . atoms ( Function ) ) ( P , Q ) = map ( RE . coeff , gs ) m = ( gs [ 1 ] . args [ 0 ] - gs [ 0 ] . args [ 0 ] ) if ( m < 0 ) : ( P , Q ) = ( Q , P ) m = abs ( m ) return rsolve_hypergeometric ( f , x , P , Q , k , m )
see docstring of :func:rsolve_hypergeometric for details .