def solve_de(f, x, DE, order, g, k):
 sol = None
 syms = DE.free_symbols.difference({g, x})
 if syms:
  RE = _transform_DE_RE(DE, g, k, order, syms)
 else:
  RE = hyper_re(DE, g, k)
 if (not RE.free_symbols.difference({k})):
  sol = _solve_hyper_RE(f, x, RE, g, k)
 if sol:
  return sol
 if syms:
  DE = _transform_explike_DE(DE, g, x, order, syms)
 if (not DE.free_symbols.difference({x})):
  sol = _solve_explike_DE(f, x, DE, g, k)
 if sol:
  return sol

def solve_de ( f , x , DE , order , g , k ) : sol = None syms = DE . free_symbols . difference ( { g , x } ) if syms : RE = _transform_DE_RE ( DE , g , k , order , syms ) else : RE = hyper_re ( DE , g , k ) if ( not RE . free_symbols . difference ( { k } ) ) : sol = _solve_hyper_RE ( f , x , RE , g , k ) if sol : return sol if syms : DE = _transform_explike_DE ( DE , g , x , order , syms ) if ( not DE . free_symbols . difference ( { x } ) ) : sol = _solve_explike_DE ( f , x , DE , g , k ) if sol : return sol
solves the de .