The Weierstrass function is continuous but not differentiable:

-3 -2 -1 1 2 3 -1.5 -1.0 -0.5 0.5 1.0 1.5 b = 0.2

The function is defined by the Fourier cosine series

\[ f(x) = \sum_{k=0}^\infty a^k \cos( b^k \pi x ) \]

with \( 0 < a < 1 \). When \( a b > 1 \) the series for the derivative diverges and hence does not exist.

The animation changes the parameter b from .1 to 5 and back again, as on the linked page.

Complete code for this example:


 
 

Examples Page