Chris' Math Blog

One Dimensional Wave Equation

Q:  Find the general solution to the boundary value problem for the 1-D Wave Equation:

\begin{aligned}\frac{\partial^2y}{\partial^2t} & = a^2\frac{\partial^2y}{\partial^2x}\\y(0,t) & = y(L,t)=0; \ (0<x<L, \ t>0)\\y(x,0) & = f(x) \ (0<x<L)\\y_t(x,0) & = g(x) \ (0<x<L)\end{aligned}

where y(x,t) is the displacement function of a vibrating string with fixed ends,f(x) is the initial position function, and g(x) is the initial velocity function.

Solution:  The best way to solve this would be to set up two boundary value problems [where each one has one nonhomogeneous condition], and then solve the problems using the technique of Separation of Variables:

\begin{array}{cc}\text{Problem A} & \text{Problem B}\\\begin{aligned} y_{tt}&=a^2y_{xx}\\y(0,t)&=y(L,t)=0 \\y(x,0)&=f(x)\\y_t(x,0)&=0\end{aligned} & \begin{aligned} y_{tt}&=a^2y_{xx}\\y(0,t)&=y(L,t)=0 \\y(x,0)&=0\\y_t(x,0)&=g(x)\end{aligned}\end{array}

Problem A:

If we let y(x,t)=X(x)T(t), then the PDE becomes XT^{\prime\prime}=a^2X^{\prime\prime}T.  Now separate the variables to get:

\displaystyle\frac{X^{\prime\prime}}{X}=\frac{T^{\prime\prime}}{a^2T}

The two functions \displaystyle\frac{X^{\prime\prime}}{X} and \displaystyle\frac{T^{\prime\prime}}{a^2T} agree \forall\,x,t if they both are equal to the same constant.  We now let :

\displaystyle\frac{X^{\prime\prime}}{X}=\frac{T^{\prime\prime}}{a^2T}=-\lambda

What we now have is an eigenvalue problem.  We can now solve two ordinary DEs:

\begin{aligned} X^{\prime\prime}+\lambda X&=0 \\ T^{\prime\prime}+\lambda a^2T&=0\end{aligned}

Since the endpoint conditions y(0,t)=X(0)T(t)=0 and y(L,t)=X(L)T(t)=0 require that X(0)=X(L)=0 if T(t) is non-trivial.  Thus, X(x) must satisfy the eigenvalue problem

X^{\prime\prime}+\lambda X=0, ~~~X(0)=X(L)=0

If \lambda=0, then the eigenvalue problem becomes:

X^{\prime}=0

When solved, the general solution is X=Ax+B.  When we apply the endpoint conditions, we have A=B=0.  This gives us the trivial solution X(x)\equiv 0.  Thus, \lambda=0 is NOT an eigenvalue.

If \lambda<0, we will let \lambda=-\alpha^2 \ (\alpha>0).  The eigenvalue problem now becomes:

X^{\prime\prime}-\alpha^2X=0

When solved, the general solution is:

X=c_1e^{\alpha x}+c_2e^{-\alpha x}=A\cosh(\alpha x)+B\sinh(\alpha x); ~ (A=c_1+c_2, ~ B=c_1-c_2)

where

\begin{aligned} \cosh(\alpha x)&=\frac{1}{2}\left(e^{\alpha x}+e^{-\alpha x}\right) \\ \sinh(\alpha x)&=\frac{1}{2}\left(e^{\alpha x}-e^{-\alpha x}\right)\end{aligned}

Applying the endpoint condition X(0)=0, we haveX(0)=A\cosh(0)+B\sinh(0)=A=0 so that X(x)=B\sinh(\alpha x).  When we apply the other endpoint X(L)=0, we have X(L)=B\sinh(\alpha x)=0.  Thus, B=0 since\alpha \neq 0 and \sinh(\alpha x)=0 for x=0.  Thus the only solution is the trivial solution X(x)\equiv 0.  As a result, there are no negative eigenvalues.

Now, when \lambda>0, we let \lambda=\alpha^2,~(\alpha>0)  The eigenvalue problem then becomes:

X^{\prime\prime}+\alpha^2X=0

The general solution has the form:

X=A\cos(\alpha x)+B\sin(\alpha x)

