MA 30300: Differential Equations

9.4. Applications of Fourier Series

Goal: We are solving the non-homogeneous equation \(mx'' + cx' + kx = F(t)\) where we use Fourier Series to solve for periodic force.

Diagram of a mass-spring-damper system. A mass m is connected to a spring k and a damper c. An external force F(t) is applied, and displacement is labeled x(t).
A mass \(m\) with spring \(k\) and damper \(c\). External force \(F(t)\) results in position \(x(t)\).

In this case, the equation simplifies to \(mx'' + kx = F(t)\).

Example 1.1: Steady Periodic Solution (Square Wave)

Find \(x_{sp}(t)\) for \(x'' + 5x = F(t)\) where \(F(t)\) is a \(2\pi\)-periodic square wave:

\[ F(t) = \begin{cases} 3 & 0 < t < \pi \\ -3 & \pi < t < 2\pi \end{cases} \]

1. Derive Fourier Coefficients (\(b_n\))

Since \(F(t)\) is an odd function with period \(T=2\pi\), its Fourier series contains only sine terms. The coefficients are:

\[ b_n = \frac{2}{\pi} \int_{0}^{\pi} 3 \sin(nt) \, dt = \frac{6}{n\pi} [-\cos(nt)]_0^\pi = \frac{6}{n\pi} (1 - (-1)^n) \]

This evaluates to \(b_n = \frac{12}{n\pi}\) for \(n\) odd, and \(b_n = 0\) for \(n\) even.

2. Compute Derivatives and Substitute

Assume a steady periodic solution of the form \(x_{sp}(t) = \sum_{n=1}^{\infty} c_n \sin(nt)\). To substitute this into the differential equation, we first find the second derivative term-by-term:

\[ x_{sp}'(t) = \sum_{n=1}^{\infty} n c_n \cos(nt) \implies x_{sp}''(t) = \sum_{n=1}^{\infty} -n^2 c_n \sin(nt) \]

Now, substitute \(x_{sp}''(t)\) and \(x_{sp}(t)\) into the ODE \(x'' + 5x = F(t)\):

\[ \left( \sum_{n=1}^{\infty} -n^2 c_n \sin(nt) \right) + 5 \left( \sum_{n=1}^{\infty} c_n \sin(nt) \right) = \sum_{n=1}^{\infty} b_n \sin(nt) \]

Factor out the \(\sin(nt)\) terms on the left-hand side to group the coefficients:

\[ \sum_{n=1}^{\infty} (5 - n^2) c_n \sin(nt) = \sum_{n=1}^{\infty} b_n \sin(nt) \]

3. Equate Coefficients and Check for Resonance

By equating the coefficients of \(\sin(nt)\) for each \(n\), we obtain the algebraic equation:

\[ (5 - n^2) c_n = b_n \]

Since \(n\) is always an integer (\(n = 1, 2, 3, \dots\)), it follows that \(n^2 \neq 5\) for any \(n\). Therefore, for all \(n\) we can solve for \(c_n\):

\[ c_n = \frac{b_n}{5 - n^2} \]

4. Final Series Solution

Substituting \(b_n = \frac{12}{n\pi}\) for odd values of \(n\):

\[ x_{sp}(t) = \sum_{n=1, 3, 5...}^{\infty} \frac{12}{n\pi(5 - n^2)} \sin(nt) \]

Example 1.2: Steady Periodic Solution

Find \(x_{sp}(t)\) for \(x'' + 3x = F(t)\), where \(F(t)\) is an odd function of period \(2\pi\) with \(F(t) = 9t\) for \(0 < t < \pi\).

1. Derive Fourier Coefficients (\(b_n\))

Since \(F(t)\) is an odd function with period \(T=2\pi\), its Fourier series consists only of sine terms. We calculate the coefficients \(b_n\) using integration by parts:

\[ b_n = \frac{2}{\pi} \int_{0}^{\pi} 9t \sin(nt) \, dt = \frac{18}{\pi} \left[ \frac{-t \cos(nt)}{n} + \frac{\sin(nt)}{n^2} \right]_0^\pi \]
\[ b_n = \frac{18}{\pi} \left( \frac{-\pi \cos(n\pi)}{n} + 0 \right) = \frac{-18 (-1)^n}{n} = \frac{18(-1)^{n+1}}{n} \]

2. Compute Derivatives and Substitute

Assume a steady periodic solution of the form \(x_{sp}(t) = \sum_{n=1}^{\infty} c_n \sin(nt)\). To substitute this into the differential equation \(x'' + 3x = F(t)\), we find the second derivative:

\[ x_{sp}'(t) = \sum_{n=1}^{\infty} n c_n \cos(nt) \implies x_{sp}''(t) = \sum_{n=1}^{\infty} -n^2 c_n \sin(nt) \]

Substituting both into the left-hand side of the ODE:

\[ \left( \sum_{n=1}^{\infty} -n^2 c_n \sin(nt) \right) + 3 \left( \sum_{n=1}^{\infty} c_n \sin(nt) \right) = \sum_{n=1}^{\infty} b_n \sin(nt) \]

Factoring the sine terms to group the coefficients:

\[ \sum_{n=1}^{\infty} (3 - n^2) c_n \sin(nt) = \sum_{n=1}^{\infty} b_n \sin(nt) \]

3. Equate Coefficients

By comparing the coefficients of \(\sin(nt)\) on both sides for each integer \(n\), we get:

\[ (3 - n^2) c_n = b_n \]

Since \(n\) is an integer (\(n = 1, 2, 3, \dots\)), \(n^2\) will never equal \(3\). Because \(3 - n^2 \neq 0\), we can safely solve for \(c_n\):

\[ c_n = \frac{b_n}{3 - n^2} = \frac{18(-1)^{n+1}}{n(3 - n^2)} \]

4. Final Series Solution

Substituting the expression for \(c_n\) back into the assumed form of \(x_{sp}(t)\):

\[ x_{sp}(t) = \sum_{n=1}^{\infty} \frac{18(-1)^{n+1}}{n(3 - n^2)} \sin(nt) \]

1.3 Special Case: Pure Resonance

Consider the undamped system \(m x''(t) + k x(t) = F(t)\), where \(F(t)\) is a \(2L\)-periodic forcing function.

Pure Resonance: Occurs if there exists an integer \(n\) such that the driving frequency \(\omega_n = \dfrac{n\pi}{L}\) equals the natural frequency \(\omega_0 = \sqrt{k/m}\), provided the corresponding Fourier coefficient is non-zero.

To simplify our analysis, we consider an odd \(2L\)-periodic forcing function \(F(t)\). Its Fourier series consists only of sine terms:

\[ F(t) = \sum_{n=1}^{\infty} b_n \sin\left(\frac{n\pi t}{L}\right) \]

If resonance occurs at the \(N\)-th harmonic, meaning that

\[ w_N = \frac{N\pi}{L} = \omega_0 \]
the equation
\[ m x''(t) + k x(t) = b_N \sin(\omega_0 t) \]
has the resonant solution
\[ x_{p, \text{res}}(t) = -\frac{b_N}{2 m \omega_0} t \cos(\omega_0 t) \]

The particular solution \(x_p(t)\) is the sum of the resonant term and the other terms for all other harmonics (for \(n\neq N\)).

Example 1.4: Pure Resonance Check

Determine if pure resonance occurs for \(9x'' + 36x = F(t)\), where \(F(t)\) is an odd function of period \(2L = 2\) with \(F(t) = 3\) for \(0 < t < 1\).

To determine if pure resonance occurs, we compare the natural frequency of the system to the driving frequencies found in the Fourier series of the forcing function \( F(t) \).

1. Find the Natural Frequency \(\omega_0\)

\[ \omega_0 = \sqrt{\frac{k}{m}} = \sqrt{\frac{36}{9}} = 2 \]


2. Find the Driving Frequencies \(\omega_n\)

The forcing function \( F(t) \) is an odd function with period \( 2L = 2 \), which means \( L = 1 \). The Fourier series for an odd function consists of sine terms with frequencies:

\[ \omega_n = \frac{n\pi}{L} = \frac{n\pi}{1} = n\pi \quad \text{for } n = 1, 2, 3, \dots \]


3. Check for Resonance

Pure resonance occurs if there exists an integer \( n \) such that the driving frequency matches the natural frequency:

\[ \omega_n = \omega_0 \]

\[ n\pi = 2 \]

Solving for \( n \):

\[ n = \frac{2}{\pi} \approx 0.637 \]

Since \( \frac{2}{\pi} \) is not an integer, there is no term in the Fourier series of \( F(t) \) that matches the natural frequency of the system.

Conclusion: Pure resonance does not occur.

Example 1.5: Pure Resonance Check (Comparison)

Consider a mass-spring system with \(m = 2\) and \(k = 32\). Determine if pure resonance occurs when the system is driven by the following periodic forces (\(T = 2\pi\)):
  1. Square Wave:
    \[ F(t) = \begin{cases} 1 & 0 < t < \pi \\ -1 & -\pi < t < 0 \end{cases} \]
  2. Sawtooth Wave:
    \[ F(t) = t, \quad -\pi < t < \pi \]

1. Calculate Natural Frequency

For a system with \(m = 2\) and \(k = 32\), the natural frequency is:

\[ \omega_0 = \sqrt{\frac{k}{m}} = \sqrt{\frac{32}{2}} = 4 \]


2. Case (a): Square Wave

The Fourier sine coefficients for the Square Wave on \((0, \pi)\) are:

\[ b_n = \frac{2}{\pi} \int_{0}^{\pi} (1) \sin(nt) \, dt = \frac{2}{n\pi} \left[ 1 - \cos(n\pi) \right] \]

  • If \(n\) is even:
    \( \cos(n\pi) = 1 \implies b_n = 0 \)
  • If \(n\) is odd:
    \( \cos(n\pi) = -1 \implies b_n = \frac{4}{n\pi} \)

The driving frequencies are \( \omega_n = \{1, 3, 5, \dots\} \). Since \( 4 \) is not in this set, pure resonance does not occur.


3. Case (b): Sawtooth Wave

The Fourier sine coefficients for \( F(t) = t \) are found via integration by parts:

\[ b_n = \frac{2}{\pi} \int_{0}^{\pi} t \sin(nt) \, dt = \frac{2}{\pi} \left[ \frac{-t\cos(nt)}{n} + \frac{\sin(nt)}{n^2} \right]_{0}^{\pi} = \frac{-2\cos(n\pi)}{n} \]

  • For any integer \( n \), \( b_n = \frac{2}{n}(-1)^{n+1} \).
  • Specifically, for \( n=4 \), \( b_4 = -\frac{1}{2} \neq 0 \).

The driving frequencies are \( \omega_n = \{1, 2, 3, 4, \dots\} \). Since \( \omega_4 = \omega_0 = 4 \), pure resonance occurs.

Waveform Harmonics (\(n\)) Term \(n=4\) Present? Resonance?
Square Odd only No (\(b_4 = 0\)) No
Sawtooth All Integers Yes (\(b_4 \neq 0\)) Yes
\[ mx'' + cx' + kx = F(t) \]

Steady Periodic Solution \( x_{sp}(t) \)

Denote
\[ \omega_n = \frac{n\pi}{L} \]

1. Even Force

\[ F(t) = \frac{a_0}{2} + \sum_{n=1}^{\infty} a_n \cos(\omega_n t) \]
\[ x_{sp}(t) = \frac{a_0}{2k} + \sum_{n=1}^{\infty} C_n \cos(\omega_n t - \alpha_n) \]
where
\[ C_n = \dfrac{a_n}{\sqrt{(k - m\omega_n^2)^2 + (c\omega_n)^2}}. \]

2. Odd Force

\[ F(t) = \sum b_n \sin(\omega_n t) \]
\[ x_{sp}(t) = \sum_{n=1}^{\infty} C_n \sin(\omega_n t - \alpha_n) \]
where
\[ C_n = \dfrac{b_n}{\sqrt{(k - m\omega_n^2)^2 + (c\omega_n)^2}}. \]
In both cases, \( \alpha_n \) represents the phase lag of the response relative to the driving force
\[ \tan(\alpha_n) = \left( \frac{c\omega_n}{k - m\omega_n^2} \right), \quad 0 \le \alpha_n \le \pi \]

Example 2.1: Damped Steady Periodic Solution

Suppose m = 5 kg, c = 0.4 N·s/m, and k = 245 N/m. Compute the first few terms for the steady periodic motion \(x_{sp}(t)\) of the mass under the influence of the external force \(F(t)\), where \(F(t) = 3\) if \(0 < t < \pi\) and \(F(t)=-3\) if \(\pi < t < 2\pi\).

1. Determine Forcing Coefficients

The forcing function \(F(t)\) is an odd square wave with amplitude \(A = 3\) and period \(T = 2\pi\) (\(L = \pi\)). The Fourier sine coefficients are derived as follows:

\[ b_n = \frac{2}{\pi} \int_{0}^{\pi} 3 \sin(nt) \, dt = \frac{6}{n\pi} (1 - \cos(n\pi)) \]

  • If \(n\) is even:
    \[ \cos(n\pi) = 1 \implies b_n = \frac{6}{n\pi}(1 - 1) = 0 \]
  • If \(n\) is odd:
    \[ \cos(n\pi) = -1 \implies b_n = \frac{6}{n\pi}(1 - (-1)) = \frac{12}{n\pi} \]

The first four nonzero terms correspond to \(n = 1, 3, 5, 7\).

2. Numerical Results

\(n\) Forcing (\(b_n\)) Amplitude (\(C_n\)) Phase (\(\alpha_n\))
1 3.8197 0.0159 0.0017 rad
3 1.2732 0.0064 0.0060 rad
5 0.7639 0.0064 0.0167 rad
7 0.5457 0.1949 1.5708 (\(\pi/2\))

Observation: The term \(n=7\) dominates the motion because the driving frequency matches the natural frequency \(\omega_0 = \sqrt{245/5} = 7\) (even though its input force coefficient \(B_7\) is smaller than \(B_1\)), leading to practical-resonance.

3. Final Series Expansion

The first four nonzero terms of the steady periodic solution are:

\[ x_{sp}(t) \approx 0.0159 \sin(t - 0.002) + 0.0064 \sin(3t - 0.006) + 0.0064 \sin(5t - 0.017) + 0.1949 \sin(7t - 1.571) \]