I want to solve for x in eq1 using sympy. When I try to solve the equation using sp.solve(), I get an error. When I use sp.solve_linear(), it seems to work but I am unable to evaulate the numerical value of the solution. All my variables are defined except x, and I want to solve for x. Is there another solver I could use? My code is below:
import sympy as sp
from sympy import pi, log
R0, Hb, P_, y, m, xhi_ = sp.symbols("0.003 5e8, 1000 2500 4*pi*10e-7 1")
P = P_/2
x, y = sp.symbols('x y')
eq1 = x - sp.sqrt((P - (m*(y*y)/2*pi)*log(R0/x))/(pi*xhi_*Hb))
a = sp.solve_linear(eq1, x)
sp.pprint(a)
sp.pprint(sp.N(a))