Pretty squiggles

Here’s an image that came out of something I was working on this morning. I thought it might make an interesting border somewhere.

The blue line is sin(x), the green line 0.7 sin(φ x), and the red line is their sum. Here φ is the golden ratio (1 + √5)/2. Even though the blue and green curves are both periodic, their sum is not because the ratio of their frequencies is irrational. So you could make this image as long as you’d like and the red curve would never exactly repeat.

13 thoughts on “Pretty squiggles

  1. Very interesting although I can’t say the “border” appeals to me aesthetically.
    A few other perhaps surprising facts about sums of periodic functions:

    (a) The sum of two periodic functions can be a periodic function with a frequency higher than both constituents.

    (b) It is possible to write the function f(x) = x as the sum of two periodic functions.

    (c) It is impossible to write x² as the sum of two periodic functions.

  2. @Steven, that’s right. In fact, the functions are so strange you need the Axiom of Choice to assert their existence.

  3. Do you have a reference? It seems to me any periodic function defined everywhere must be bounded, and the sum of two bounded functions must be bounded… What am I missing?

  4. As far as I know, the fact that actual computers have finite precision implies that the ratio of the constituents frequency will be rational, given that each frequency will be a multiple of some negative power of two or ten. Therefore, their sum will in fact be periodic. Irrational numbers can only be represented symbolically in computers.

  5. @I. J. Kennedy, what is it that means you can write f(x) = x as the sum of two periodic functions, but not f(x) = x²? Is it to do with x being uniformly continuous but x² not?

    @John D. Cook, presumably the red line comes arbitrarily close to being periodic, in some sense, in the same way that rational combinations of 1 and sqrt(2) can come arbitrarily close to being rational?

  6. I feel like I should be able to figure this out by myself, but just to confirm — when you say “the curve will never exactly repeat,” are you simply saying it’s not (globally) periodic, or that there exists no two non-empty intervals that match exactly?

  7. If f and g are non-constant continuous periodic functions then f+g is periodic iff the ratio of principal periods of f and g is a rational number.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>