MA 30300: Differential Equations

9.6. One-Dimensional Wave Equation

Goal: Solve the one-dimensional wave equation using separation of variables and Fourier series.


Historical Remark:

Although Fourier systematized the method of separation of variables, trigonometric series solutions to partial differential equations appeared earlier in the work of Euler, d’Alembert, and Daniel Bernoulli in the study of vibrating strings.

Physical Model:

We consider a flexible, uniform string stretched between two fixed points \( x = 0 \) and \( x = L \), under tension \( T \). Let \( \rho \) denote the linear density of the string.

The vertical displacement of the string is described by \( y(x,t) \), where each point of the string moves only in the vertical direction.

  • \( x \): position along the string
  • \( t \): time
  • \( y(x,t) \): vertical displacement

Key Assumptions:

  • Motion is purely transverse (vertical only).
  • Small deflection assumption:
    \[ \sin\theta \approx \tan\theta = y_x(x,t) \]
  • Tension \( T \) is constant along the string. The tension force acts tangentially along the string.
  • Gravity is neglected.
A vibrating string with a small segment showing tension forces and their vertical components.
A small segment of a vibrating string with tension forces and their vertical components.

A string of length L is shown with displacement y(x,t) from the horizontal axis. A small segment between x and x+Δx is highlighted. At each end of the segment, tension forces act tangentially to the string with equal magnitude T but different angles (α at x and β at x+Δx). The vertical components T sin(α) and T sin(β) are shown, illustrating how the difference in these forces leads to the motion of the string.

Consider a small segment of the string on \( [x, x + \Delta x] \) with mass \( \rho \Delta x \).

Newton’s Second Law:

The vertical acceleration is:

\[ a = y_{tt}(x,t) \]
\[ \Longrightarrow F_{\text{net}} = ma = \rho \Delta x y_{tt}(x,t) \]

The net vertical force comes from the difference of tension components at the endpoints.

Derivation:

The forces acting on the small segment of the string on \( [x, x+\Delta x] \) come only from the tension \( T \) at the two endpoints.

Example: At the left endpoint \( x \), the string exerts a downward vertical component of tension \( T \sin\alpha \), and at the right endpoint \( x+\Delta x \), there is an upward vertical component \( T \sin\beta \).

Hence the net vertical force is:

\[ F_{\text{net}} = T\sin\beta - T\sin\alpha \]

Applying Newton’s second law, we get:

\[ T(\sin\beta - \sin\alpha) = \rho \Delta x \, y_{tt}(x,t) \]

For small deflections, we use the approximation:

\[ \sin\theta \approx \tan\theta = y_x(x,t) \]

Therefore,

\[ \sin\beta \approx y_x(x+\Delta x,t), \quad \sin\alpha \approx y_x(x,t) \]

Substituting into Newton’s law:

\[ T\big(y_x(x+\Delta x,t) - y_x(x,t)\big) = \rho \Delta x \, y_{tt}(x,t) \]

Divide both sides by \( \rho \Delta x \):

\[ \frac{T}{\rho} \frac{y_x(x+\Delta x,t) - y_x(x,t)}{\Delta x} = y_{tt}(x,t) \]

Now take the limit as \( \Delta x \to 0 \). Since

\[ \lim_{\Delta x \to 0} \frac{y_x(x+\Delta x,t) - y_x(x,t)}{\Delta x} = y_{xx}(x,t) \]
we have
\[ y_{tt} = \frac{T}{\rho} y_{xx} \]
Let
\[ a^2 = \frac{T}{\rho} > 0 \]

we obtain the one-dimensional wave equation:

\[ y_{tt} = a^2 y_{xx}. \]

Wave Equation:

\[ y_{tt} = a^2 y_{xx}, \quad 0 < x < L,\; t > 0 \]

Boundary Conditions:

\[ y(0,t) = 0, \quad y(L,t) = 0 \]

Initial Conditions:

\[ y(x,0) = f(x), \quad y_t(x,0) = g(x) \]

Decomposition Idea:

We can use a “divide and conquer” strategy and split the problem into two simpler problems, each involving only a single nonhomogeneous boundary condition.

Problem A:

\[ y_{tt} = a^2 y_{xx}, \quad 0 < x < L \]
\[ y(0,t) = 0, \quad y(L,t) = 0 \]
\[ y(x,0) = f(x), \quad y_t(x,0) = 0 \]

Problem B:

\[ y_{tt} = a^2 y_{xx}, \quad 0 < x < L \]
\[ y(0,t) = 0, \quad y(L,t) = 0 \]
\[ y(x,0) = 0, \quad y_t(x,0) = g(x) \]

The full solution to the original problem is:

\[ y(x,t) = y_A(x,t) + y_B(x,t) \]

We verify this using the linearity of the wave equation.

1. PDE check:

