# Wave Equation by separation of variables

I have a simplified version of the wave equation which I need to solve using variable separation. This formulation is destined to represent the propagation of a wave in a thin column subjected to a constant load on the free end and fixed at the bottom end ("standing wave"):

GOVERNING PDE

$$u_{xx} = u_{tt}$$

Since this is not a "book problem" the boundary/initial conditions are a bit fuzzy to me. I am however quite certain of the following:

BOUNDARY CONDITIONS $$u(0,t) = 0$$ $$u_x(L,t) = 1$$ $$u_t(0,t) = 0$$

First arises from fixed end, second from constant load and 3 again from fixed end.

INITIAL CONDITIONS $$u(x,0) = 0$$ $$u_t(x,0) = 0$$

ATTEMPTED SOLUTION

I tried to solve this equation by variable separation but reached a dead end:

The separation of variables assumption states that $u(x,t) = X(x)T(t)$ which breaks the problem down into a set of two ODE's as follows:

$$X''+\omega^2X=0$$ and, $$T''+\omega^2T = 0$$

For which the solutions are $$X(x) = A\sin\omega x+B\cos \omega x$$ and $$T(t) = C \sin\omega t+D\cos \omega t$$

Applying BC (1) yields $B=0$. IC (1) yields $D=0$ then we are left with:

$$AC\omega \cos (\omega L) \sin (\omega t)=1$$ and $$AC \sin (\omega x)=0$$

Which is sort of a dead end... since we cannot solve for constant $AC$. Does anyone know how to approach this specific problem using separation of variables?

EDIT

After following though with @DisintegratingByParts solution, I got the following results:

$$B_n = \frac {-2L}{(n+\frac{1}{2})^2\pi^2} \sin \left(\left(n+\frac{1}{2}\right)\pi \right)$$

Therefore

$$u(x,t) = v(x,t)+x$$ and $$v(x,t) = \sum_{n=0}^{\infty}B_n\sin((n+1/2)\pi x/L)\cos((n+1/2)\pi t/L)$$.

Because

$$u(x,t) = v(x,t)+x$$ and $$v(x,t) = \sum_{n=0}^{\infty}\frac {-2L}{(n+\frac{1}{2})^2\pi^2} \sin ((n+1/2)\pi)\sin((n+1/2)\pi x/L)\cos((n+1/2)\pi t/L)$$,

$$u(x,t) = x+\sum_{n=0}^{\infty}\frac {-2L}{(n+\frac{1}{2})^2\pi^2} \sin ((n+1/2)\pi)\sin((n+1/2)\pi x/L)\cos((n+1/2)\pi t/L)$$

Plotting this for $x=L/2$ and $t$ from $0$ to $5$ against a reference solution yields the following plot Where the red is the reference solution and the blue is the solution proposed by @DisintegrationByParts.

EDIT 2

The reference solution I am using is the following: where $\lambda = \frac {(2n-1)\pi}{2L}$ and $p_0=K=L=c=1$

• There are 4 parameters $A,B,C,D$ to determine. You already have two initial conditions and the boundary condition. You need one more constraint, which you can get by evaluating the original equation. – Hoc Ngo Apr 16 '17 at 12:13
• Don't the Boundary Conditions count as constraints? There are 3 of them... – user32882 Apr 16 '17 at 12:14
• @user32882 Only 2 of them really, as the third is a consequence of the first. – themaker Apr 16 '17 at 12:27
• @user32882 In any case, the separation of variables method should be applied to problem with homogeneous boundary conditions ($u(0,t) = 0$, $u_x(0,t) = 0$ in this case). So you write the solution as the general solution of the homogeneous problem plus a particular solution of the inhomogeneous problem( for this case $u(t,x) = x$ works). – themaker Apr 16 '17 at 12:34
• @user32882 those are homogeneous boundary conditions. – themaker Apr 16 '17 at 13:39

Let $v(x,t)=u(x,t)-x$. Then $v$ satisfies an equivalent problem, $$v_{tt}=v_{xx} \\ v(0,t) = u(0,t)-L0 = 0,\\ v_{x}(L,t)= u_{x}(L,t)-1= 0,\\ v(x,0) = u(x,0)-x = -x.$$ Separating variables with $v(x,t)=X(x)T(t)$ gives $$\frac{T''}{T} = \lambda = \frac{X''}{X}.$$ The solutions in $X$ determine the allowed separation parameters $\lambda$. $\lambda = 0$ is not a valid eigenvalue. For $\lambda \ne 0$, the solutions $X_n$ are constant multiples of $$X_n(x) = \sin(\sqrt{\lambda_n} x),\;\; \lambda_n = (n+1/2)^2\pi^2/L^2.$$ The corresponding solutions $T_n$ are $$T_n(t)=A_n\sin(\sqrt{\lambda_n} t)+B_n\cos(\sqrt{\lambda_n} t)$$ The general solution $v$ is then given by $$v(x,t) = \sum_{n=0}^{\infty}T_n(t)X_n(t),$$ where the constants $A_n$, $B_n$ are determined by the initial data. Because $v_{t}(x,0)=0$, then $A_n=0$ for all $n$. That leaves the $B_n$, which are determine by $$-x = v(x,0) = \sum_{n=0}^{\infty}B_n\sin((n+1/2)\pi x/L)$$ The functions $\sin((n+1/2)\pi x/L)$ are mutually orthogonal on $[0,L]$ with respect to the inner product of $L^2[0,L]$. Hence, multiplying both sides of the above by $\sin((m+1/2)\pi x/L)$ and integrating over $[0,L]$ gives equations for the $B_m$: $$-\int_{0}^{L}x\sin((m+1/2)\pi x/L)dx = B_m\int_{0}^{L}\sin^2((m+1/2)\pi x/L)dx$$ I'll leave these integrals to you. Finally, $u(x,t)=v(x,t)+x$ gives $$u(x,t)=x-\sum_{n=0}^{\infty}\frac{\int_{0}^{L}x\sin((n+1/2)\pi x/L)dx}{\int_{0}^{L}\sin^2((n+1/2)\pi x/L)dx}\sin((n+1/2)\pi x/L)\cos((n+1/2)\pi t/L)$$

