What does the antiderivative of a continuous-but-nowhere-differentiable function “look like”?

Weierstrass’ function is an example of a function that is continuous, but nowhere differentiable, and can be visualized as being “infinitely wrinkled”. I’m having trouble, however, imagining how the integral of such a function would appear. All the techniques that I know of for approximating functions (Taylor series, etc.) would fail on this one. How can this be visualized?

Solutions Collecting From Web of "What does the antiderivative of a continuous-but-nowhere-differentiable function “look like”?"

I plotted the Weierstrass function $f(x) = \displaystyle\sum_{n = 0}^{\infty}\dfrac{1}{2^n}\cos(3^n\pi x)$ and its antiderivative $F(x) = \displaystyle\sum_{n = 0}^{\infty}\dfrac{1}{6^n\pi}\sin(3^n\pi x)$. Here is what they look like:

Weierstrass Function

enter image description here

The antiderivative of the Weierstrass function is fairly smooth, i.e. not too many sharp changes in slope. This just means that the Weierstrass function doesn’t rapidly change values (except in a few places).

integrals, unlike derivatives, are highly insensitive to small changes in the function. Since any continuous function on a closed interval can be approximated as well as you like by a polynomials (i.e., there is a sequence of polynomials converging uniformly to the function), and since the integral commutes with uniform limits (this is the precise statements that the integral is insensitive to small changes), it follows that the integral of the Weierstrass function looks very much like the integral of a polynomial. As for the anti-derivative, when you ask what does it look like, what kind of answer are you expecting? It will be a continuous function, and it would be quite smooth (but, of course, not very smooth).

The answer with the pictures is a great one, but there are some ways you can approach this without plotting tools. You should remember throughout that the process of integration takes you from a less smooth function to a smoother function, and differentiation does the opposite.

It’s easy to make a function which behaves at a single point the way that the Weierstrass function does at every point. A standard example such as $f(x) = x \sin(\frac{1}{x})$ has gradients between $(0, f(0))$ and $(h, f(h))$ oscillating between $1$ and $-1$ for arbitrarily small $h$. What does the integral of this function look like, close to $0$? You will see that, whereas for the original function the value of the function approaches $0$ and the first derivative is wild, for the indefinite integral the value of the first derivative approaches $0$ and the second derivative is wild.

It’s not clear what a ‘wild’ second derivative does to a function. Intuitively there are points where the gradient of the curve changes very fast. However, these are very ‘localized’ – the gradient changes drastically, but then changes back in the opposite direction before the value of the function can move too far. To get a handle on this you can think about an even simpler example – the function $f(x) = sgn(x) \sqrt{|x|}$. This is continuous, but non-differentiable at 0. Its indefinite integral looks like a parabola, but has a point of non-smoothness at 0, where its second derivative jumps. Mathematically the behavior here is very different from $f(x) = x^2$, which is a proper parabola, smooth at $0$, but visually it is not very obvious. If you imagine what is happening close to zero – the gradient is ‘settling down’ to $0$, as it should, but not quite as fast as it should, to avoid needing to turn faster and faster. [Imagine someone parking a car in a bay, but having to turn the wheel further and further to get the car straight before reaching the end of the space.]

You can also use term-by-term integration to see what the coefficients of the $\sin$ components look like. Quite trivially you will see that they tend to $0$ very fast, and you can imagine how much these quickly vanishing perturbations affect the graph. Since the function is Lipschitz, the fractal dimension of the curve is $1$, unlike the graph of the Weiestrass function.

A final observation which might be helpful to those who have some measure theory (but don’t worry about it if you don’t). In $L^1$, analytic functions are dense. This means that all functions are very close to analytic functions in integral. So the integral of even the most pathological function doesn’t have much to distinguish it from something which is as ‘nice’ as possible.

The two last paragraphs can perhaps augment the picture of the graph of the integral in @JimmyK4542’s answer. There is some small-scale detail missing from the graph (of course) but it is very small and unimportant to the geometry of the graph. Nice question btw.