# Construct a function that is nowhere differentiable.

I have been working on this question for a very long time now and seem to have reached a dead end, I will show all my attempted solutions, and any help on the various parts of the question would be much appreciated.

Now for Part $(a)$, the graphs I got are the following ; $f_{0}(x)=\sum_{r=0}^{0}2^{-r}K(2^{r}x)$:

$f_{1}(x)=\sum_{r=0}^{1}2^{-r}K(2^{r}x)$

$f_{2}(x)=\sum_{r=0}^{2}2^{-r}K(2^{r}x)$

$f_{3}(x)=\sum_{r=0}^{3}2^{-r}K(2^{r}x)$

$f_{10}(x)=\sum_{r=0}^{10}2^{-r}K(2^{r}x)$

Now it is obvious to see that the larger $n$ become the more complicated and horrible looking $f_{n}$ becomes, and to me it looks very discontinuous, even though I know its continuous,
For $(b)$
I feel quite lost as to how to approach this, I tried to decipher the hint , now if $f_{n_{0}}$ is continuous, by definition

For all $\epsilon>0$ $\exists$ $\delta>0$ such that $|x-c|<\delta$ implies $|\sum_{r=0}^{n_{0}}2^{-r}K(2^{r}x)-\sum_{r=0}^{n_{0}}2^{-r}K(2^{r}c)|<\epsilon$
Now I don't know how to go further to incorporate the hint.

-
As $K$ is continuous, how can you get discontinuous functions from finite linear combinations of transforms of $K$? (In other words: reconsider your function graphs) – Hagen von Eitzen Apr 26 '14 at 11:52
A finite sum of continuous functions is continuous – Mark Bennet Apr 26 '14 at 11:52
@MarkBennet Yes I know, I just commented on how intuitively the graph does not look continuous, but how do I prove this for part $b$ by finding a suitable $\delta$?? – otupygak Apr 26 '14 at 11:56

Your functions $f_n$ are not discontinous, they should look like this for $n=0,1,2,10$:

Edit: Your function is very similar to the famous Blancmange function, see here for a proof of continuity, which might also help for your case.

-
out of interest which software did you use to plot this? – otupygak May 19 '14 at 13:28
@Kimo I used a python-based library called matplotlib, see matplotlib.org/gallery.html – flonk May 19 '14 at 14:26

There must be something wrong with the way you generate your graphs. The ones for $f_1$ upto $f_{10}$ are wrong.

For example, already for $f_1$ something goes wrong when the graph shows $f_1(\frac12)= 1$. It should be $\frac12$ because $$f_1(\tfrac12) = K(\tfrac12)+2^{-1}K(2^1\times \tfrac12) = K(\tfrac12) = \tfrac12$$ because $K(1)=0$ so the second term disappears.

Perhaps you've mistyped something such that the by-cases definition of $K(2^rx)$ tests the fractional part of $x$ instead of the fractional part of $2^rx$?

-

If you use your first function, f0, and instead of making it look discontinued. Make smaller intervals, make your intervals so small, you will get something like this:

lim
interval --> 0


That way you get the same as in f0, but looking at it from a very far distance (zoomed out). Then your function is still continuous, but cannot be differentiated, I suppose.

I am sorry I can not give a very concrete answer, I do not really understand your function (am still in highschool), however I hope you get my point of using extremely small intervals.

-

If you want a function that is continuous everywhere but differentiable nowhere you are basically talking about a fractal. Here's a special and unique snowflake:

http://en.wikipedia.org/wiki/Koch_snowflake

-