• How come the solution to $X'' - \lambda X=0$ is $X_n(x) = \sin(\sqrt{\lambda_n} x),\;\; \lambda_n = (n+1/2)^2\pi^2/L^2$? Is this not a homogeneous ODE with constant coefficients? I am getting a solution of the form $X(x) = C_1 \cos \sqrt \lambda x+C_2 \sin \sqrt \lambda x$ – user32882 Apr 17 '17 at 12:43
• @user32882 : Because $X(0)=0$ and $X'(L)=0$ are the conditions that must be must be matched. $X(0)=0$ makes your $C_1=0$. And $X'(L)=0$ forces the period of the remaining $\sin$ to be at $\pm 1$ when $x=L$. – DisintegratingByParts Apr 17 '17 at 15:37
• Your answer is helpful but incorrect. Please see the results I am getting as an edit to the original question.... – user32882 May 12 '17 at 7:47
• @user32882 : Which condition(s) and or equation is not satisfied by the solution I gave you? These are things you can manually check using the series. – DisintegratingByParts May 12 '17 at 15:30
• I don't believe it is worth checking the boundaries because as I showed above the actual solution itself does not match up. I have added a second edit with the reference I am using (red plot). It looks similar to the solution I came up with but not quite the same. – user32882 May 13 '17 at 6:03

Original equation:

$$u_{xx} = u_{tt}. \quad (1)$$

Assume the wave solution is of the form

$$u(x,t) = Ae^{i(kx-\omega t)} + Be^{-i(kx-\omega t)} . \quad(2)$$

Plug into the original equation:

$$(1)\implies -k^2u(x,t) = -\omega^2 u(x,t)\implies k=\pm \omega. \quad(3)$$

Note that the two solutions for $k$ correspond to forward and backward wave components.

If only initial conditions are specified, the solution can consist of one or two kinds of waves.

If boundary conditions are specified, we need to combine both kinds of waves to get standing waves. In this case, the general solution is of the form:

$$u(x,t) = Ae^{i(kx-\omega t)} + Be^{-i(kx-\omega t)} + Ce^{i(kx+\omega t)} + De^{-i(kx+\omega t)}. \quad (4)$$

a) Imposing boundary conditions on (4):

\begin{align} u(0,t) = 0 \implies (A+D)e^{-i\omega t} + (B+C) e^{i\omega t} &= 0. \quad(5)\\ u_t(0,t) = 0 \implies -i\omega (A+D)e^{-i\omega t} + i\omega (B+C) e^{i\omega t} &= 0 \\ \implies (A+D)e^{-i\omega t} - (B+C) e^{i\omega t} &= 0. \quad (6) \\ \end{align}

b) Imposing initial conditions: \begin{align} u(x,0) = 0\implies (A+C)e^{ikx} + (B+D)e^{-ikx} &= 0. \quad(7)\\ u_t(x,0) = 0\implies -i\omega (A-C)e^{ikx} + i\omega(B-D) Be^{-ikx} &= 0 \\ \implies (A-C)e^{ikx} - (B-D)e^{-ikx} &= 0. \quad(8) \end{align}

Thus, the first and third boundary conditions and the two initial conditions are sufficient to determine the solutions for $A,B,C,D$.

Note that we haven't used the boundary condition at $x=L$ yet:

\begin{align} u_x(L,t) = 1\implies ikAe^{i(kL-\omega t)} -ik B e^{-i(kL-\omega t)} + ikCe^{i(kL+\omega t)} -ik D e^{-i(kL+\omega t)} &= 1\\ \implies Ae^{i(kL-\omega t)} - B e^{-i(kL-\omega t)} + Ce^{i(kL-\omega t)} - D e^{-i(kL-\omega t)} &= -i/k. \quad(9) \end{align}

Thus, the five equations $(5)$ through $(9)$ can be solved for $A, B, C, D$ and $k$. Once $k$ is obtained, we can replace it with $\omega$ because from $(3)$, we have $k=\omega$. Note that we don't need to use $k=-\omega$ because we already used it to include both forward and backward waves in the general solution (4).

Without proof, we just want to point out the physics as follows.

• If the boundary condition at $x=L$ is specified, the waves are constrained at the two endpoints $x=0$ and $x=L$. Hence, only certain wavelengths are possible. For example, if the solutions are standing waves between the two boundaries, then $\lambda_n = L/n$ for certain values of $n \in\mathbb{N}$. That's why the RHS of $(9)$ contains $k$.

• If the boundary condition at $x=L$ is not specified, the waves are constrained only at $x=0$. Thus, all wavelengths are possible and the temporal frequency is $\omega = k$.

• how to solve for $k$ or $\omega$? What values to pick? or does it emerge from the solution? – user32882 Apr 16 '17 at 13:51
• @user32882, I hope the final solution answers your questions. My thought was evolving while working on the solutions. At first, I thought the problem was over-constrained. But finally, it makes sense to have 5 constraints as you can see from the solution. – Hoc Ngo Apr 16 '17 at 22:53