How can I analytically differentiate in Python?
E.g:
d/dx (x^3 * L * lambda /(pi*d))
Additional:
You can use sympy to differentiate a function symbolically
sympy
>>> from sympy import * >>> x, L, lamb, d = symbols('x L lamb d') >>> f = x**3 * L * lamb / (pi * d) >>> f L*lamb*x**3/(pi*d) >>> diff(f, x) 3*L*lamb*x**2/(pi*d)