Since differentiation is linear, if \( y_A \) and \( y_B \) satisfy \( y_{tt} = a^2 y_{xx} \), then:

\[ (y_A + y_B)_{tt} = y_{A,tt} + y_{B,tt} \]
\[ (y_A + y_B)_{xx} = y_{A,xx} + y_{B,xx} \]

Hence,

\[ (y_A + y_B)_{tt} = a^2 (y_A + y_B)_{xx} \]

2. Boundary conditions:

Both \( y_A \) and \( y_B \) satisfy: \( y(0,t)=0 \), \( y(L,t)=0 \).

\[ y(0,t) = y_A(0,t) + y_B(0,t) = 0 \]
\[ y(L,t) = y_A(L,t) + y_B(L,t) = 0 \]

3. Initial conditions:

\[ y(x,0) = y_A(x,0) + y_B(x,0) = f(x)+0=f(x) \]
\[ y_t(x,0) = y_{A,t}(x,0) + y_{B,t}(x,0) = 0+g(x)=g(x) \]

Conclusion: Therefore, the sum

\[ y(x,t) = y_A(x,t) + y_B(x,t) \]
satisfies the original initial–boundary value problem.

Step 1: Separation of variables

We assume a product solution of the form:

\[ y(x,t) = X(x)T(t) \]

Step 2: Substitute into the PDE

\[ X(x)T''(t) = a^2 X''(x)T(t) \]

Step 3: Separate variables

\[ \frac{T''(t)}{a^2 T(t)} = \frac{X''(x)}{X(x)} = -\lambda \]

This gives two ordinary differential equations:

\[ X'' + \lambda X = 0 \]
\[ T'' + a^2 \lambda T = 0 \]

Step 4: Apply boundary conditions and solve the eigenvalue problem

From separation of variables we obtained:

\[ X'' + \lambda X = 0, \quad X(0)=0,\; X(L)=0 \]

We now determine possible values of \( \lambda \) by considering three cases.

Case 1: \( \lambda = 0 \)

\[ X'' = 0 \Rightarrow X(x) = Ax + B \]

Applying boundary conditions:

\[ X(0)=0 \Rightarrow B=0 \]
\[ X(L)=0 \Rightarrow A L = 0 \Rightarrow A=0 \]

Hence only the trivial solution exists.


Case 2: \( \lambda < 0 \)

Let \( \lambda = -\mu^2 \), where \( \mu > 0 \). Then the ODE becomes:

\[ X'' - \mu^2 X = 0 \]

The general solution is:

\[ X(x) = A e^{\mu x} + B e^{-\mu x} \]

Apply the boundary condition \( X(0)=0 \):

\[ A + B = 0 \Rightarrow B = -A \]

Hence,

\[ X(x) = A \left(e^{\mu x} - e^{-\mu x}\right) \]

Now apply the second boundary condition \( X(L)=0 \):

\[ X(L) = A \left(e^{\mu L} - e^{-\mu L}\right) = 0 \]

Since \( e^{\mu L} - e^{-\mu L} \neq 0 \), we must have:

\[ A = 0 \]

Therefore \( X(x) \equiv 0 \), so only the trivial solution exists.


Case 3: \( \lambda > 0 \)

Let \( \lambda = \mu^2 \), \( \mu > 0 \). Then:

\[ X'' + \mu^2 X = 0 \]
\[ X(x) = A \cos(\mu x) + B \sin(\mu x) \]

Apply boundary conditions:

\[ X(0)=0 \Rightarrow A = 0 \]

So:

\[ X(x) = B \sin(\mu x) \]

Now apply \( X(L)=0 \):

\[ \sin(\mu L)=0 \Rightarrow \mu L = n\pi,\quad n=1,2,3,\dots \]

Therefore:

\[ \mu_n = \frac{n\pi}{L}, \quad \lambda_n = \left(\frac{n\pi}{L}\right)^2 \]

and eigenfunctions:

\[ X_n(x) = \sin\left(\frac{n\pi x}{L}\right) \]

Conclusion:

Only the case \( \lambda > 0 \) produces nontrivial solutions satisfying the boundary conditions.

\[ \lambda_n = \left(\frac{n\pi}{L}\right)^2 \]
\[ X_n(x) = \sin\left(\frac{n\pi x}{L}\right) \]

Step 5: Time-dependent part

\[ T_n'' + a^2 \left(\frac{n\pi}{L}\right)^2 T_n = 0 \]

which gives oscillatory solutions:

\[ T_n(t) = A_n \cos\left(\frac{a n \pi t}{L}\right) + B_n \sin\left(\frac{a n \pi t}{L}\right) \]

Step 6: Combine solutions