Applying the endpoint condition X(0)=0, we have X(0)=A\cos(0)+B\sin(0)=A=0 so that X(x)=B\sin(\alpha x).  But if we apply the other condition X(L)=0, we have X(L)=B\sin(\alpha L).  This can occur when B\neq 0 when \alpha L is a positive multiple of \pi:

\pi,\,2\pi,\,3\pi,\dots,\,n\pi\,\,\,\,\left(n\in\mathbb{Z}^+\right)

Therefore,

\alpha L=\pi,\,2\pi,\,3\pi,\dots,\,n\pi

Solving for \alpha, we get:

\alpha=\displaystyle\frac{\pi}{L},~\frac{2\pi}{L},~\frac{3\pi}{L},\dots,~\frac{n\pi}{L}

Since \lambda=\alpha^2, we can say that:

\lambda=\displaystyle\frac{\pi^2}{L^2},~\frac{4\pi^2}{L^2},~\frac{9\pi^2}{L^2},\dots,~\frac{n^2\pi^2}{L^2}

We now can see that we have an infinte sequence of eigenvalues defined by:

\lambda_n=\displaystyle\frac{n^2\pi^2}{L^2}~~~~\left(n\in\mathbb{Z}^+\right)

The associated eigenfunction is

X_n=\sin\left(\frac{n\pi}{L}\right),~~~~\left(n\in\mathbb{Z}^+\right)

——-
***

The homogeneous initial condition

y_t(x,0)=X(x)T^{\prime}(0)=0

Implies that T^{\prime}(0)=0.  Thus, the solution T_n(t) that is associated with the eigenvalue \lambda_n=\displaystyle\frac{n^2\pi^2}{L^2} must also satisfy the conditions

T_n\!^{\prime\prime}+\displaystyle\frac{n^2\pi^2a^2}{L^2}T_n=0,~~~T_n\!^{\prime}(0)=0

After some calculations [which I have omitted], we get the general solution:

\displaystyle T_n(t)=A_n\cos\left(\frac{n\pi at}{L}\right)+B_n\sin\left(\frac{n\pi at}{L}\right)

To apply the condition, we need to find T_n\!^{\prime}(t):

\begin{aligned}\displaystyle T_n\!^{\prime}(t)&=-A_n\frac{n\pi a}{L}\sin\left(\frac{n\pi at}{L}\right)+B_n\frac{n\pi a}{L}\cos\left(\frac{n\pi at}{L}\right) \\ \displaystyle &=\frac{n\pi a}{L}\bigg[-A_n\sin\left(\frac{n\pi at}{L}\right)+B_n\cos\left(\frac{n\pi at}{L}\right)\bigg]\end{aligned}

Applying the condition T^{\prime}(0)=0, we get:

T_n\!^{\prime}(0)=\displaystyle\frac{n\pi a}{L}\bigg[-A_n\sin(0)+B_n\cos(0)\bigg]=B_n\frac{n\pi a}{L}=0

Therefore, B_n=0.  Thus, T_n(t) can be defined as the non-trivial solution

\displaystyle T_n(t)=\cos\left(\frac{n\pi a}{L}\right)

Since y(x,t)=X(x)T(x), we can say that

\displaystyle y_n(x,t)=X_n(x)T_n(t)=\sin\bigg(\frac{n\pi x}{L}\bigg)\cos\bigg(\frac{n\pi at}{L}\bigg),~~~~n\in\mathbb{Z}^+

Each of these terms satisfy the wave equation \displaystyle\frac{\partial^2y}{\partial t^2}=a^2\frac{\partial^2y}{\partial x^2} and the homogeneous boundary condition given at the start of this part of the problem.  Thus, by the principle of superposition, we define y_n(x,t) as the infinte series:

y_n(x,t)=\displaystyle\sum_{n=1}^{\infty}A_n\sin\bigg(\frac{n\pi x}{L}\bigg)\cos\bigg(\frac{n\pi at}{L}\bigg)

All we need to do now is find \left\{A_n\right\} such that it satisfies the nonhomogeneous condition

\displaystyle y(x,0)=\sum_{n=1}^{\infty}A_n\sin\bigg(\frac{n\pi x}{L}\bigg)=f(x)

for 0<x<L.  However, this will be the Fourier Sine Series of f(x) if we choose

\displaystyle A_n=\frac{2}{L}\int_0^L f(x)\sin\bigg(\frac{n\pi x}{L}\bigg)\,dx

Therefore, the Formal Series Solution to Problem A is

