Hacker News new | ask | show | jobs
by dreamcompiler 28 days ago
> And it turns out that it’s quite straightforward to calculate a derivative, no matter what type of function it is.

I get the author's point but this is not completely true; there exist functions that are not differentiable at certain places (e.g. ideal square waves) and others that are not differentiable anywhere (e.g. Weierstrass functions).

https://en.wikipedia.org/wiki/Weierstrass_function

3 comments

It's important to know that (in the usual setting of analysis) not every function is everywhere (or even anywhere) differentiable, but this is more orthogonal to the author's point than opposed to it. A square wave is piecewise differentiable and you can compute a piecewise derivative. The Weierstrass function is defined by an infinite series, and you can compute its derivative term-by-term by the usual rules and check that the result does not converge; it is indeed straightforward to calculate its nonexistent derivative, and this is what Weierstrass did!

In general, to even ask what it means to compute a derivative we need to specify some input language which describes functions in finite terms; we are necessarily in the world of constructions rather than (say) arbitrary set-theoretical maps between infinite sets. With this in mind, the claim that differentiation is always a straightforward computation is a strong one.

Fair point. The mathematical process of differentiation is always straightforward even if in some cases one ends up with e.g. /0 singularities.

With integration, there's often no closed-form process at all, as the author points out.

On the other hand, integration is numerically well-defined for piecewise continuous functions, while differentiation isn't and may result in nothing useful. Derivative of a square wave is constant zero with some gaps.
FWIW in numerical analysis stable differentiation is harder than integration.
But it's quite straight forward to identify that too.
Not always. As an exercise, try to find a continuous real function which is differentiable if and only if the Riemann hypothesis is true!
Easy. Let f be a continuous real function that is not differentiable somewhere. Let H be the truth value of the Riemann hypothesis. Define g(x) as "f(x) if not H else 0". Boom.

Reminds me of a homework exercise in theory of computation back in my uni days. Is the function "f(x) is 0 if H else 1" computable? Of course it is. It is either constant 0 or constant 1. We don't know which at this point, but f is a constant function in either case, so it is surely computable.