PAGE 1

Review

Euler: \( y_{n+1} = y_n + f(t_n, y_n)h \)

Improved Euler: \( y_{n+1} = y_n + \frac{1}{2} [f(t_n, y_n) + f(t_{n+1}, y_{n+1})]h \)

\( y_{n+1} = y_n + f(t_n, y_n)h \)

for right side

no RK4 on exam

resonance : input freq = natural freq.

\[ mx'' + kx = f(t) = \sin(\omega_0 t) \]

natural freq. \( \sqrt{\frac{k}{m}} \)

input freq. \( \omega_0 \)

if \( \omega_0 = \sqrt{\frac{k}{m}} \)

resonance

(amplitude grows w/o bound)

PAGE 2

cosine/sine series

  • cosine : no \( b_n \) (no sine) function is even
  • sine : no \( a_n \) (no cosine) function is odd

usually we have to add extensions

(#14 of review)

for example, \( F(t) = \sin(3t) \) for \( 0 < t < \pi \)

cosine series representation

A coordinate graph with a vertical axis labeled F(t) and a horizontal axis labeled t. The function shown consists of periodic positive semi-circles (humps) symmetric about the vertical axis, illustrating an even extension of a sine function for a cosine series expansion.

if expanded as a cosine series, if \( a_3 \neq 0 \) then there is still a \( \cos(3t) \) term, which still causes resonance

PAGE 3
\[ a_3 = \frac{2}{\pi} \int_{0}^{\pi} \sin(3t) \cos(3t) dt = \dots = 0 \]

# 9 (review)

\( g(x) = \cos(x) \)

\( 0 < t < \pi \)

A graph of the cosine function from negative pi to pi. The original function is shown in blue for the interval 0 to pi, and an even extension is shown in red for the interval negative pi to 0, creating a symmetric bell-like curve centered at x equals 0.

want cosine series, add even extension

normal \( \cos(x) \) function

a) Fourier cosine series

\[ \frac{1}{2} a_0 + a_1 \cos(x) + a_2 \cos(2x) + a_3 \cos(3x) + \dots \]

\[ a_0 = 0, \quad a_1 = 1, \quad a_2 = a_3 = a_4 = \dots = 0 \]

b)

A graph showing an odd extension of the cosine function. The original function is in blue from 0 to pi. The extension in red from negative pi to 0 is reflected across the origin, creating a jump discontinuity at x equals 0.

if we want sine series

PAGE 4

\( a_n = 0 \) for all \( n \)

\[ b_n = \frac{2}{\pi} \int_{0}^{\pi} \cos(x) \sin(nx) dx \]

\[ \sin(A) \cos(B) = \frac{1}{2} [\sin(A+B) + \sin(A-B)] \]

\[ b_n = \frac{2}{\pi} \int_{0}^{\pi} \frac{1}{2} [\sin((n+1)x) + \sin((n-1)x)] dx \]

\[ = \dots \]

Fourier series converges to \( f(t) \) wherever it is continuous

Fourier series converges to \( \frac{f(t^-) + f(t^+)}{2} \) if discontinuous at \( t \)

Boundary-Value Problem

\( x'' + 5x = F(t) \)

\( x(0) = x(\pi) = 0 \)

fix end positions

or

\( x'(0) = x'(\pi) = 0 \)

fix end velocities

\( F(t) = 3 \)     \( 0 < t < \pi \)

PAGE 5

Fourier Series Extensions and Boundary Conditions

add the correct extensions to \( F(t) \) based on the BC's

  • if \( x(0) = x(\pi) = 0 \rightarrow \text{odd extensions} \rightarrow \text{sine series} \)
  • if \( x'(0) = x'(\pi) = 0 \rightarrow \text{even extensions} \rightarrow \text{cosine series} \)

if \( x'' + 5x = F(t) \quad x(0) = x(\pi) = 0 \)

\( F(t) = 3 \quad 0 < t < \pi \)

add odd extensions

A graph of a periodic square wave function F(t). On the interval from 0 to pi, the function is constant at 3. On the interval from negative pi to 0, the function is constant at negative 3, representing an odd extension. The horizontal axis is t and the vertical axis is F(t).

sine series meets the BC's

expand \( F(t) = 3 \) as sine series w/ \( L = \pi \)

\( a_n = 0 \) for all \( n \)