We have
\[ y_n(x,t) = T_n X_n = \left[ A_n \cos\left(\frac{a n \pi t}{L}\right) + B_n \sin\left(\frac{a n \pi t}{L}\right) \right] \sin\left(\frac{n\pi x}{L}\right) \]
By superposition we get the infinite series
\[ y_(x,t) = \sum_{n=1}^{\infty} \left[ A_n \cos\left(\frac{a n \pi t}{L}\right) + B_n \sin\left(\frac{a n \pi t}{L}\right) \right] \sin\left(\frac{n\pi x}{L}\right) \]

Step 7: Apply initial conditions

We now determine the coefficients using both initial conditions.

First initial condition:

\[ y(x,0) = f(x) \]

Substituting \( t=0 \) into the series:

\[ y(x,0) = \sum_{n=1}^{\infty} A_n \sin\left(\frac{n\pi x}{L}\right) \]

Hence,

\[ f(x)=\sum_{n=1}^{\infty} A_n \sin\left(\frac{n\pi x}{L}\right) \]

So \( A_n \) are the Fourier sine coefficients of \( f(x) \):

\[ A_n = \frac{2}{L} \int_0^L f(x)\sin\left(\frac{n\pi x}{L}\right)\,dx \]

Second initial condition:

\[ y_t(x,0) = g(x) \]

Differentiate the series with respect to \( t \):

\[ y_t(x,t) = \sum_{n=1}^{\infty} \left[ -A_n \frac{a n \pi}{L} \sin\left(\frac{a n \pi t}{L}\right) + B_n \frac{a n \pi}{L} \cos\left(\frac{a n \pi t}{L}\right) \right] \sin\left(\frac{n\pi x}{L}\right) \]

Evaluate at \( t=0 \):

\[ y_t(x,0) = \sum_{n=1}^{\infty} B_n \frac{a n \pi}{L} \sin\left(\frac{n\pi x}{L}\right) \]

Hence,

\[ g(x) = \sum_{n=1}^{\infty} B_n \frac{a n \pi}{L} \sin\left(\frac{n\pi x}{L}\right) \]

So \( B_n \dfrac{a n \pi}{L} \) are the Fourier sine coefficients of \( g(x) \):

\[ B_n \frac{a n \pi}{L} = \frac{2}{L} \int_0^L g(x)\sin\left(\frac{n\pi x}{L}\right)\,dx \]

Therefore, \( B_n \) are given by:

\[ B_n = \frac{2}{a n \pi} \int_0^L g(x)\sin\left(\frac{n\pi x}{L}\right)\,dx \]

Step 8: Conclusion:

Solution:
\[ y_(x,t) = \sum_{n=1}^{\infty} \left[ A_n \cos\left(\frac{a n \pi t}{L}\right) + B_n \sin\left(\frac{a n \pi t}{L}\right) \right] \sin\left(\frac{n\pi x}{L}\right) \]
\[ A_n = \frac{2}{L} \int_0^L f(x)\sin\left(\frac{n\pi x}{L}\right)\,dx \]
\[ B_n = \frac{2}{a n \pi} \int_0^L g(x)\sin\left(\frac{n\pi x}{L}\right)\,dx \]

Wave Equation:

\[ y_{tt} = a^2 y_{xx}, \quad 0 < x < L,\; t > 0 \]

Boundary Conditions:

\[ y(0,t) = 0, \quad y(L,t) = 0 \]

Initial Conditions:

\[ y(x,0) = f(x), \quad y_t(x,0) = g(x) \]

Solution:

\[ y_(x,t) = \sum_{n=1}^{\infty} \left[ A_n \cos\left(\frac{a n \pi t}{L}\right) + B_n \sin\left(\frac{a n \pi t}{L}\right) \right] \sin\left(\frac{n\pi x}{L}\right) \]

Coefficients: Determined from initial conditions \( f(x), g(x) \).

\[ A_n = \frac{2}{L} \int_0^L f(x)\sin\left(\frac{n\pi x}{L}\right)\,dx \]
\[ B_n = \frac{2}{a n \pi} \int_0^L g(x)\sin\left(\frac{n\pi x}{L}\right)\,dx \]

Remark: If \(f(x) = 0\), then \(A_n = 0\) for all \(n\). If \(g(x) = 0\), then \(B_n = 0\) for all \(n\).

Remark: The d’Alembert form of the solution of Problem A for the vibrating string.

Problem A:

\[ y_{tt} = a^2 y_{xx}, \quad 0 < x < L \]
\[ y(0,t) = 0, \quad y(L,t) = 0 \]
\[ y(x,0) = f(x), \quad y_t(x,0) = 0 \]

Step 1: Fourier series solution

From separation of variables, the solution can be written as

\[ y(x,t)=\sum_{n=1}^{\infty} A_n \sin\left(\frac{n\pi x}{L}\right) \cos\left(\frac{n\pi a t}{L}\right) \]

Step 2: Trigonometric identity

We use the identity

