Question

Both Wolfram Alpha (diff abs(x)) and Maxima (diff(abs(x),x,1);) say that the absolute value function is differentiable at x=0, and that the derivative is x/abs(x).

How would you go about excluding the point x=0 from the domain when formulating the query? Thanks!

P.S. This occurs with Maxima (build_info("5.27.0","2012-05-09 21:24:21","x86_64-unknown-linux-gnu","GNU Common Lisp (GCL)","GCL 2.6.7")).

Was it helpful?

Solution

In maxima you can use a wrapper function with wider domain:

f: abs(x);
df(x):= ''(diff(f, x));
dfun(x):= block([eps: 1e-15], if abs(x)>eps then df(x) else 1);
plot2d(dfun(x), [x, -1, 1], [y, -1.1, 1.1], [ylabel, df(x)]);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top