\[ b_n = \frac{2}{\pi} \int_{0}^{\pi} 3 \sin(nt) dt = \frac{6 [1 - (-1)^n]}{n\pi} \]
PAGE 6
\[ F(t) = \sum_{n=1}^{\infty} \frac{6 [1 - (-1)^n]}{n\pi} \sin(nt) \]

now assume the particular solution \( x(t) \) is the same kind series w/ unknown coefficients

\[ x(t) = \sum_{n=1}^{\infty} B_n \sin(nt) \]
sub into \( x'' + 5x = F(t) \)
\[ x'(t) = \sum_{n=1}^{\infty} n B_n \cos(nt) \]
\[ = \sum_{n=1}^{\infty} \frac{6 [1 - (-1)^n]}{n\pi} \sin(nt) \]
\[ x''(t) = \sum_{n=1}^{\infty} -n^2 B_n \sin(nt) \]
\[ \sum_{n=1}^{\infty} -n^2 B_n \sin(nt) + \sum_{n=1}^{\infty} 5 B_n \sin(nt) = \sum_{n=1}^{\infty} \frac{6 [1 - (-1)^n]}{n\pi} \sin(nt) \]

for each \( n \), \( -n^2 B_n + 5 B_n = \frac{6 [1 - (-1)^n]}{n\pi} \)

\[ B_n = \frac{6 [1 - (-1)^n]}{n\pi (5 - n^2)} \]
PAGE 7
MA 30300-JC1/JC2
Exam 2
Spring 2026

Fourier Series and Differential Equations Reference

Term Formula Period
\( f(x) \) \[ \frac{a_0}{2} + \sum_{n=1}^{\infty} \left( a_n \cos\left(\frac{n\pi x}{L}\right) + b_n \sin\left(\frac{n\pi x}{L}\right) \right) \] \( 2L \)
\( a_n \) \[ \frac{1}{L} \int_{-L}^{L} f(x) \cos\left(\frac{n\pi x}{L}\right) dx \] \( 2L \)
\( b_n \) \[ \frac{1}{L} \int_{-L}^{L} f(x) \sin\left(\frac{n\pi x}{L}\right) dx \] \( 2L \)
Even Extension \( b_n = 0, \quad a_n = \frac{2}{L} \int_{0}^{L} f(x) \cos\left(\frac{n\pi x}{L}\right) dx \) \( 2L \)
Odd Extension \( a_n = 0, \quad b_n = \frac{2}{L} \int_{0}^{L} f(x) \sin\left(\frac{n\pi x}{L}\right) dx \) \( 2L \)

Trigonometric Identities

  • \( \sin(A)\cos(B) = \frac{1}{2}[\sin(A+B) + \sin(A-B)] \)
  • \( \cos(A)\cos(B) = \frac{1}{2}[\cos(A+B) + \cos(A-B)] \)
  • \( \cos(n\pi) = (-1)^n, \quad \sin(n\pi) = 0 \)

Integration

  • \( \int u \, dv = uv - \int v \, du \)

Common Trigonometric Integrals (for integer m, n)

  • \( \int_{0}^{\pi} \sin(nx)\cos(mx) \, dx = \begin{cases} \frac{2n}{n^2-m^2} & \text{if } n-m \text{ is odd} \\ 0 & \text{if } n-m \text{ is even} \end{cases} \)
  • \( \int_{-L}^{L} \cos\left(\frac{n\pi x}{L}\right) \cos\left(\frac{m\pi x}{L}\right) \, dx = \begin{cases} L & \text{if } n=m \neq 0 \\ 0 & \text{if } n \neq m \end{cases} \)
  • \( \int_{-L}^{L} \sin\left(\frac{n\pi x}{L}\right) \sin\left(\frac{m\pi x}{L}\right) \, dx = \begin{cases} L & \text{if } n=m \neq 0 \\ 0 & \text{if } n \neq m \end{cases} \)
  • \( \int_{-L}^{L} \sin\left(\frac{n\pi x}{L}\right) \cos\left(\frac{m\pi x}{L}\right) \, dx = 0 \text{ for all } n, m \)

Standard Form Integrals

  • \( \int x \cos(ax) \, dx = \frac{\cos(ax)}{a^2} + \frac{x \sin(ax)}{a} + C \)
  • \( \int x \sin(ax) \, dx = \frac{\sin(ax)}{a^2} - \frac{x \cos(ax)}{a} + C \)