- #1
- 2,168
- 193
I am trying to solve the equation like this,
Why this is happening ?Thanks
Python:
from sympy.solvers import solve
from sympy import Symbol
import math
x = Symbol('x')
A, B, C, D = 0.59912051, 0.64030348, 263.33721367, 387.92069617
print(solve((A * x) + (B * math.sqrt(x**3)) - (C * math.exp(-x / 50)) - D, x , numerical = True))
Code:
Traceback (most recent call last):
File "c:/Users/***/Desktop/Python Stuff/***", line 9, in <module>
solve((A * x) + (B * math.sqrt(x**3)) - (C * math.exp(-x / 50)) - D, x , numerical = True)
File "C:\Users\***\AppData\Local\Programs\Python\Python37\lib\site-packages\sympy\core\expr.py", line 280, in __float__
raise TypeError("can't convert expression to float")
TypeError: can't convert expression to float
Why this is happening ?Thanks