The Weierstrass function is defined as: $$f(x) = \sum_{n=1}^\infty a^n\cos{(b^n\pi x)}$$ where $0\lt a\lt 1$ and $b$ is a positive integer such that $ab\gt 1+\frac{3\pi}{2}$.

The interesting thing about this function is seen by taking its derivative: $$\frac{df}{dx} = -\sum_{n=1}^\infty a^nb^n\pi\sin(b^n\pi x)\nonumber$$ which clearly diverges as $n\to\infty$. The function is therefore continuous everywhere, but nowhere differentiable!

There are actually a lot of different functions that have this property: continuous everywhere, differentiable nowhere. Another one, perhaps one of the earliest functions Weierstrass played with, is: $$f(x) = \sum_{n=1}^\infty \frac{1}{2^n}\cos(4^n\pi x)$$ which has a derivative $$\frac{df}{dx} = -\sum_{n=1}^\infty 2^n\pi\sin(4^n\pi x)\nonumber$$

According to the distinguished Professor Doron Levy at the University of Maryland Mathematics Department, the discovery of this function was a big crisis in mathematics, as prior to that point, people believed more or less, that math is aligned with intuition. So pretty much no one accepted this example as something that is consistent with math the way we know it. It took quite some time to convince that this is indeed a valid example, and that math can allow the construction of such objects.

You can choose which one you want to use here: Select function number:

You can see the fractal properties (scale independence) of this function by zooming in (using the buttons on the row between the "Limits in x").

LowHigh
Limits in x:
Zoom x by 10:
Note: you might have to rescale $y$ each time you zoom in
$y_{min}$$y_{max}$
Limits in y:
or Set limits automatically
Number of points:
Value for $a$: 0.5
Number of terms in series to keep:

Plot width:


Last updated Nov 7, 2022 Drew Baden

All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher, except in the case of brief quotations embodied in critical reviews and certain other noncommercial uses permitted by copyright law.