Skip to main content
Mathematics LibreTexts

14.2: Periodic Functions

  • Page ID
    121158
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    Learning Objectives
    1. Define a periodic function.
    2. Given a periodic function, determine its period, amplitude and phase.
    3. Given a graph or description of a periodic or rhythmic process, "fit" an approximate sine or cosine function with the correct period, amplitude and phase. Figure 14.5: Periodicity of the sine and cosine. Note that the two curves are just shifted versions of one another.

    Y You can use this desmos graph to see all the trigonometric functions. Turn the graphs on or off by clicking on the (grey) circles to the left of the formulae. Notice the vertical asymptotes on some of these functions and think about where these asymptotes occur. In Section 14.1, we identified the period of \(\sin (t)\) and \(\cos (t)\) as the value of \(t\) at which one full cycle is completed. Here we formalize the definition of a periodic function, define its period, frequency, and other properties.

    Definition 14.1 (Periodic function)

    A function is said to be periodic if

    \[f(t)=f(t+T), \nonumber \]

    where \(T\) is a constant that we call the period of the function. Graphically, this means that if we shift the function by a constant "distance" along the horizontal axis, we see the same picture again.

    Example 14.1

    Show that the trigonometric functions are indeed periodic.

    Solution

    The point \((x, y)\) in Figure \(14.4\) repeats its trajectory every time a revolution around the circle is complete. This happens when the angle \(t\) completes one full cycle of \(2 \pi\) radians. Thus, as expected, the trigonometric functions are periodic, that is

    \[\sin (t)=\sin (t+2 \pi), \quad \text { and } \quad \cos (t)=\cos (t+2 \pi) . \nonumber \]

    Similarly

    \[\tan (t)=\tan (t+2 \pi), \quad \text { and } \quad \cot (t)=\cot (t+2 \pi) . \nonumber \]

    We say that the period of these functions is \(T=2 \pi\) radians. The same applies to \(\sec (t)\) and \(\csc (t)\), that is, all six trigonometric functions are periodic.

    Mastered Material Check
    1. If \(\cos (\alpha)=\beta\), what is \(\cos (\alpha+2 \pi) ? \cos (\alpha-6 \pi)\) ?

    Phase, amplitude, and frequency

    In Appendix \(\mathrm{C}\) we review how the appearance of any function changes when we transform variables. For example, replacing the independent variable \(x\) by \(x-a\) (or \(\alpha x\) ) shifts (or scales) the function horizontally, multiplying \(f\) by a constant \(C\) scales the function vertically, etc. The same ideas apply to shapes of a trigonometric function when similar transformations are applied.

    A function of the form

    \[y=f(t)=A \sin (\omega t) \nonumber \]

    has both \(t\) and \(y\)-axes scaled, as shown in Figure 14.6(c). The the amplitude of the graph, \(A\) scales the \(y\) axis so that the oscillation swings between a minimum of \(-A\) and a maximum of \(A\). The frequency \(\omega\), scales the \(t\)-axis. This cycles are crowded together (if \(\omega>1\) ) or stretched out (if \(\omega<1\) ). One full cycle is completed when

    \[\omega t=2 \pi, \nonumber \]

    and this occurs at time\[t=\frac{2 \pi}{\omega} . \nonumber \]

    Use the sliders on this desmos graph to see how the amplitude, \(A\), frequency \(w\), and phase \(\phi\) affect the graph of the function \(y=M+A \sin (w(t-\phi))\). You can also vary the mean value \(M\).

    clipboard_e201284efd89e694b4aa58e0502821882.png
    Figure 14.6: The sine function \(y=\sin (t)\) (shown in (a)) is transformed in several ways. (b) Multiplying the function by a constant \((A=2)\) stretches the graph vertically. \(A\) is called the amplitude. (c) Multiplying the independent variable by a constant \((\omega=3)\) increases the frequency, i.e. the number of cycles per unit time. (d) Subtracting a constant \((a=0.8)\) from the independent variable shifts the graph horizontally to the right.
    Mastered Material Check
    1. How many zeros are depicted in each panel of Figure 14.6?
    2. How many local minima are depicted in each panel of Figure 14.6?
    3. In each panel of Figure 14.6, identify where \(y=1\).
    4. Indicate a single period on each panel of Figure 14.6.

    This time, called the period of the function is denoted by \(T\). The connection between frequency and period is:

    \[\omega=\frac{2 \pi}{T}, \Rightarrow T=\frac{2 \pi}{\omega} . \nonumber \]

    If we examine a graph of the function

    \[y=f(t)=A \sin (\omega(t-a)), \nonumber \]

    we find that the basic sine graph has been shifted in the positive \(t\) direction by \(a\), as in Figure 14.6(d). At time \(t=a\), the value of the function is

    \[y=f(t)=A \sin (\omega(a-a))=A \sin (0)=0, \nonumber \]

    so the cycle "starts" with a delay of \(t=a\) relative to the basic sine function.

    Another common variant of the same function can be written in the form

    \[y=f(t)=A \sin (\omega t-\phi) . \nonumber \]

    Here \(\phi\) is called the phase shift of the oscillation. The above two forms are the same if we identify \(\phi\) with \(\omega a\). The phase shift, \(\phi\) has no units, whereas \(a\) has units of time, which is the same as the units of \(t\). When \(\phi=2 \pi\), (which happens when \(a=2 \pi / \omega\) ), the graph has been moved over to the right by one full period, making it identical to the original periodic graph.

    Some of the scaled, shifted, sine functions described here are shown in Figure 14.6.

    Mastered Material Check
    1. What is the period of a trigonometric functions whose frequency is 5 cycles per min?
    2. What is the frequency of a trigonometric functions whose period is \(1 \mathrm{hr}\) ?
    Mastered Material Check
    1. Sketch a graph of \(y=3 \sin \left(t-\frac{\pi}{2}\right)\) and \(y=3 \cos (t)\)
    2. Sketch a graph of \(y=\cos (4(t-\pi))\)

    The periodic electrocardiogram

    With the terminology of periodic function in place, we can now describe the ECG pattern for both normal resting individuals and those at exercise.

    clipboard_e1d381497b1f24d8bde884ff01a572bae.png
    Figure 14.7: One full ECG cycle (left) has been “wrapped around a circle”.

    Recall that at rest, the heart beats approximately once per second. Consider the ECG trace on the left of Figure 14.7. This corresponds to a single heartbeat, and so, takes 1 second from start to finish. Suppose \(t\) represents time in seconds, and let \(y=f(t)\) represent the electrical activity (in \(\mathrm{mV}\) ) at time \(t\). Then, since this pattern repeats, the function \(f\) is periodic, with period \(T=1\) second. We can write

    \[f(t)=f(t+1), \quad t \text { in seconds. } \nonumber \]

    However, suppose the individual starts running. Then this relationship no longer holds, since heartbeats become more frequent, and the length of their period, \(T\), decreases. This suggests a more natural way to mark off time - the amount of time it takes to complete a heartbeat cycle. Thus, rather than seconds, we define a such a variable, denoting it "the cycle time" and use the notation \(\bar{\tau}\). Then the connection between clock time \(t\) and cycle time is

    \[t=\text { time in seconds }=\text { number of cycles } \cdot \text { length of } 1 \text { cycle in } \sec =\bar{\tau} \cdot T \nonumber \]

    Restated,

    \[\bar{\tau}=\frac{t}{T} . \nonumber \]

    Note: the "number of cycles" need not be an integer - for example, \(\bar{\tau}=2.75\) means that we are \(3 / 4\) way into the third electrical activity cycle. ellapse in 10 seconds?

    Since \(f\) is a periodic function, we can "join up" its two ends and "wrap it

    around a circle", as shown in the schematic on Figure 14.7. Then successive heartbeats are depicted by traversing the circle over and over again. This suggests identifying the beginning of a cycle with 0 and the end of a cycle with \(2 \pi\). To do so, we revise our cycle time clock as follows. Define

    \[\tau=\text { number of radians traversed since time } 0 . \nonumber \]

    Then every heartbeat corresponds to this clock adding an increment of \(2 \pi\). The connection between this cycle clock and time \(t\) in seconds is

    \[\tau=2 \pi \bar{\tau}=2 \pi \frac{t}{T} \nonumber \]

    (We check that when 1 cycle is complete, \(t=T\) and \(\tau=2 \pi\), as desired.)

    We can now describe the periodicity of the ECG in terms of the cycle clock by the formula

    \[f(\tau)=f(\tau+2 \pi) . \nonumber \]

    Mastered Material Check
    1. If a runner’s heart beats every \(0.6\) seconds, how many beat cycles
    2. Suppose \(t=4 \sec\) and \(\bar{\tau}=5\). Determine \(T\) and interpret this situation.

    As a check, we show in the next example that the relationship in Equation (14.3) reduces to the familiar period and frequency notation in terms of our original time \(t\) in seconds.

    Example 14.2 (Period and frequency of heartbeat)

    Use the formula we arrived at for \(\tau\) and its connection to clock time \(t\) to transform back to time \(t\) in seconds. Express the periodicity of the function \(f\) both in terms of the period \(T\) and the frequency \(\omega\) of heartbeats.

    Solution

    Start with Equation (14.3),

    \[f(\tau)=f(\tau+2 \pi) . \nonumber \]

    Substitute \(\tau=2 \pi t / T\) from Equation (14.3) and simplify by making a common denominator. Then

    \[\begin{aligned} f\left(\frac{2 \pi t}{T}\right) & =f\left(\frac{2 \pi t}{T}+2 \pi\right) \\ & =f\left(\frac{2 \pi}{T}(t+T)\right) \end{aligned} \nonumber \]

    We now rewrite this in terms of the frequency \(\omega=2 \pi / T\) to arrive at

    \[f(\omega t)=f(\omega(t+T)) . \nonumber \]

    This relationship holds for any regular heartbeat, whether at rest or exercise where the frequency of the heartbeat, \(\omega\), is related to the period (duration of 1 beat cycle) by \(\omega=2 \pi / T\).

    Rhythmic processes

    Many natural phenomena are cyclic. It is sometimes convenient to represent such phenomena with a simple periodic functions, such as sine or cosine.

    Given some periodic process, we determine its frequency (or period), amplitude, and phase shift. We create a trigonometric function (sine or cosine) that approximates the desired behavior.

    To select a function, it helps to remember that (at \(t=0\) ) cosine starts at its peak, while sine starts at its average value of 0 . A function that starts at the lowest point of the cycle is \(-\cos (t)\). In most cases, the choice of sine or cosine to represent the cyclic phenomenon is arbitrary, they are related by a simple phase shift.

    Next, pick a constant \(\omega\) such that the trigonometric function \(\sin (\omega t)\) (or \(\cos (\omega t)\) ) has the correct period using the relationship \(\omega=2 \pi / T\). We then select the amplitude, and horizontal and vertical shifts to complete the process. The examples below illustrate this process.

    Example 14.3 (Daylight hours)

    In Vancouver, the shortest day (8 hours of light) occurs around December 22, and the longest day (16 hours of light) is around June 21. Approximate the cyclic changes of daylight through the season using the sine function.

    Solution

    On Sept 21 and March 21 the lengths of day and night are equal, and then there are 12 hours of daylight (each of these days is called an equinox). Suppose we identify March 21 as the beginning of a yearly daynight length cycle. Let \(t\) be time in days beginning on March 21. One full cycle takes a year, i.e. 365 days. The period of the function we want is thus

    \[T=365 \nonumber \]

    and its frequency (in units of per day) is

    \[\omega=2 \pi / 365 \text {. } \nonumber \]

    Daylight shifts between the two extremes of 8 and 16 hours: i.e. \(12 \pm 4\) hours. This means that the amplitude of the cycle is 4 hours. The oscillation take place about the average value of 12 hours. We have decided to start a cycle on a day for which the number of daylight hours is the average value (12). This means that the sine would be most appropriate, so the function that best describes the number of hours of daylight at different times of the year is:

    \[D(t)=12+4 \sin \left(\frac{2 \pi}{365} t\right) \nonumber \]

    where \(t\) is time in days and \(D\) the number of hours of light..

    Mastered Material Check
    1. In August, the average number of daylight hours is 14 . How does this fit with our model?
    2. Repeat Example \(14.3\) using a cosine function.
    Example 14.4 (Hormone levels)

    The level of a certain hormone in the bloodstream fluctuates between undetectable concentration at \(t=7: 00\) and 100 \(\mathrm{ng} / \mathrm{ml}\) (nanograms per millilitre) at \(t=19: 00\) hours. Approximate the cyclic variations in this hormone level with the appropriate periodic trigonometric function. Let t represent time in hours from 0:00 hrs through the day.

    Solution

    We first note that it takes one day (24 hours) to complete a cycle. This means that the period of oscillation is 24 hours, so that the frequency is

    \[\omega=\frac{2 \pi}{T}=\frac{2 \pi}{24}=\frac{\pi}{12} . \nonumber \]The level of hormone varies between 0 and \(100 \mathrm{ng} / \mathrm{ml}\), which can be expressed as \(50 \pm 50 \mathrm{ng} / \mathrm{ml}\). (The trigonometric functions are symmetric cycles, and we are finding both the average value about which cycles occur and the amplitude of the cycles.) We could consider the time midway between the low and high points, namely 13:00 hours as the point corresponding to the upswing at the start of a cycle of the sine function. (See Figure \(14.8\) for the sketch.) Thus, if we use a sine to represent the oscillation, we should shift it by \(13 \mathrm{hrs}\) to the left.

    clipboard_e01569ca847bbadbf5c6bfb2b122af0a3.png
    Figure 14.8: Hormonal cycles. The full cycle takes 24 hrs (hence the period is \(T=24 \mathrm{~h}\) and the frequency is \(\omega=2 \pi / 24\) per hour). The level \(H(t)\) swings between 0 and \(100 \mathrm{ng} / \mathrm{ml}\). From the given information, we see that the average level is \(50 \mathrm{ng} / \mathrm{ml}\), and that the origin of a sine curve should be at \(t=13\) (i.e. \(1 / 4\) of the cycle which is \(6 \mathrm{hrs}\) past the time point \(t=7\) ).

    Assembling these observations, we obtain the level of hormone, \(H\) at time \(t\) in hours:

    \[H(t)=50+50 \sin \left(\frac{\pi}{12}(t-13)\right) . \nonumber \]

    In the expression above, the number 13 represents a shift along the time axis, and carries units of time. We can express this same function in the form

    \[H(t)=50+50 \sin \left(\frac{\pi t}{12}-\frac{13 \pi}{12}\right) . \nonumber \]

    In this version, the quantity

    \[\phi=\frac{13 \pi}{12} \nonumber \]

    is the phase shift.

    In selecting the periodic function to use for this example, we could have made other choices. For example, the same periodic can be represented by any of the functions listed below:

    \[\begin{aligned} & H_{1}(t)=50-50 \sin \left(\frac{\pi}{12}(t-1)\right), \\ & H_{2}(t)=50+50 \cos \left(\frac{\pi}{12}(t-19)\right), \\ & H_{3}(t)=50-50 \cos \left(\frac{\pi}{12}(t-7)\right) . \end{aligned} \nonumber \]

    All these functions have the same values, the same amplitudes, and the same periods.

    Mastered Material Check
    1. Verify that \(H_{1}, H_{2}\) and \(H_{3}\) all have the same periods.
    Example 14.5 (Phases of the moon)

    A cycle of waxing and waning moon takes \(29.5\) days approximately. Construct a periodic function to describe the changing phases, starting with a "new moon" (totally dark) and ending one cycle later.

    Solution

    The period of the cycle is \(T=29.5\) days, so

    \[\omega=\frac{2 \pi}{T}=\frac{2 \pi}{29.5} . \nonumber \]

    Let \(P(t)\) be the fraction of the moon face on day \(t\) in the cycle. Then we should construct the function so that \(0<P<1\), with \(P=1\) in mid cycle (see Figure 14.9). The cosine function swings between the values \(-1\) and 1 . To obtain a positive function in the desired range for \(P(t)\), we add a constant and scale the cosine as follows:

    \[\frac{1}{2}[1+\cos (\omega t)] . \nonumber \]

    This is still not quite right, since at \(t=0\) this function takes the value 1 , rather than 0, as shown in Figure 14.9.

    clipboard_e5d12e0ec53a54137676704068287995c.png
    Figure 14.9: Periodic moon phases. The horizontal axis is time in days, and the vertical axis represents \(P(t)\), the fraction of the moon that is visible from Earth on day \(t\).

    To correct this we can either introduce a phase shift, i.e. set

    \[P(t)=\frac{1}{2}[1+\cos (\omega t+\pi)] . \nonumber \]

    Then when \(t=0\), we get \(P(t)=0.5[1+\cos \pi]=0.5[1-1]=0\). Or we can write

    \[P(t)=\frac{1}{2}[1-\cos (\omega t)], \nonumber \]

    which achieves the same result.

    Mastered Material Check
    1. What fraction of the moon do you expect to be visible one week into the cycle?

    This page titled 14.2: Periodic Functions is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Leah Edelstein-Keshet via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.