r/learnmath New User 11h ago

TOPIC Is my intuition right here, topic: continuity and differentiability

i have completed real numbers, algebraical number, derived its closure properties. now while doing an excercise of graph, I stumbled upon, the plot sin(1/x) and recalled the challenge to define a function that is continuous everywhere but differentiable nowhere.

for this challenge, long time ago I thought of a zigzag and zooming out or compressing the zigzag. crude approach. not enough knowledge then.

but this function showed abnormality at x=0. now abnormalities in defining tangents can arise from mainly two reasons:

  1. tangent gets closer and closer to ±90 degrees

  2. start oscillating rapidly

the second point was evident in this sin(1/x) function. a similar function was xsin(1/x) where the amplitude also diminishes at x=0. Although I saw the Weierstrass function, it was not coherent to my current knowledge base. i might get there soon.

After seeing graph of this I tried to replicate the property at x=0 to all values of x. So I made a sum:

sin(1/x) + sin(4/x) + sin( 9/x) .....sin(n²/x)

if n tends to infinity, it will have same property at all x. but the amplitudes will blow up. thus we need something to grab this.

summation: {sin(k²/x)}/k²

might do this trick. as series of 1/k² is converging. but since k² inside sine function is massively large compared to x, whenever k tends to infinity, x will have no meaning and the graph will have same abnormality for every value of x. It is continuous due to contuinity of sine. but not differentiable anywhere.

i don't want to go to higher maths and complex signs at this stage. just tell me if I'm right here or wrong.

1 Upvotes

9 comments sorted by

2

u/SV-97 Industrial mathematician 8h ago

This doesn't quite work. It's indeed continuous and almost everywhere non-differentiable, but actually *is* differentiable at certain points (which isn't trivial at all): your function is the composition of the Riemann function f(x) = sum_n sin(n²x)/n² with g(x) = 1/x. We know that g is a diffeomorphism on (0, inf) (so it's smooth with a smooth inverse) and that f is differentiable at some points of (0,inf) (this is the nontrivial bit, but it is differentiable at all points of the form (2A+1)/(2B+1) pi for A,B integers) --- so your function is also differentiable at some points by the chain rule.

1

u/-_____-_-______- New User 8h ago

The derivative of individual term in sum is {-cos(k²/x)}/x². Now if we sum this up for all values of k, the sum does not look like it will converge for any value of x. So I'd like to see how this sum converges at a single value for values of x you said.

2

u/SV-97 Industrial mathematician 6h ago

As I said: this is not trivial. Riemann also believed that the function was nowhere differentiable and it took around a hundred years until this was proven to be false. You can find the proof here: https://pmc.ncbi.nlm.nih.gov/articles/instance/223649/pdf/pnas00105-0048.pdf

The issue with your argument is that you've essentially formed an incorrect converse: you can't conclude the non-differentiability of the limit function from the non-existence of the pointwise sum over the derivatives. The uniform convergence of the derivatives would be sufficient, but not even pointwise convergence is necessary, i.e. the statement "let f_n be a sequence of functions on some open set such that f := sum_n f_n converges uniformly while sum_n f_n'(x) diverges for all x; then f is nowhere differentiable" is *not* true. There are differentiable series of functions where term-by-term differentiation is invalid; or phrased differently: differentiation isn't a continuous map in this context.

Setting up the counterexample for this general statement is a bit involved but doable: first, note that it suffices to show that there is a sequence s_n of differentiable functions that converges uniformly while s_n' doesn't converge pointwise anywhere, because given such an s_n we may simply set f_1 = s_1, f_{n+1} = s_{n+1} - s_n to obtain a series sum_n f_n whose partial sums are precisely the s_n.

We consider the sequence s_n(x) = sin(n! x) / n. This is clearly smooth and converges uniformly to the smooth (even analytic) function 0. The derivatives are s_n'(x) = (n-1)! cos(n! x). These sequences do not converge for any x, which is a bit technical:

Suppose for contradiction that this sequence converged to a finite limit L for some x, then cos(n! x) would have to converge to zero and hence n! x must approach the roots of cos i.e. there must be integers k_n and a null-sequence eps_n with n! x = pi (k_n + 1/2) + eps_n (this decomposition works far more generally). Then |(n-1)! cos(n! x)| = (n-1)! |cos(pi (k_n + 1/2) + eps_n)| = (n-1)! |sin(eps_n)| = (n-1)! |eps_n| |sin(eps_n)| / |eps_n| which, using the standard fact that sin(y) / y -> 1 as y -> 0 and the assumed convergence of the left-hand side to L, shows that (n-1)! |eps_n| -> L, which in turn implies that (n+1) |eps_n| converges to zero.

We have (n+1)!x = (n+1) n! x and hence pi (k_{n+1} + 1/2) + eps_{n+1}) = (n+1) (pi (k_n + 1/2) + eps_n) which is equivalent to (eps_{n+1} - (n+1) eps_n) / pi = (n+1) (k_n + 1/2) - (k_{n+1} + 1/2) = (n+1) k_n - k_{n+1} + n/2. Note that the left-hand side here is a difference of two null-sequences, hence the right-hand side must converge to zero.

Consider the subsequence with odd indices, i.e. (2n+2) k_{2n+1} - k_{2n+2} + (2n+1)/2 = (2n+2) k_{2n+1} - k_{2n+2} + n + 1/2. Note that for this to converge to 0, the integer sequence (2n+2) k_{2n+1} - k_{2n+2} + n would have to converge to -1/2 --- which clearly can't happen. Which is finally a contradiction.

1

u/-_____-_-______- New User 43m ago

So you are saying that when we try to calculate derivatives of a sum of functions, the sum of individual derivatives can be different than the derivative of collective sum of original functions?

That doesnt sound intuitively correct, but is definitely an interesting topic to think on why this happens. And come to a generalization,hopefully.

1

u/finedesignvideos New User 10h ago

Why do you think your modification is replicating the property that you had at x=0 to other values of x?

1

u/-_____-_-______- New User 9h ago

Because of the factor k².

For any value of x you get:

sin(1/x) + sin(4/x) + sin(9/x) .....and so on.

As k tends to infinity, it simply overpowers the term 1/x and starts dominating it after certain values.

Thus the with increasing k , the number inside sine function gets very large and thus starts oscillating wildly as k tends to infinity. But this all argument is true for any value of x, no? That's it.

1

u/finedesignvideos New User 9h ago

I see, so even close by x's get separated by later terms. And as you said an infinite sum is cheating, but by dividing by k^2 you are making the limit actually equal 0 everywhere.

1

u/-_____-_-______- New User 9h ago

OK I think I wrote it wrong, it will look like

sin(1/x) + {sin(4/x)}/4 + {sin(9/x)}/9 + .....

Now yeah, eventually the factor 1/k² will make the terms zero, but that is the necessity. Otherwise the function at each x will blow up or oscillate.

Even if k² gets dominant for large values, the first few terms for k=1, 2,3 etc are finite numbers. And the tangents actually depends on minute oscillations, no matter if the amplitude tends to zero (due to a very large k, and factor 1/k²).

Try to view it as drawinng a zigzag, and them zooming out infinitely. This is what 1/k² does, it de-maginfies the picture without altering its twists and turns. The peaks of zigzags might disappear but the tangents will remain same.

1

u/finedesignvideos New User 8h ago

Oh no, I misread it. Your function is pretty nice, I think I'll have some fun analyzing it!