Example of a Function

Can someone give me an example of a function that is continuous everywhere yet differentiable nowhere?

Hurkyl
Staff Emeritus
Gold Member
Have you seen the Koch Snowflake, or any other fractal curve?

Seen them yes. Unfortunately I haven't studied them. I'm told that the discovery of such functions is what prompted the beginning of mathematical analysis. How is any such function defined?

See Mathworld, Planetmath and Wikipedia. Fractal curves are usually defined recursively. Details of each curve can be found in their respective articles.
The Weierstrass function is a related pathology. Weierstrass was one of the mathematicians (including Dedekind, Cantor, Kronecker, and so forth) that heralded the 2nd age of rigor, which put on firm ground many concepts that were previously nebulous in definition and application. Many pathologies were created at this time.

benorin
Homework Helper
Gold Member
Here's a function which is everywhere continuous but nowhere differentiable

$$\forall x\in\mathh{R}\mbox{ let } f_{0}(x)$$ be the distance from x to the nearest integer; thus $$f_{0}(x+1)=f_{0}(x)\mbox{ and }f_{0}(x)=\left| x \right|,\mbox{ for }\left| x \right| \leq \frac{1}{2}$$.
For each $$n\in\mathbb{N}$$, define $$f_{n}(x)=\frac{f_{0}(12^{n}x)}{2^{n}}$$, then $$f(x)=\sum_{n=0}^{\infty} f_{n}(x)$$ is such a function. (continuity is from uniform convergence)

quasar987
Homework Helper
Gold Member
hypermorphism said:
See Mathworld, Planetmath and Wikipedia. Fractal curves are usually defined recursively. Details of each curve can be found in their respective articles.
The Weierstrass function is a related pathology. Weierstrass was one of the mathematicians (including Dedekind, Cantor, Kronecker, and so forth) that heralded the 2nd age of rigor, which put on firm ground many concepts that were previously nebulous in definition and application. Many pathologies were created at this time.
This might not be the most on-topic post ever but lookit it's pretty funny:

My applied analysis textbook cover said:
Mr.Cauchy anounces that, in order to conform to the will of the Council, he will not anymore take care of providing, as he has done up until now, perfectly rigourous proofs of his statements.
Council of instruction of l'École Polytechnique,
november 24 1825
:rofl: :rofl: :rofl: :rofl:

i have a stupid question
Can you even take derivative if it is not continuous?
Assume it is not continuous at point C, then the limit of the slope approve to C from both sides should not be equal, thus derivative does not exist and nondifferentiable.

NateTG
Homework Helper
leon1127 said:
i have a stupid question
Can you even take derivative if it is not continuous?
Assume it is not continuous at point C, then the limit of the slope approve to C from both sides should not be equal, thus derivative does not exist and nondifferentiable.
There are functions that have the same derivative on both sides of discontinuities (like the greatest integer function), but the derivative at the discontinuity is undefined.

benorin
Homework Helper
Gold Member
Since there are everywhere continuous but nowhere differentiable functions, but every continuous function is integrable...[end my rant because Mathworld said it better, see below].

...continuity is a necessary but not sufficient condition for differentiability. Since some discontinuous functions can be integrated, in a sense there are "more" functions which can be integrated than differentiated. In a letter to Stieltjes, Hermite wrote, "I recoil with dismay and horror at this lamentable plague of functions which do not have derivatives."

The above quote is from http://mathworld.wolfram.com/Derivative.html

So in what "sense" is that [the " "more" " part]? I asked my Real analysis prof, he said in the sense of catagory. But I wonder, could it be true in the sense of cardinality? Specifically, is the cardinality of the set of all functions which are integrable greater than that of differentiable functions?

benorin
Homework Helper
Gold Member
leon1127 said:
i have a stupid question
Can you even take derivative if it is not continuous?
Assume it is not continuous at point C, then the limit of the slope approve to C from both sides should not be equal, thus derivative does not exist and nondifferentiable.
Continuity is a neccessary, but not a sufficient condition for differentability. So no, you cannot differentiate a non-continuous function.

Last edited:
benorin said:
Continuity is a neccessary, but not a sufficient condition for differentability. So no, you cannot differentiate a non-continuous function.
So it means that suck function doesnt exist?

benorin
Homework Helper
Gold Member
What's a suck function?

I think he meant "such" function.

lmao :rofl:

Last edited:
If I ever create an original pathology, its name shall be suck. :rofl:

Can someone give me an example of a function that is continuous everywhere yet differentiable nowhere?
Well it's technically not a function, but how about 0y+3x=6
it's a straight line, with an infinite value both plus and minus for every x different than 2.

Nah...that's not what you're looking for...what about f(x)=0?
I don't know...i tried.

HallsofIvy