6 votes

Periodic functions

Does there exist a function that does not include any trigonometric function in its definition that has similar properties (periodicity, for instance) as trigonometric functions? I can't think of any, and this strikes me as a bit surprising.

Edit: I thought of a simple answer: piecewise functions can achieve this!

19 comments

  1. [9]
    entangledamplitude
    Link
    In a sense, trigonometric functions are the fundamental periodic ones. If you look into Fourier analysis, you’ll see that any periodic function can be expressed as a sum of sines and cosines, to...

    In a sense, trigonometric functions are the fundamental periodic ones.

    If you look into Fourier analysis, you’ll see that any periodic function can be expressed as a sum of sines and cosines, to an arbitrarily good approximation (even piecewise defined periodic functions).

    6 votes
    1. [8]
      Wulfsta
      Link Parent
      I'm aware, I studied mathematics. It just surprises me that I haven't seen periodicity constructed elsewhere (without my simple answer of piecewise functions). Also to be pedantic, it's an...

      I'm aware, I studied mathematics. It just surprises me that I haven't seen periodicity constructed elsewhere (without my simple answer of piecewise functions).

      Also to be pedantic, it's an arbitrarily good approximation almost everywhere. ; )

      3 votes
      1. [4]
        skybrian
        (edited )
        Link Parent
        Sine and cosine functions aren't actually all that easy to compute digitally, so there's a sense in which they're not really fundamental to computing, they're just familiar mathematical...

        Sine and cosine functions aren't actually all that easy to compute digitally, so there's a sense in which they're not really fundamental to computing, they're just familiar mathematical definitions that are usually taken as atomic. You could define any function you like and give it a name.

        A sawtooth wave could be defined as x - floor(x) though that's not a good idea on a computer.

        3 votes
        1. [3]
          Wulfsta
          (edited )
          Link Parent
          From a mathematical perspective, any function that is in L2 over, say, [0, 1] is periodic. A function in this space that is impossible to compute meaningful values of on a computer is f(x)={0 if x...

          From a mathematical perspective, any function that is in L2 over, say, [0, 1] is periodic. A function in this space that is impossible to compute meaningful values of on a computer is f(x)={0 if x is Rational else 1}. Yet over [0, 1] the area under the function from this perspective is 1 and the Fourier Series would be the same as that for f(x)=1; the ability to compute values of a function like this easily isn't really what I'm looking for.

          I guess one answer to this question I've asked is any fuction in this space, but that sort of loops back to piecewise representation or a Fourier Series to get there.

          Disclaimer: I abused some notation in this post.

          2 votes
          1. [2]
            skybrian
            Link Parent
            I don't understand the Wikipedia article about L2. Is there an easier introduction?

            I don't understand the Wikipedia article about L2. Is there an easier introduction?

            1 vote
            1. Wulfsta
              Link Parent
              I would not know, my knowledge comes from a class I took using Barry Simon's A Comprehensive Course in Analysis. This should be in the first volume, but these are not introductory texts.

              I would not know, my knowledge comes from a class I took using Barry Simon's A Comprehensive Course in Analysis. This should be in the first volume, but these are not introductory texts.

              1 vote
      2. [3]
        entangledamplitude
        Link Parent
        Awesome, yes :-) So if you understand that, then what’s the motivation behind the original question? I don’t get it. What is special/surprising about piecewise functions, that doesn’t fit in that...

        arbitrarily good approximation almost everywhere. ; )

        Awesome, yes :-) So if you understand that, then what’s the motivation behind the original question? I don’t get it. What is special/surprising about piecewise functions, that doesn’t fit in that framework?

        1 vote
        1. [2]
          Wulfsta
          Link Parent
          I think the answer is that I hadn't realized that periodicity is equivalent to being in L2 over a real interval. Sine and Cosine are used because they're orthogonal functions in that space, but...

          I think the answer is that I hadn't realized that periodicity is equivalent to being in L2 over a real interval. Sine and Cosine are used because they're orthogonal functions in that space, but Fourier Series can be reformulated to use any sequence of orthogonal functions, which means that any function that is periodic can be reformulated to be defined without using trigonometric functions, even trigonometric functions.

          1 vote
          1. entangledamplitude
            (edited )
            Link Parent
            Oh yes, absolutely. The Fourier basis also has nice symmetry properties under translations, which is often why it is preferred. (The symmetry properties are easier to see intuitively by studying...

            Oh yes, absolutely.

            The Fourier basis also has nice symmetry properties under translations, which is often why it is preferred. (The symmetry properties are easier to see intuitively by studying Fourier transforms on a circle, and thinking of the line as a circle of infinite radius).

            1 vote
  2. psi
    Link
    You've seem to have missed the trivial example: f(x) = C (though as Wikipedia writes, despite being periodic, it lacks a fundamental period). Wikipedia has an incomplete list of periodic...

    You've seem to have missed the trivial example: f(x) = C (though as Wikipedia writes, despite being periodic, it lacks a fundamental period).

    Wikipedia has an incomplete list of periodic functions, but when rewritten in terms of elementary functions, they seem to reduce to trigonometric functions.

    4 votes
  3. [4]
    wirelyre
    Link
    Consider f: ℝ → ℂ where f(x) = -1x. Then for any x, f(x) = (-1)x = (-1)x1 = (-1)x(-1)2 = (-1)x+2 = f(x + 2). So f has period 2. Now, computing the power -1x almost always gives you a non-real...

    Consider f: ℝ → ℂ where f(x) = -1x.

    Then for any x, f(x) = (-1)x = (-1)x1 = (-1)x(-1)2 = (-1)x+2 = f(x + 2). So f has period 2.

    Now, computing the power -1x almost always gives you a non-real number, which might not be satisfying. You could take just the real part, but you'd probably want to rewrite it as a trigonometric function (bonus: which one?).

    There is a dual sense in which complex powers are the fundamental periodic functions. I like this because it works constructively. What do we need to add to the reals to solve all polynomials? Well, x2 + 1 = 0 implies we need a root of -1. But now we have i4 = 1, which already gives a periodic function ix. The basic structure of polynomials, of algebra itself, gave us periodicity.

    Or we can restrict f to the integers, f: ℤ → ℤ. It's still periodic. Once we admitted that (-1)(-1) = 1, we had periodic functions, since 1a=a.

    3 votes
    1. [2]
      skybrian
      Link Parent
      You might say exponentiation works when the domain is natural numbers because it's repeated multiplication, though -1 is the only value that connects back to the starting point. If you restrict...

      You might say exponentiation works when the domain is natural numbers because it's repeated multiplication, though -1 is the only value that connects back to the starting point.

      If you restrict the domain to natural numbers, you could just divide and take the remainder. Modular arithmetic repeats. In a sense, this is using repeated subtraction to connect back to the starting point.

      So, now, let's generalize this to recurrence relations. It doesn't seem particularly hard to construct sequences that loop back on themselves? But I was never much good at converting recurrence relations to closed form and I'm wondering what forms those equations can take?

      Also, I'm wondering what happens if you try to generalize this to real numbers?

      1 vote
      1. wirelyre
        Link Parent
        I think you'll find that most natural generalizations of looping sequences end up as exponentiation, and that it's very hard to keep both the expression and the codomain real unless you use...

        I think you'll find that most natural generalizations of looping sequences end up as exponentiation, and that it's very hard to keep both the expression and the codomain real unless you use trigonometric functions.

        For example, (-1)x above is a real expression, but for e.g. x=½ its value is not real.

        And eix + e-ix is a complex expression but only produces real values for real x, and you can rewrite it as 2 cos x.

        2 votes
    2. Wulfsta
      (edited )
      Link Parent
      This is a very satisfying answer that I hadn't considered. Edit: To be honest, I'm surprised I didn't realize this myself - I must reread Landau's Foundations of Analysis as a refresher.

      This is a very satisfying answer that I hadn't considered.

      Edit: To be honest, I'm surprised I didn't realize this myself - I must reread Landau's Foundations of Analysis as a refresher.

  4. [2]
    skybrian
    Link
    In electronics and electronic music, square, triangle, and sawtooth waves are commonly used periodic signals. Any signal can be made into a periodic function by repeating it.

    In electronics and electronic music, square, triangle, and sawtooth waves are commonly used periodic signals. Any signal can be made into a periodic function by repeating it.

    2 votes
    1. Wulfsta
      Link Parent
      This is true. To your point there's a nice table of what I'll call the base piecewise functions you can use to construct these types of functions on this page.

      This is true. To your point there's a nice table of what I'll call the base piecewise functions you can use to construct these types of functions on this page.

      2 votes
  5. [2]
    skybrian
    Link
    Maybe another way to look at this might be from a physics perspective? To get repetitive motion, you need to return to the beginning somehow, such as using a pendulum or a planetary orbit. Or...

    Maybe another way to look at this might be from a physics perspective? To get repetitive motion, you need to return to the beginning somehow, such as using a pendulum or a planetary orbit. Or perhaps a ball rolling back and forth on a valley-shaped ramp. Do all of these equations end up with trigonometry functions in them?

    1 vote
    1. stu2b50
      Link Parent
      They all do, actually. Basically all of those involve a second order differential with a negative force proportional to distance, which when you solve you get trigonometric functions. I mean, I...

      They all do, actually. Basically all of those involve a second order differential with a negative force proportional to distance, which when you solve you get trigonometric functions.

      I mean, I guess it means what you mean by "end up with trigonometry function in them". Any periodic function can be written as a linear combination of trigonometric functions by way of the fourier transformation.

      3 votes
  6. joplin
    Link
    Also, the modulus operator produces periodic functions. f(x) = x % n has a period of n. You can do other things to x before or after the modulus operator and get periodic functions. (I'm using the...

    Also, the modulus operator produces periodic functions. f(x) = x % n has a period of n. You can do other things to x before or after the modulus operator and get periodic functions. (I'm using the computer programming notation of "%" as an operator to mean modulus, in case that wasn't clear.)

    1 vote