Physics Forums Insights
  • Physics
    • Physics Articles
    • Physics Tutorials
    • Physics Guides
    • Physics FAQs
  • Math
    • Math Articles
    • Math Tutorials
    • Math Guides
    • Math FAQs
  • Bio/Chem/Tech
    • Bio/Chem Articles
    • Computer Science Tutorials
    • Technology Guides
  • Education
    • Education Articles
    • Education Guides
  • Interviews
  • Quizzes
  • Forums
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu
differentiable function

A Continuous, Nowhere Differentiable Function: Part 1

May 2, 2015/11 Comments/in Mathematics Tutorials/by jbunniii
📖Read Time: 4 minutes
📊Readability: Advanced 📐 (Technical knowledge needed)
🔖Core Topics: seriesfunctiondifferentiableinftycontinuous

When studying calculus, we learn that every differentiable function is continuous, but a continuous function need not be differentiable at every point. A standard example is ##f(x) = |x|##, which is continuous everywhere, and differentiable everywhere except at ##x=0##.

In this series of articles, we will construct a function that is continuous everywhere, but differentiable nowhere.

It is possible to construct such a function by summing a sequence of scaled and shifted copies of the absolute value function: ##g(x) = sum_{n=0}^{infty}a_n |x – b_n|##. By carefully choosing the sequences ##(a_n)## and ##(b_n)##, one can make ##g## continuous and nowhere differentiable.

We will use a different approach which will allow us to have some fun with Fourier series. Let us start by writing down two general expressions for the Fourier series of an even, ##2pi##-periodic, real-valued function with zero mean:

$$h(x) = sum_{n=1}^{infty} a_n cos(nx) = text{Re}left(sum_{n=1}^{infty} a_n e^{inx} right)$$

where ##(a_n)## is a sequence of real numbers. The terms of this series are continuous and differentiable (infinitely many times) at every point, yet as we will see, it is still possible to choose ##(a_n)## such that ##h## is continuous but nowhere differentiable.

Let’s examine what properties we will require from ##(a_n)## in order to achieve this. First, a sufficient condition to ensure continuity of ##h## is to require ##sum_{n = 1}^{infty} |a_n| < infty##. Indeed, if this condition holds, then the inequality ##|a_n cos(nx)| leq |a_n|## implies that the series ##sum_{n=1}^{infty} a_n cos(nx)## is absolutely convergent at every point. Furthermore, by the Weierstrass M-test, the series is also uniformly convergent, so ##h## is continuous.

Now, what about nowhere differentiability? If we define the power series

$$p(z) = sum_{n=1}^{infty} a_n z^n$$

then ##h(x) = text{Re}(p(e^{ix}))##. The radius of convergence of this power series is

$$R = frac{1}{limsup |a_n|^{1/n}}$$

If ##R < 1##, then the power series will diverge on the unit circle ##|z| = 1##, so the Fourier series ##h(x)## will also diverge at every point. If ##R > 1##, then the unit circle ##|z| = 1## is contained in the interior of the disk of convergence, so ##p## is analytic on the unit circle, and consequently, ##h## is not only continuous but differentiable infinitely many times at every point. In other words, if ##R > 1##, then ##h## will be a ##C^infty## function, also known as a smooth function. So, if we want ##h## to be continuous but nowhere differentiable (or, more generally, to be anything but a smooth function), we need to choose ##(a_n)## such that ##R = 1##. This is a necessary, but not sufficient condition.

Summarizing, a sufficient condition for ##h## to be continuous is ##sum_{n=1}^{infty} |a_n| < infty##, and a necessary condition for ##h## to be nowhere differentiable is ##limsup |a_n|^{1/n} = 1##. We will restrict our attention to functions satisfying both of these criteria. One such function is the Weierstrass function (more precisely, family of functions):

$$w(x) = sum_{k=0}^{infty} alpha^k cos(beta^k x)$$

where ##0 < alpha < 1##, and ##beta geq 2## is an integer. Comparing this with the Fourier series expression

$$sum_{n=1}^{infty}a_n cos(nx),$$

we see that the series defining ##w## is indeed a Fourier series, with the property that the only nonzero coefficients are the ones associated with the frequencies ##n=beta, beta^2, beta^3, ldots## Thus there are increasingly large gaps between nonzero coefficients as ##n## increases. Specifically,

$$a_n = begin{cases}alpha^k & text{if }n = beta^k \ 0 & text{otherwise}end{cases}$$

Such a series is called a lacunary Fourier series. (“Lacuna” is simply a fancy word for “gap.”) Since

$$sum_{n=1}^{infty}|a_n| = sum_{k=1}^{infty}alpha^k =frac{alpha}{1-alpha} < infty,$$

the convergence is uniform, so ##w## is continuous for any fixed ##alpha in (0,1)##. Also,

$$|a_n|^{1/n} = begin{cases} |alpha|^{k / beta^k} & text{if }n = beta^k \ 0 & text{otherwise}end{cases}$$

