As an example, I have the following piecewise function
using SymPy
@syms x
f(x) = (0 <= x <=10 ? 2*x : 3*x^2)
I tried to differentiate f(x)
with respect to x
df = sympy.diff(f(x),x)
It results to non piecewise function 6*x
which is valid only when x
is not in the range [0; 10].
Please help me.
Thank you.