\[ 2\sin A \cos B = \sin(A+B) + \sin(A-B) \]

with

\[ A = \frac{n\pi x}{L}, \quad B = \frac{n\pi a t}{L} \]

Then each term becomes

\[ \sin\left(\frac{n\pi x}{L}\right)\cos\left(\frac{n\pi a t}{L}\right) = \frac{1}{2}\Big[ \sin\left(\frac{n\pi}{L}(x+at)\right) + \sin\left(\frac{n\pi}{L}(x-at)\right) \Big] \]

Step 3: Rewriting the solution

Substituting into the series gives

\[ y(x,t)=\frac{1}{2}\sum_{n=1}^{\infty} A_n \Big[ \sin\left(\frac{n\pi}{L}(x+at)\right) + \sin\left(\frac{n\pi}{L}(x-at)\right) \Big] \]

Let \(F(x)\) be the Fourier sine series of \(f(x)\)

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

We then have

\[ y(x,t)=\frac{1}{2}\Big[F(x+at)+F(x-at)\Big] \]

Here the function \(F(x)\) is interpreted as the odd periodic extension of the initial displacement \(f(x)\), with period \(2L\).

Step 4: d’Alembert form

We obtain the d’Alembert representation:

\[ y(x,t)=\frac{1}{2}\Big[F(x+at)+F(x-at)\Big] \]
where \(F(x)\) is the odd periodic extension of the initial displacement \(f(x)\), with period \(2L\).

This shows that the solution is a superposition of two traveling waves:

  • \(F(x-at)\): wave moving to the right
  • \(F(x+at)\): wave moving to the left

Interpretation

Any initial profile splits into two waves traveling in opposite directions with speed \(a\). This is why the equation \(y_{tt} = a^2 y_{xx}\) is called the wave equation.


Problem B:

\[ y_{tt} = a^2 y_{xx}, \quad 0 < x < L \]
\[ y(0,t) = 0, \quad y(L,t) = 0 \]
\[ y(x,0) = 0, \quad y_t(x,0) = g(x) \]

Let \(G(x)\) be the odd periodic extension of \(g(x)\) with period \(2L\). Define the function \(H(x)\) by

\[ H(x) = \int_0^x G(s)\,ds \]

The solution of Problem B is given by

\[ y(x,t)=\frac{1}{2a} \Big[ H(x+at) - H(x-at) \Big] \]

Original Problem:

\[ y_{tt} = a^2 y_{xx}, \quad 0 < x < L \]
\[ y(0,t) = 0, \quad y(L,t) = 0 \]
\[ y(x,0) = f(x), \quad y_t(x,0) = g(x) \]

Let \(F(x)\) be the odd periodic extension of the initial displacement \(f(x)\), and let \(G(x)\) be the odd periodic extension of the initial velocity \(g(x)\), both with period \(2L\). Define

\[ H(x)=\int_0^x G(s)\,ds \]

Final d’Alembert Solution:

\[ y(x,t)=\frac12\Big[F(x+at)+F(x-at)\Big] +\frac{1}{2a}\Big[H(x+at)+H(x-at)\Big] \]

Interpretation

The solution is a superposition of four traveling waves: two originating from the initial displacement \(f(x)\), and two originating from the initial velocity \(g(x)\), all propagating with speed \(a\).

Example 1

Solve the wave equation

\[ y_{tt} = 4y_{xx}, \quad 0 < x < \pi,\; t > 0 \]

subject to boundary conditions

\[ y(0,t) = 0, \quad y(\pi,t) = 0 \]

and initial conditions

\[ y(x,0) = \frac{1}{10}\sin^3 x, \quad y_t(x,0) = 0 \]

Solution:

Step 1: Expand the initial condition

Use the identity

\[ \sin^3 x = \frac{3\sin x - \sin 3x}{4} \]

Hence,

\[ y(x,0) = \frac{1}{10}\cdot\frac{3\sin x - \sin 3x}{4} = \frac{3}{40}\sin x - \frac{1}{40}\sin 3x \]

Step 2: General solution form

\[ y(x,t)=\sum_{n=1}^{\infty} \left(A_n \cos(2nt) + B_n \sin(2nt)\right)\sin(nx) \]

Step 3: Apply initial velocity condition

\[ y_t(x,0)=0 \Rightarrow B_n = 0 \]

Step 4: Match initial displacement

\[ y(x,0)=\sum_{n=1}^{\infty} A_n \sin(nx) \]

Comparing coefficients gives:

\[ A_1 = \frac{3}{40}, \quad A_3 = -\frac{1}{40}, \quad A_n = 0 \ (n \neq 1,3) \]

Final solution:

\[ y(x,t)=\frac{3}{40}\cos(2t)\sin x -\frac{1}{40}\cos(6t)\sin 3x \]

Example 2: Sudden Impact on a String

