# Example of a Function

1. Nov 14, 2005

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

2. Nov 14, 2005

### Hurkyl

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

3. Nov 14, 2005

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?

4. Nov 14, 2005

### hypermorphism

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.

5. Nov 14, 2005

### benorin

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)

6. Nov 14, 2005

### quasar987

This might not be the most on-topic post ever but lookit it's pretty funny:

:rofl: :rofl: :rofl: :rofl:

7. Nov 14, 2005

### leon1127

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.

8. Nov 15, 2005

### NateTG

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.

9. Nov 15, 2005

### benorin

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?

10. Nov 15, 2005

### benorin

Continuity is a neccessary, but not a sufficient condition for differentability. So no, you cannot differentiate a non-continuous function.

Last edited: Nov 15, 2005
11. Nov 15, 2005

### leon1127

So it means that suck function doesnt exist?

12. Nov 15, 2005

### benorin

What's a suck function?

13. Nov 15, 2005

### amcavoy

I think he meant "such" function.

14. Nov 15, 2005

### fourier jr

lmao :rofl:

Last edited: Nov 15, 2005
15. Nov 15, 2005

### hypermorphism

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

16. Nov 16, 2005

### Robokapp

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.

17. Nov 16, 2005

### HallsofIvy

Staff Emeritus
Just about every calculus book has a proof that a function is differentiable at c only if it is continuous at c. There is no such function.