I'm having trouble using Sympy to solve an equation. When I run the code, for example:
print(correction(10))
I expect it to print a number which is f. Instead it gives me ERROR: execution aborted.
def correction(r):
from sympy import cosh, log, exp, symbols, solve
f = symbols('f')
def equation():
return cosh(((r - 1.0)/(r + 1.0))*(log(2.0)/f)) - 0.5*exp(log(2.0)/f)
correction = solve(equation(),f)
return correction
What is the problem?