def ode_1st_homogeneous_coeff_subs_dep_div_indep(eq, func, order, match):
 x = func.args[0]
 f = func.func
 u = Dummy('u')
 u1 = Dummy('u1')
 r = match
 C1 = get_numbered_constants(eq, num=1)
 xarg = match.get('xarg', 0)
 yarg = match.get('yarg', 0)
 int = Integral(((- r[r['e']]) / (r[r['d']] + (u1 * r[r['e']]))).subs({x: 1, r['y']: u1}), (u1, None, (f(x) / x)))
 sol = logcombine(Eq(log(x), (int + log(C1))), force=True)
 sol = sol.subs(f(x), u).subs(((u, (u - yarg)), (x, (x - xarg)), (u, f(x))))
 return sol

def ode_1st_homogeneous_coeff_subs_dep_div_indep ( eq , func , order , match ) : x = func . args [ 0 ] f = func . func u = Dummy ( 'u' ) u1 = Dummy ( 'u1' ) r = match C1 = get_numbered_constants ( eq , num = 1 ) xarg = match . get ( 'xarg' , 0 ) yarg = match . get ( 'yarg' , 0 ) int = Integral ( ( ( - r [ r [ 'e' ] ] ) / ( r [ r [ 'd' ] ] + ( u1 * r [ r [ 'e' ] ] ) ) ) . subs ( { x : 1 , r [ 'y' ] : u1 } ) , ( u1 , None , ( f ( x ) / x ) ) ) sol = logcombine ( Eq ( log ( x ) , ( int + log ( C1 ) ) ) , force = True ) sol = sol . subs ( f ( x ) , u ) . subs ( ( ( u , ( u - yarg ) ) , ( x , ( x - xarg ) ) , ( u , f ( x ) ) ) ) return sol
solves a 1st order differential equation with homogeneous coefficients using the substitution u_1 = frac{text{<dependent variable>}}{text{<independent variable>}} .