def ode_Riccati_special_minus2(eq, func, order, match):
 x = func.args[0]
 f = func.func
 r = match
 (a2, b2, c2, d2) = [r[r[s]] for s in 'a2 b2 c2 d2'.split()]
 C1 = get_numbered_constants(eq, num=1)
 mu = sqrt((((4 * d2) * b2) - ((a2 - c2) ** 2)))
 return Eq(f(x), (((a2 - c2) - (mu * tan((((mu / (2 * a2)) * log(x)) + C1)))) / ((2 * b2) * x)))

def ode_Riccati_special_minus2 ( eq , func , order , match ) : x = func . args [ 0 ] f = func . func r = match ( a2 , b2 , c2 , d2 ) = [ r [ r [ s ] ] for s in 'a2 b2 c2 d2' . split ( ) ] C1 = get_numbered_constants ( eq , num = 1 ) mu = sqrt ( ( ( ( 4 * d2 ) * b2 ) - ( ( a2 - c2 ) ** 2 ) ) ) return Eq ( f ( x ) , ( ( ( a2 - c2 ) - ( mu * tan ( ( ( ( mu / ( 2 * a2 ) ) * log ( x ) ) + C1 ) ) ) ) / ( ( 2 * b2 ) * x ) ) )
the general riccati equation has the form .