+ 1
derivation of a exponential function - python
I'm still new at this and I am trying to code a derivative calculator using python but when I try to differentiate exponential functions, the answer is not correct. Here is my code. from __future__ import division from sympy import * x,t = symbols('x t') Enter equation of i: ') equation=input(' ') print(diff(equation,x))
2 Antworten
+ 1
See this code. It is working very well.
Input: x*x
Output: 2*x
https://code.sololearn.com/cn0aB7ILHTNK/?ref=app
0
Try this function.
diff(exp(x**2), x)
Read more about sympy here
https://docs.sympy.org/latest/tutorial/calculus.html