Since ##alpha > 0## and ##k / beta^k to 0## as ##k to infty##, it follows that ##limsup |a_n|^{1/n} = 1## and therefore the radius of convergence is ##R = 1##. This means that the necessary condition for ##w## to be nowhere differentiable is satisfied.

Can we find a sufficient condition for ##w## to be nowhere differentiable? A general principle with respect to the Fourier series is that smoother functions have coefficients that decay more rapidly as ##n to infty##. A nowhere differentiable function will be very un-smooth, so we want the Fourier coefficients ##a_n## to decay slowly (we want more contribution from the high-frequency components), while maintaining the constraint ##sum_{k=1}^{infty}|alpha^k| < infty## to preserve continuity.

The form of the function ##w(x) = alpha^k cos(beta^k x)## gives us two knobs to play with: ##alpha## and ##beta##. As long as ##0<alpha<1##, we maintain uniform convergence, hence continuity. For a given choice of ##alpha##, we can slow down the decay by increasing ##beta##. In 1872, Weierstrass proved that as long as ##beta## is large enough to satisfy ##alpha beta > 1 + 3pi/2##, then ##w## will be nowhere differentiable. This condition was later improved by Hardy to ##alpha beta geq 1##.

You can see a plot of what this function looks like for a suitable choice of ##alpha, beta## at the Wikipedia page for Weierstrass function.

The remaining parts of this article will present a proof of Weierstrass’s result, with just enough background material to make it self-contained without having to read 100+ pages to get to the nice proof in Stein and Shakarchi’s Fourier Analysis, which we will follow in spirit.

More Related Articles

  • Using the Fourier Series To Find Some Interesting Sums
  • Some Misconceptions on Indefinite Integrals
  • The Pantheon of Derivatives – 5 Part Series
  • Learn Further Sums Found Through Fourier Series
  • A Continuous, Nowhere Differentiable Function: Part 2
Tags: calculus, differentiable function, Fourier series
Share this entry
  • Share on Facebook
  • Share on X
  • Share on WhatsApp
  • Share on LinkedIn
  • Share on Reddit
  • Share by Mail
