I want to print the derivative of e**4*x. I want Python to give me 4*e**4x. Instead, it's giving me 4 times THE VALUE OF E. HOw can I get sympy to display e as the letter constant.
Thanks
Note that by default in SymPy the base of the natural logarithm is E (capital E). That is, exp(x) is the same as E**x.
You should be using exp to represent exponents as opposed to the letter e.
Example, it should be like this:
from sympy import *
x = symbols('x')
print diff(exp(4*x))
This outputs:
4*exp(4*x)
As desired.
Regarding the problem with your code - Without much more else to go on - it seems like you've set e to be a variable somewhere.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With