
Originally Posted by
Chris L T521
Instead of ODEs, why not try a PDE?
Find the general solution to the boundary value problem for the 1-D Wave Equation:
$\displaystyle \frac{\partial^2y}{\partial^2t}=a^2\frac{\partial^ 2y}{\partial^2x}$
$\displaystyle y(0,t)=y(L,t)=0; \ (0<x<L, \ t>0)$
$\displaystyle y(x,0)=f(x) \ (0<x<L)$
$\displaystyle y_t(x,0)=g(x) \ (0<x<L)$
where $\displaystyle y(x,t)$ is the displacement function of a vibrating string with fixed ends, $\displaystyle f(x)$ is the initial position function, and $\displaystyle g(x)$ is the initial velocity function.
Show all steps.
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:
$\displaystyle \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 $\displaystyle y(x,t)=X(x)T(t)$, then the PDE becomes:
$\displaystyle XT''=a^2X''T$
Now separate the variables:
$\displaystyle \frac{X''}{X}=\frac{T''}{a^2T}$
The two functions $\displaystyle \frac{X''}{X}$ and $\displaystyle \frac{T''}{a^2T}$ agree $\displaystyle \forall x,t$ if they both are equal to the same constant. We now let :
$\displaystyle \frac{X''}{X}=\frac{T''}{a^2T}=-\lambda$
What we now have is an eigenvalue problem. We can now solve two ordinary DEs:
$\displaystyle \begin{aligned} X''+\lambda X&=0 \\ T''+\lambda a^2T&=0\end{aligned}$
Since the endpoint conditions $\displaystyle y(0,t)=X(0)T(t)=0$ and $\displaystyle y(L,t)=X(L)T(t)=0$ require that $\displaystyle X(0)=X(L)=0$ if $\displaystyle T(t)$ is non-trivial. Thus, $\displaystyle X(x)$ must satisfy the eigenvalue problem
$\displaystyle X''+\lambda X=0, ~~~X(0)=X(L)=0$
If $\displaystyle \lambda=0$, then the eivenvalue problem becomes:
$\displaystyle X''=0$
When solved, the general solution is $\displaystyle X=Ax+B$. When we apply the endpoint conditions, we have $\displaystyle A=B=0$. This gives us the trivial solution $\displaystyle X(x)\equiv 0$. Thus, $\displaystyle \lambda=0$ is NOT an eigenvalue.
If $\displaystyle \lambda<0$, we will let $\displaystyle \lambda=-\alpha^2 \ (a>0)$. The eigenvalue problem now becomes:
$\displaystyle X''-\alpha^2X=0$
When solved, the general solution is:
$\displaystyle 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
$\displaystyle \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 $\displaystyle X(0)=0$, we have $\displaystyle X(0)=A\cosh(0)+B\sinh(0)=A=0$ so that $\displaystyle X(x)=B\sinh(\alpha x)$. When we apply the other endpoint $\displaystyle X(L)=0$, we have $\displaystyle X(L)=B\sinh(\alpha x)=0$. Thus, $\displaystyle B=0$ since $\displaystyle \alpha \neq 0$ and $\displaystyle \sinh(\alpha x)=0$ for $\displaystyle x=0$. Thus the only solution is the trivial solution $\displaystyle X(x)\equiv 0$. As a result, there are no negative eigenvalues.
Now, when $\displaystyle \lambda>0$, we let $\displaystyle \lambda=\alpha^2,~(\alpha>0)$. The eigenvalue problem then becomes:
$\displaystyle X''+\alpha^2X=0$
The general solution has the form:
$\displaystyle X=A\cos(\alpha x)+B\sin(\alpha x)$
Applying the endpoint condition $\displaystyle X(0)=0$, we have $\displaystyle X(0)=A\cos(0)+B\sin(0)=A=0$ so that $\displaystyle X(x)=B\sin(\alpha x)$. But if we apply the other condition $\displaystyle X(L)=0$, we have $\displaystyle X(L)=B\sin(\alpha L)$. This can occur when $\displaystyle B\neq 0$ when $\displaystyle \alpha L$ is a postive multiple of $\displaystyle \pi$:
$\displaystyle \pi,~2\pi,~3\pi,...,~n\pi~~~~\left(n\in\mathbb{Z}^ +\right)$
Therefore
$\displaystyle \alpha L=\pi,~2\pi,~3\pi,...,~n\pi$
Solving for $\displaystyle \alpha$, we get:
$\displaystyle \alpha=\frac{\pi}{L},~\frac{2\pi}{L},~\frac{3\pi}{ L},...,~\frac{n\pi}{L}$
Since $\displaystyle \lambda=\alpha^2$, we can say that:
$\displaystyle \lambda=\frac{\pi^2}{L^2},~\frac{4\pi^2}{L^2},~\fr ac{9\pi^2}{L^2},...,~\frac{n^2\pi^2}{L^2}$
We now can see that we have an infinte sequence of eigenvalues defined by:
$\displaystyle \lambda_n=\frac{n^2\pi^2}{L^2}~~~~\left(n\in\mathb b{Z}^+\right)$
The associated eigenfunction is
$\displaystyle X_n=\sin\left(\frac{n\pi}{L}\right),~~~~\left(n\in \mathbb{Z}^+\right)$
-------
***
The homogeneous initial condition
$\displaystyle y_t(x,0)=X(x)T'(0)=0$
Implies that $\displaystyle T'(0)=0$. Thus, the solution $\displaystyle T_n(t)$ that is associated with the eigenvalue $\displaystyle \lambda_n=\frac{n^2\pi^2}{L^2}$ must also satisfy the conditions
$\displaystyle T_n\!''+\frac{n^2\pi^2a^2}{L^2}T_n=0,~~~T_n\!'(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 $\displaystyle T_n\!'(t)$:
$\displaystyle \begin{aligned}T_n\!'(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) \\ &=\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 $\displaystyle T'(0)=0$, we get:
$\displaystyle T_n\!'(0)=\frac{n\pi a}{L}\bigg[-A_n\sin(0)+B_n\cos(0)\bigg]=B_n\frac{n\pi a}{L}=0$
Therefore, $\displaystyle B_n=0$. Thus, $\displaystyle T_n(t)$ can be defined as the non-trivial solution
$\displaystyle T_n(t)=\cos\left(\frac{n\pi a}{L}\right)$
Since $\displaystyle 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 $\displaystyle y_n(x,t)$ as the inifinte series:
$\displaystyle y_n(x,t)=\sum_{n=1}^{\infty}A_n\sin\bigg(\frac{n\p i x}{L}\bigg)\cos\bigg(\frac{n\pi at}{L}\bigg)$
All we need to do now is find $\displaystyle \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 $\displaystyle 0<x<L$. However, this will be the Fourier Sine Series of $\displaystyle 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
$\displaystyle y(x,t)=\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 intial condition
$\displaystyle y(x,0)=X(x)T(0)=0$
implies that $\displaystyle T(0)=0$. Thus, the solution $\displaystyle 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\!''+\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
$\displaystyle T_n=A_n=0$
Thus, $\displaystyle T_n(t)$ can be defined as the non-trivial solution
$\displaystyle T_n(t)=\sin\bigg(\frac{n\pi at}{L}\bigg)$
Since $\displaystyle 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 $\displaystyle y_n(x,t)$ as the inifinte series:
$\displaystyle y_n(x,t)=\sum_{n=1}^{\infty}B_n\sin\bigg(\frac{n\p i x}{L}\bigg)\sin\bigg(\frac{n\pi at}{L}\bigg)$
Find $\displaystyle 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 $\displaystyle \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 $\displaystyle 0<x<L$. However, this will be the Fourier Sine Series of $\displaystyle 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
$\displaystyle \color{red}\boxed{\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}}$

That was a lot of work... 
--Chris