This question is related to this question on differentiation/integration which asks why differentiation is mechanical but integration is an art. The answers given all make a huge assumption: that one is trying to differentiate a symbolic expression which denotes **at least** a continuous function, usually in fact assuming it is differentiable. Which makes sense, from a mathematical point of view: why would one want to differentiate a non-differentiable function?

The problem is, it is actually quite difficult to tell whether a function is in fact differentiable or not. But, nevertheless, one can *blindly* apply mechanical rules, and still get an answer, which appears to make sense. My favourite example is $\frac{1}{4i\pi}\ln\left( e^{2i\pi x^2} \right)$ (which is purely real for $x$ real), which both Maple and Mathematica will happily differentiate to $x$.

So the question is: if differentiation is indeed so easy, why is it just as easy to get completely bogus answers from both Maple and Mathematica on a seemingly simple differentiation problem?