A guitar string lies across the back of a pickup truck. At time \(t = 0\), the truck suddenly slams into a brick wall with speed \(v_0\), producing an instantaneous uniform vertical velocity along the entire string. Determine the resulting displacement \(y(x,t)\) of the string for \(0 < x < L,\; t > 0\), assuming both ends are fixed.


Solution:

The wave equation is

\[ y_{tt} = a^2 y_{xx}, \quad 0 < x < L,\; t > 0 \]

with boundary conditions

\[ y(0,t) = 0, \quad y(L,t) = 0 \]

and initial conditions

\[ y(x,0) = 0, \quad y_t(x,0) = g(x) = v_0 \]

Using separation of variables, we seek a Fourier sine series solution of the form

\[ y(x,t)=\sum_{n=1}^{\infty} B_n \sin\left(\frac{n\pi a t}{L}\right) \sin\left(\frac{n\pi x}{L}\right) \]

Differentiating with respect to \(t\) and applying the initial velocity condition gives

\[ v_0 = \sum_{n=1}^{\infty} \frac{n\pi a}{L} B_n \sin\left(\frac{n\pi x}{L}\right) \]

Hence the Fourier sine coefficients are

\[ B_n = \frac{2}{n\pi a} \int_0^L v_0 \sin\left(\frac{n\pi x}{L}\right)\,dx \]

Evaluating the integral gives

\[ B_n = \frac{4v_0 L}{n^2 \pi^2 a} \quad \text{for odd } n, \qquad B_n = 0 \text{ for even } n \]

Final Answer:

\[ y(x,t)=\frac{4v_0 L}{\pi^2 a} \sum_{\substack{n=1 \\ n\ \text{odd}}}^{\infty} \frac{1}{n^2} \sin\left(\frac{n\pi a t}{L}\right) \sin\left(\frac{n\pi x}{L}\right) \]

Example 3

Solve the following boundary value problem:

\[ 16y_{tt} = y_{xx}, \quad 0 < x < \pi,\; t > 0 \]
\[ y(0,t) = 0, \quad y(\pi,t) = 0 \]
\[ y(x,0) = \frac{1}{3}\sin x, \quad y_t(x,0) = \frac{1}{3}\sin x \]

Solution:

Step 1: The wave equation is \(y_{tt} = a^2 y_{xx}\). Given \(16y_{tt} = y_{xx}\), we rewrite it as:

\[ y_{tt} = \frac{1}{16} y_{xx} \implies a^2 = \frac{1}{16}, \text{ so } a = \frac{1}{4} \]

Step 2: The general solution for a string of length \(L = \pi\) fixed at both ends is:

\[ y(x,t) = \sum_{n=1}^{\infty} \left[ A_n \cos\left(\frac{nt}{4}\right) + B_n \sin\left(\frac{nt}{4}\right) \right] \sin(nx) \]

Step 3: Apply the initial position condition \(y(x,0) = \dfrac{1}{3}\sin x\). By substituting \(t=0\), the sum collapses to a single term:

\[ y(x,0) = A_1 \sin(x) = \frac{1}{3} \sin(x) \implies A_1 = \frac{1}{3} \]

Step 4: Apply the initial velocity condition \(y_t(x,0) = \dfrac{1}{3}\sin x\). Differentiating the general solution with respect to \(t\) and setting \(t=0\):

\[ y_t(x,0) = \sum_{n=1}^{\infty} B_n \left(\frac{n}{4}\right) \sin(nx) = \frac{1}{3} \sin(x) \]
\[ \implies B_1 \left(\frac{1}{4}\right) = \frac{1}{3} \implies B_1 = \frac{4}{3} \]

Final Answer:

\[ y(x,t) = \frac{1}{3}\sin x \left[ \cos\left(\frac{t}{4}\right) + 4\sin\left(\frac{t}{4}\right) \right] \]

Example 4

Solve the following boundary value problem:

\[ y_{tt} = 36y_{xx}, \quad 0 < x < 4,\; t > 0 \]
\[ y(0,t) = 0, \quad y(4,t) = 0 \]
\[ y(x,0) = \frac{1}{8}\sin(\pi x), \quad y_t(x,0) = 16\sin(2\pi x) \]

Final Answer:

\[ y(x,t) = \frac{1}{8} \cos(6\pi t) \sin(\pi x) + \frac{4}{3\pi} \sin(12\pi t) \sin(2\pi x) \]

Example 5

Solve the following boundary value problem:

\[ y_{tt} = 16y_{xx}, \quad 0 < x < \pi,\; t > 0 \]
\[ y(0,t) = 0, \quad y(\pi,t) = 0 \]
\[ y(x,0) = \sin x, \quad y_t(x,0) = 9 \]

Final Answer:

\[ y(x,t) = \cos(4t)\sin(x) + \frac{9}{2\pi} \sum_{n=1}^{\infty} \frac{1 - (-1)^n}{n^2} \sin(4nt) \sin(nx) \]

Example 6

Solve the following boundary value problem:

\[ y_{tt} = 4y_{xx}, \quad 0 < x < 9,\; t > 0 \]
\[ y(0,t) = 0, \quad y(9,t) = 0 \]
\[ y(x,0) = 0, \quad y_t(x,0) = x(9-x) \]

Final Answer:

\[ y(x,t) = \frac{1458}{\pi^4} \sum_{n=1}^{\infty} \frac{1 - (-1)^n}{n^4} \sin\left(\frac{2n\pi t}{9}\right) \sin\left(\frac{n\pi x}{9}\right) \]

Example 7

The solution to the wave equation

\[ \begin{array}{lll} y_{tt} = y_{xx}, && 0 < x < 5 \\ y(0,t) = 0 , & y(5,t) = 0, & t >0\\ y(x,0)=2x,&y_t(x,0)=3-x,&0\leq x \leq 5 \end{array} \]

is given by

\[ y(x,t)=\sum_{n=1}^{\infty} c_{n} \sin\left( \frac{n\pi t}{5}\right) \sin\left( \frac{n\pi x}{5}\right) +\sum_{n=1}^{\infty} d_{n} \cos\left( \frac{n\pi t}{5}\right) \sin\left( \frac{n\pi x}{5}\right), \]

for constants \(c_n\) and \(d_n\), \(n \geq 1\). Find \(c_n\).

  1. \[ \boxed{\displaystyle \frac{2}{n\pi}\int_0^5 (3-x) \sin \left( \frac{n\pi x}{5} \right)\,dx} \]
  2. \[ \frac{2}{5}\int_0^5 (2x) \sin \left( \frac{n\pi x}{5} \right)\,dx \]
  3. \[ \frac{2}{n\pi}\int_0^5 (2x) \sin \left( \frac{n\pi x}{5} \right)\,dx \]
  4. \[ \frac{2}{5}\int_0^5 (3-x) \sin \left( \frac{n\pi x}{5} \right)\,dx \]
  5. \[ \frac{2}{n\pi}\int_0^5 (3-x) \cos \left( \frac{n\pi x}{5} \right)\,dx \]

Example 8: Wave Equation with Mixed Boundary Conditions

Consider a stretched string of length \(L\), initially at rest. The displacement \(y(x,t)\) satisfies the wave equation with one fixed end and one free (sliding) end:

\[ y_{tt} = a^2 y_{xx}, \quad 0 < x < L,\; t > 0. \]

The boundary conditions are:

\[ y(0,t) = 0, \qquad y_x(L,t) = 0, \]

and the initial conditions are:

\[ y(x,0) = f(x), \qquad y_t(x,0) = 0. \]

Use the method of separation of variables to derive the solution

\[ y(x,t)=\sum_{\substack{n=1 \\ n\ \text{odd}}}^{\infty} A_n \cos\left(\frac{n\pi a}{2L}t\right) \sin\left(\frac{n\pi}{2L}x\right), \]

where the coefficients \(A_n\) are given by

\[ A_n=\frac{2}{L}\int_0^L f(x) \sin\left(\frac{n\pi}{2L}x\right)\,dx, \quad n=1,3,5,\dots \]

We solve this using separation of variables.

1. Separation of variables

Assume a product solution \(y(x,t)=X(x)T(t)\). Substituting into the PDE gives:

\[ X(x)T''(t)=a^2 X''(x)T(t). \]

Divide by \(a^2XT\):

\[ \frac{T''}{a^2 T}=\frac{X''}{X}=-\lambda. \]

This leads to two ODEs:

\[ X''+\lambda X=0, \qquad T''+a^2\lambda T=0. \]

2. Spatial eigenvalue problem

We consider different cases for \(\lambda\):

Case 1: \(\lambda = 0\)

\[ X'' = 0 \;\Rightarrow\; X(x)=A+Bx. \]

