Hacker News new | ask | show | jobs
by JadeNB 2251 days ago
Thank you for this response. All smooth curves are also approximately linear at all points, but that doesn't mean that we can't usefully predict and model an appropriate non-linear fit.
1 comments

Not disagreeing, what you say seems right to me, but it ("All smooth curves ...") also seems like the sort of result that there might be a counterexample to, like a smooth curve that at no scale has a linear approximation. Maybe a fractal with a smoothly varying generator??

For curves of infection rates I don't doubt your verity.

“Smooth” is a term of art in math that means continuously differentiable infinitely many times. These functions are a subset of those functions that are differentiable once.

Differentiable once means, by definition, approximable everywhere by a line at small enough scale.

Yes, I know that much.

Imagine a sine wave, except when you look at it at 1000x magnification it's a sin + cos. It looks smooth, and at x = π you think that the derivative will be -1 but in fact it's 0 because you don't have a sine crossover there you have a cosine trough.

Except at 1000000 times magnification (ie another 1000) the cosine curve that forms that apparent sine curve is itself a sine curve. So everything is switched again.

f(x) is something like sin(x)+cos(ax)/a+sin(a^2x)/a^2+cos(a^3x)/a^3+ ... (sin(x.a^j)/a^j+cos(x.a^j+1)/a^j+1+ ...

for a=some arbitrary large number. Something like that, I'm a bit rusty, sorry.

At whatever scale you look at the curve the derivative is always wrong: you zoom in on the sine, at the peak it's got a cosine, so the d/dx is -1; but zoom in and the cosine has a sine at the crossing point, so the d/dx is 0; but zoom in and ...

The curve is provably smooth, it's sinuses all the way down, but nowhere can you tell the derivative as it's fractal???

That's what I had in mind.

Anyway, I thought their might be clever curves of that type.

A curve with the properties you describe is not smooth, by definition, since it is not differentiable.

> At whatever scale you look at the curve the derivative is always wrong: you zoom in on the sine, at the peak it's got a cosine, so the d/dx is -1; but zoom in and the cosine has a sine at the crossing point, so the d/dx is 0; but zoom in and ...

This is pretty much the definition of something not being differentiable. "Differentiable" means that the approximations to the derivative (i.e., difference quotients) converge to some fixed value as the scale they're measured at approaches the infinitely small.

You might be interested in the Weierstrass function, which seems to be the sort of thing you're getting at with your idea: https://en.wikipedia.org/wiki/Weierstrass_function . Continuous everywhere, but differentiable nowhere.

Edit: the specific function you wrote down is not differentiable (at least not everywhere). For example, at x=0, its derivative, if it had one, should be cos(0) + cos (a * 0) + cos (a^2 * 0) + ... , but that series clearly diverges.

cos(0) being 1, sin (0) begin 0; that series is 0 + 10e-3 + 0 + 10e-9 + 0 + 10e-15 + ... when x=0 (excuse my sloppy notation, I'm on a phone). Looks convergent to me, somewhere between 0.001000001000001 and 0.001000001000002 ?

Have you studied fractal dimensions formally, might I know the background you're speaking from?

Yes, I'm imagining, as a first example, something akin to a Weierstrass function but without the discontinuities.

https://www.desmos.com/calculator/c6tbl4zr9j

Yes, the original function converges (not its derivative). The terms in the derivative are no longer divided by a^k. The a^k from the argument to cos/sin cancels then out (it becomes a multiplier, because of the chain rule).

So the series for the derivative is 0 + 1 + 0 + 1 + ..., which doesn’t converge.

Not sure what this has to do with fractal dimensions. This is a simple question of definitions. The word “smooth”, in math, literally implies, by definition, that the function is everywhere approximable by lines.

If you don’t think it does, can you state the formal definition of “smooth” that you’re using?

The Weierstrass function doesn’t have discontinuities, btw.

> “Smooth” is a term of art in math that means continuously differentiable infinitely many times. These functions include, as a subset, functions which are differentiable once.

Of course you knew what you meant, but, for anyone who's confused, the containment goes the other way.

You’re right. Edited to fix the error.
the unstated condition there is that the window for approximating linearity must be flexible for a given error envelope - smaller windows for higher rates of change of the curve. so while technically correct, it isn’t always practically useful.