y(x,t)=\displaystyle\sum_{n=1}^{\infty}A_n\sin\bigg(\frac{n\pi x}{L}\bigg)\cos\bigg(\frac{n\pi at}{L}\bigg)

where

\displaystyle A_n=\frac{2}{L}\int_0^L f(x)\sin\bigg(\frac{n\pi x}{L}\bigg)\,dx

———————————————-

Problem B

Let us start from ***:

The homogeneous initial condition

y(x,0)=X(x)T(0)=0

implies that T(0)=0.  Thus, the solution T_n(t) associated with the eigenvalue \displaystyle\lambda_n=\frac{n^2\pi^2}{L^2} must also satisfy the conditions

\displaystyle T_n\!^{\prime\prime}+\frac{n^2\pi^2a^2t^2}{L^2}T_n=0,~~~T_n(0)=0

After some calculations [which I have omitted again...], the general solution takes the form

\displaystyle T_n(t)=A_n\cos\bigg(\frac{n\pi at}{L}\bigg)+B_n\sin\bigg(\frac{n\pi at}{L}\bigg)

Applying the initial condition, we get

T_n=A_n=0

Thus, T_n(t) can be defined as the non-trivial solution

\displaystyle T_n(t)=\sin\bigg(\frac{n\pi at}{L}\bigg)

Since y(x,t)=X(x)T(t), we can say that

\displaystyle y_n(x,t)=X(x)T(t)=\sin\bigg(\frac{n\pi at}{L}\bigg)\sin\bigg(\frac{n\pi x}{L}\bigg)

Each of these terms satisfy the wave equation \displaystyle\frac{\partial^2y}{\partial t^2}=a^2\frac{\partial^2y}{\partial x^2} and the homogeneous boundary condition given at the start of this part of the problem.  Thus, by the principle of superposition, we define y_n(x,t) as the infinte series:

\displaystyle y_n(x,t)=\sum_{n=1}^{\infty}B_n\sin\bigg(\frac{n\pi x}{L}\bigg)\sin\bigg(\frac{n\pi at}{L}\bigg)

Find y_t(x,y):

\displaystyle y_t(x,t)=\sum_{n=1}^{\infty}B_n\frac{n\pi a}{L}\cos\bigg(\frac{n\pi x}{L}\bigg)\sin\bigg(\frac{n\pi at}{L}\bigg)

All we need to do now is find \left\{B_n\right\} such that it satisfies the nonhomogeneous condition

\displaystyle y_t(x,0)=\sum_{n=1}^{\infty}B_n\frac{n\pi a}{L}\cos\bigg(\frac{n\pi x}{L}\bigg)\sin\bigg(\frac{n\pi at}{L}\bigg)=g(x)

for 0<x<L.  However, this will be the Fourier Sine Series of g(x) if we choose

\displaystyle B_n\frac{n\pi a}{L}=\frac{2}{L}\int_0^L g(x)\sin\bigg(\frac{n\pi x}{L}\bigg)\,dx\implies B_n=\frac{2}{n\pi a}\int_0^L g(x)\sin\bigg(\frac{n\pi x}{L}\bigg)\,dx

Therefore, the Formal Series Solution to Problem B is

\displaystyle y(x,t)=\sum_{n=1}^{\infty}B_n\sin\bigg(\frac{n\pi x}{L}\bigg)\sin\bigg(\frac{n\pi at}{L}\bigg)

where

\displaystyle B_n=\frac{2}{n\pi a}\int_0^L g(x)\sin\bigg(\frac{n\pi x}{L}\bigg)\,dx

————-

Thus, the Formal Series Solution to the One Dimensional Wave Equation is

\begin{aligned}y(x,t)&=\sum_{n=1}^{\infty}\bigg[A_n\cos\bigg(\frac{n\pi a}{L}t\bigg)+B_n\sin\bigg(\frac{n\pi a}{L}t\bigg)\bigg]\sin\bigg(\frac{n\pi}{L}x\bigg)\\ \text{where} \\A_n&=\frac{2}{L}\int_0^L f(x)\sin\bigg(\frac{n\pi x}{L}\bigg)\,dx \\B_n&=\frac{2}{n\pi a}\int_0^L g(x)\sin\bigg(\frac{n\pi x}{L}\bigg)\,dx\end{aligned}

February 12, 2010 Posted by | Differential Equations | Leave a Comment

   

Follow

Get every new post delivered to your Inbox.