Apply boundary conditions: \(X(0)=0 \Rightarrow A=0\), and \(X'(L)=0 \Rightarrow B=0\). Hence only the trivial solution \(X \equiv 0\).

Case 2: \(\lambda < 0\)

Let \(\lambda = -\mu^2\), where \(\mu > 0\). Then:

\[ X'' - \mu^2 X = 0. \]
\[ X(x)=Ae^{\mu x}+Be^{-\mu x}. \]

Applying the boundary conditions again forces \(A=B=0\), giving only the trivial solution.

Case 3: \(\lambda > 0\)

Let \(\lambda=k^2\). Then:

\[ X''+k^2X=0. \]

General solution:

\[ X(x)=A\sin(kx)+B\cos(kx). \]

Apply boundary conditions:

At \(x=0\):

\[ X(0)=0 \Rightarrow B=0. \]

So:

\[ X(x)=A\sin(kx). \]
\[ X'(x)=Ak\cos(kx), \]

At \(x=L\):

\[ X'(L)=Ak\cos(kL)=0. \]

For nontrivial solutions:

\[ \cos(kL)=0 \]
\[ \Longrightarrow k=\frac{n\pi}{2L}, \quad n=1,3,5,\dots \]

Hence the eigenfunctions are:

\[ X_n(x)=\sin\left(\frac{n\pi}{2L}x\right), \quad n \text{ odd}. \]

3. Time equation

For each \(n\), the time equation becomes:

\[ T_n'' + a^2 \left(\frac{n\pi}{2L}\right)^2 T_n = 0. \]

The general solution is:

\[ T_n(t)=C_n \cos\left(\frac{n\pi a}{2L}t\right) + D_n \sin\left(\frac{n\pi a}{2L}t\right). \]

Using \(y_t(x,0)=0\), we get \(D_n=0\).

4. Full solution

Hence each solution (building block) is:

\[ y_n(x,t)=T_n(t)X_n(x) =\cos\left(\frac{n\pi a}{2L}t\right) \sin\left(\frac{n\pi}{2L}x\right), \quad n \text{ odd}. \]

By superposition, the general solution is obtained by summing over all odd integers \(n\):

\[ y(x,t)=\sum_{\substack{n=1 \\ n\ \text{odd}}}^{\infty} A_n \cos\left(\frac{n\pi a}{2L}t\right) \sin\left(\frac{n\pi}{2L}x\right). \]

5. Coefficients

From \(y(x,0)=f(x)\), we obtain:

\[ f(x)=\sum_{\substack{n=1 \\ n\ \text{odd}}}^{\infty} A_n \sin\left(\frac{n\pi}{2L}x\right). \]

This is a Fourier sine series expansion of \(f(x)\) on \((0,L)\). Hence

\[ A_n=\frac{2}{L}\int_0^L f(x) \sin\left(\frac{n\pi}{2L}x\right)\,dx, \quad n \text{ odd}. \]

Example 9:

A string of length \(\pi\) is fixed at the left end and the right end is allowed to move vertically but not horizontally, so

\[ y(0,t)=0, \qquad y_x(\pi,t)=0. \]

The tension and density are such that \(a^2=1\), giving the wave equation:

\[ y_{tt}=y_{xx}. \]

The string has initial displacement \(f(x)=x\), \(0 \le x \le \pi\), and no initial velocity. The solution can be written as:

\[ y(x,t)=\sum_{n=1}^{\infty} c_n T_n(t) X_n(x), \]

where \(c_n\) are constants determined by the initial condition. Find \(T_n(t)\).

  1. \[ \boxed{T_n(t)=\cos\left(\frac{2n-1}{2}t\right)} \]
  2. \[ T_n(t)=\sinh\left(\frac{2n-1}{2}t\right) \]
  3. \[ T_n(t)=\sin\left(\frac{2n-1}{2}t\right) \]
  4. \[ T_n(t)=\cos(nt) \]
  5. \[ T_n(t)=\sin(nt) \]

Example 10: The d’Alembert solution (an alternate method)

Part 1: Suppose that the function \(F\) is twice differentiable for all \(x\). Use the chain rule to verify that \(F(x+at)\) and \(F(x-at)\) are solutions to the wave equation

\[ y_{tt} = a^2 y_{xx} \]

Part 2: Let \(F\) be the odd periodic extension of the initial displacement \(f(x)\) with period \(2L\). Verify that the solution

\[ y(x,t) = \frac{1}{2}[F(x-at) + F(x+at)] \]
satisfies the boundary conditions
\[ y(0,t) = 0, \quad y(L,t) = 0 \]
the initial conditions
\[ y(x,0) = F(x), \quad y_t(x,0) = 0 \]

Solution:

Part 1: Verification via Chain Rule

Let \(u = x+at\). By the chain rule:

\[ y_x = F'(u), \quad y_t = aF'(u) \] \[ y_{xx} = F''(u), \quad y_{tt} = a^2F''(u) \]

Substituting into the wave equation gives \(a^2F''(u) = a^2(F''(u))\), confirming it is a solution. The verification for \(F(x-at)\) follows the same logic.

Part 2: Verification of Conditions

Given

\[ y(x,t) = \frac{1}{2}[F(x-at) + F(x+at)] \]
  • Boundary Conditions: Due to odd symmetry
    \[ y(0,t) = \frac{1}{2}[F(-at) + F(at)] = 0 \]
    and similarly for \(x=L\).
  • Initial Displacement:
    \[ y(x,0) = \frac{1}{2}[F(x) + F(x)] = F(x) = f(x), \quad \forall x \in (0,L). \]
  • Initial Velocity:
    \[y_t(x,t) = \frac{1}{2}[-aF'(x-at) + aF'(x+at)\]
    At \(t=0\),
    \[y_t(x,0) = \frac{1}{2}[-aF'(x) + aF'(x)] = 0\]

Example 11: The d’Alembert solution

A vibrating string of length \(L=\pi\) is fixed at both ends and released from rest at time \(t=0\). Its initial displacement is given by

\[ f(x)=2\sin^2 x = 1 - \cos(2x), \quad 0 \le x \le \pi. \]

The motion of the string satisfies the wave equation

\[ y_{tt}=y_{xx}, \quad 0 < x < \pi,\; t > 0, \]

with boundary conditions \(y(0,t)=y(\pi,t)=0\), and zero initial velocity: \(y_t(x,0)=0\).

  1. Find the odd periodic extension \(F(x)\) of \(f(x)\) with period \(2\pi\).
  2. Use the d’Alembert’s formula to determine the displacement \(y(x,t)\) of the string.
  3. Evaluate and graph the displacement \(y(x,t)\) at \(t=\frac{\pi}{4}\).

Solution:

1. Odd Periodic Extension \(F(x)\)

To satisfy the boundary conditions \(y(0,t)=y(\pi,t)=0\), we extend \(f(x)=1-\cos(2x)\) as an odd function, then periodically with period \(2\pi\). For \(x \in [-\pi, 0]\), we use the odd property \(F(x) = -f(-x)\).

\[ F(x) = \begin{cases} 1 - \cos(2x), & 0 \le x \le \pi \\ \cos(2x) - 1, & -\pi \le x < 0 \end{cases} \]
2. The d’Alembert’s Formula

With wave speed \(a=1\) and zero initial velocity \(y_t(x,0)=0\), the general solution simplifies to the superposition of two traveling waves:

\[ y(x,t) = \frac{1}{2} [F(x-t) + F(x+t)] \]
3. Evaluation and Graphing at \(t=\frac{\pi}{4}\)

Substituting \(t=\frac{\pi}{4}\) into the formula gives:

\[ y(x, \frac{\pi}{4}) = \frac{1}{2} \left[ F\left(x - \frac{\pi}{4}\right) + F\left(x + \frac{\pi}{4}\right) \right] \]

The first term, \(\frac{1}{2}F(x-\frac{\pi}{4})\), shifts the wave to the right, and the second term, \(\frac{1}{2}F(x+\frac{\pi}{4})\), shifts it to the left. The total displacement is the sum of these two components.

Vibrating String (d’Alembert Solution)

0.00

Check out this desmos graph.

Practice Problems

Solve the following boundary value problems:

  1. \[ y_{tt} = 4y_{xx}, \quad 0 < x < \pi, \quad t > 0; \quad y(0,t) = y(\pi,t) = 0, \quad y(x,0) = \frac{1}{10} \sin 2x, \quad y_t(x,0) = 0 \]
  2. \[ y_{tt} = y_{xx}, \quad 0 < x < 1, \quad t > 0; \quad y(0,t) = y(1,t) = 0, \quad y(x,0) = \frac{1}{10} \sin \pi x - \frac{1}{20} \sin 3\pi x, \quad y_t(x,0) = 0 \]
  3. \[ 4y_{tt} = y_{xx}, \quad 0 < x < \pi, \quad t > 0; \quad y(0,t) = y(\pi,t) = 0, \quad y(x,0) = y_t(x,0) = \frac{1}{10} \sin x \]
  4. \[ 4y_{tt} = y_{xx}, \quad 0 < x < 2, \quad t > 0; \quad y(0,t) = y(2,t) = 0, \quad y(x,0) = \frac{1}{5} \sin \pi x \cos \pi x, \quad y_t(x,0) = 0 \]
  5. \[ y_{tt} = 25y_{xx}, \quad 0 < x < 3, \quad t > 0; \quad y(0,t) = y(3,t) = 0, \quad y(x,0) = \frac{1}{4} \sin \pi x, \quad y_t(x,0) = 10 \sin 2\pi x \]
  6. \[ y_{tt} = 100y_{xx}, \quad 0 < x < \pi, \quad t > 0; \quad y(0,t) = y(\pi,t) = 0, \quad y(x,0) = x(\pi - x), \quad y_t(x,0) = 0 \]
  7. \[ y_{tt} = 100y_{xx}, \quad 0 < x < 1, \quad t > 0; \quad y(0,t) = y(1,t) = 0, \quad y(x,0) = 0, \quad y_t(x,0) = x \]
  8. \[ y_{tt} = 4y_{xx}, \quad 0 < x < 1, \quad t > 0; \quad y(0,t) = y(1,t) = 0, \quad y(x,0) = 0, \quad y_t(x,0) = x(1 - x) \]