https://www.physicsforums.com/insights/wp-content/uploads/2015/05/cont-funt-tut.png 135 240 jbunniii https://www.physicsforums.com/insights/wp-content/uploads/2019/02/Physics_Forums_Insights_logo.png jbunniii2015-05-02 16:26:232026-02-16 10:16:29A Continuous, Nowhere Differentiable Function: Part 1
You might also like
fourierseries2 Learn Further Sums Found Through Fourier Series
hypercube integral A Novel Technique of Calculating Unit Hypercube Integrals
FourierSeries Using the Fourier Series To Find Some Interesting Sums
valentines reflections graphs Valentine’s Reflections: Mathematical Matters of the Heart
recursion Reduction of Order For Recursions
integration by parts What is Integration By Parts? A 5 Minute Introduction
11 replies
  1. Jimster41 says:
    May 19, 2016 at 3:57 pm

    “If you are referring to monstrous moonshine, that refers to a simple group (group without non-trivial normal subgroups) of very large order.”
    Yeah, that one. I’ve read the wiki on that at least twice now. I still have no idea what it means, except something like “Godzilla of primes” Maybe an insights for the future.

    Log in to Reply
  2. Jimster41 says:
    May 19, 2016 at 3:57 pm

    “[USER=517770]@Jimster41[/USER] – ##mathbb{Z}## is the symbol for the set of integers. However, when working with power series we are generally summing complex numbers, and it is customary to use lower case ##z## to denote a general complex number. The reason it’s useful to talk about power series in this context is because we have straightforward convergence theorems for them, and because a Fourier series of the form
    $$sum_{n=0}^{infty} a_n e^{i n x}$$
    is simply the power series
    $$sum_{n=0}^{infty}a_n z^n$$
    evaluated at ##z = e^{ix}##, which is simply the unit circle since ##|e^{ix}| = 1##.

    “Sup” means supremum, which is the same as “max” when working with finite sets, but it also generalizes to infinite sets which may not have a maximum value. For example, the interval ##[0,1)##, which is the set of all real numbers ##x## satisfying ##0 leq x < 1##, has no maximum value, but its supremum equals ##1##."Lim sup" means "limit superior", and it is a notion associated with sequences of real numbers. It is the unique number ##L## such that only finitely many of the terms of the sequence exceed ##L##, but infinitely many terms exceed any number smaller than ##L##. So for example, if ##a_n = (-1)^n##, the terms oscillate between ##1## and ##-1##. The lim sup of this sequence is ##1##. And the lim inf (which is defined analogously to lim sup) is ##-1##. If the sequence has a limit, then the lim sup and lim inf are both equal to the limit.Monstrous moonshine is related to the monster group from group theory, and is completely unrelated to this function. I haven't heard this function called the Weierstrass Monster Function until now, but I like it!P.S. If you are reading this directly below the blog post and the typesetting comes out garbled, try reading it in the thread associated with the blog post: [URL]https://www.physicsforums.com/threads/a-continuous-nowhere-differentiable-function-part-1.811795/#post-5096693[/URL] It's exactly the same post, but for some reason it is not displaying correctly when viewed on the blog page."Very helpful. I can't believe I forgot that sum of e to complex powers version of the Fourier Theorem. Actually practically my all time favorite... I memorized it (slackly) as "You can make any continuous signal with a tuned sum of impulses, or the right collection of oscillators, which are like the same thing". Pretty shocking...Yeah, I noticed the Tex doesn't seem to be working in the reply threads.Dug out the book I have on "Fractals, Chaos, Power Laws" by Manfred Schroeder. I put it down last time because it just blew mind mind I think. Partly as I think about it because It finally explained why complex exponents are so... real.I look forward to the second installment.

    Log in to Reply
  3. WWGD says:
    May 19, 2016 at 3:57 pm

    “Is that related at all to the crazy “Monstrous Moonlight” thingamajig? Is that one of the continuos but nowhere differentiable functions?”
    If you are referring to monstrous moonshine, that refers to a simple group (group without non-trivial normal subgroups) of very large order.

    Log in to Reply
  4. jbunniii says:
    May 19, 2016 at 3:57 pm

    P.S. I’m working on Part 2 today. That’s where it gets really interesting. :biggrin:

    Log in to Reply
  5. mathman says:
    May 19, 2016 at 3:57 pm

    [URL]http://en.wikipedia.org/wiki/Weierstrass_function[/URL]

    Above describes classical description.

    Log in to Reply
  6. Jimster41 says:
    May 3, 2015 at 4:10 pm

    The necessary condition where the limit of the supremum of the Fourier coefficients = 1 can be interpreted as a discrete invariance to scaling? In other words, it always looks the same periodically. Or is that wrong?

    Log in to Reply
  7. Jimster41 says:
    May 3, 2015 at 3:46 pm

    Is that related at all to the crazy “Monstrous Moonlight” thingamajig? Is that one of the continuous but nowhere differentiable functions?

    Log in to Reply
  8. Jimster41 says:
    May 3, 2015 at 3:43 pm

    Ah, helpful.

    Log in to Reply
  9. Jimster41 says:
    May 3, 2015 at 3:37 pm

    Love it. I have a book on power series that I got about 2 chapters into… Then got dropped like a bag of rocks. This rings a bell from that. Because power series are interesting, and because I got dropped… About halfway down. I wanna understand… Z are the integers right. So the power series is on those. What does “Sup” mean, supremum (or max)? Also, and maybe this is not something you can explain easily, where does the separating out of the real and imaginary parts come from again. I have a good cartoon of what Fourier’s theorem says (from memories of a hellish “signals and Systems class) but operations with it quickly stupefy. Kind of wish there was some pictures…

    Log in to Reply
  10. vanhees71 says:
    May 3, 2015 at 9:39 am

    Great article! I remember that our analysis professor called this example the “Weierstrass Monster Function” :-)).

    Log in to Reply
  11. Greg Bernhardt says:
    May 2, 2015 at 4:31 pm

    Great first entry jbunniii! Looking forward to the rest of the series~

    Log in to Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply Cancel reply

You must be logged in to post a comment.

Trending Articles

  • Explosion-Generated Collapsing Vacuum Bubbles Reach 20,000 Kelvin
  • Explore Some Sins in Physics Didactics
  • It’s Elemental! The Periodic Table Quiz
  • Do Black Holes Really Exist?
  • Grab Bag Science Quiz and Trivia

Physics Forums

  • Classical Physics
  • Atomic and Condensed Matter
  • Quantum Physics
  • Special and General Relativity
  • Beyond the Standard Model
  • High Energy, Nuclear, Particle Physics
  • Astronomy and Astrophysics
  • Cosmology
  • Other Physics Topics

Receive Insights Articles to Your Inbox

Enter your email address:

Blog Information

  • Become a Member!
  • Write for Us!
  • Table of Contents
  • Blog Author List

Popular Topics

astronomy (17) black holes (17) classical physics (35) cosmology (16) education (23) electromagnetism (19) general relativity (19) gravity (24) interview (21) mathematics (39) mathematics self-study (21) Physicist (26) programming (18) Quantum Field Theory (31) quantum mechanics (36) quantum physics (24) relativity (40) Special Relativity (16) technology (19) universe (21)
2026 © Physics Forums, ALL RIGHTS RESERVED - Contact Us - Privacy Policy - About PF Insights
  • Link to X
  • Link to Facebook
  • Link to LinkedIn
  • Link to Youtube
Link to: Understanding Entropy and the 2nd Law of Thermodynamics Link to: Understanding Entropy and the 2nd Law of Thermodynamics Understanding Entropy and the 2nd Law of ThermodynamicsThermodynamicsLink to: LHC Part 2: Commissioning Link to: LHC Part 2: Commissioning LHC Part 2: Commissioning
Scroll to top Scroll to top Scroll to top