I am trying to solve the following expression for x in python:
y = 1 / f * ln(1+c*x) / x
where c and f are numerical constants. Also f = ln(1+c) - c/(1+c)
Below is my code:
import sympy as sp
import math
y, x, y_LHS = sp.symbols("y x y_LHS", positive=True)
c = 10
f = math.log(1+c) - c/(1+c)
y = 1 / f * sp.log(1+c*x) / x
eqn = sp.Eq(y_LHS, y)
sol = sp.solve(eqn, x)
print(sol)
I am expecting an expression in terms of y_LHS to be printed out. However, after 13 minutes of run time, python gives me a MemoryError saying that Output exceeds the size limit. Is the expression too difficult for sympy to solve? Or am I doing something wrong?