wave equation

logistic_guy

Senior Member
Joined
Apr 17, 2024
Messages
2,214
\(\displaystyle \textcolor{indigo}{\bold{Solve.}}\)

\(\displaystyle a^2\frac{\partial^2 u}{\partial x^2} = \frac{\partial^2 u}{\partial t^2}, \ \ \ \ \ 0 < x < L, \ \ \ \ \ t > 0\)


\(\displaystyle u(0,t) = u(L,t) = 0, \ \ \ \ \ t > 0\)


\(\displaystyle u(x,0) = \frac{1}{4}x(L - x), \ \ \ \ \ 0 < x < L\)


\(\displaystyle \frac{\partial u}{\partial t}\bigg|_{t=0} = 0, \ \ \ \ \ 0 < x < L\)
 
💙💚

\(\displaystyle u(x,t) = X(x) \ T(t)\)

Then,

\(\displaystyle a^2T\frac{\partial^2 X}{\partial x^2} = X\frac{\partial^2 T}{\partial t^2}\)


\(\displaystyle \frac{1}{X}\frac{\partial^2 X}{\partial x^2} = \frac{1}{a^2T}\frac{\partial^2 T}{\partial t^2}\)
 
We continue.

\(\displaystyle \frac{1}{X}\frac{\partial^2 X}{\partial x^2} = \frac{1}{a^2T}\frac{\partial^2 T}{\partial t^2} = -\lambda\)

This gives us two ordinary differential equations. But I will keep the notation partial.

\(\displaystyle \frac{\partial^2 X}{\partial x^2} + \lambda X = 0\)


\(\displaystyle \frac{\partial^2 T}{\partial t^2} + \lambda a^2T = 0\)


Nowadays, even the children in the kindergarten know how to solve these ordinary differential equations. Therefore, I would not be surprised if a Chinese infant solved them!
 
Now we focus on solving the first differential equation.

\(\displaystyle \frac{\partial^2 X}{\partial x^2} + \lambda X = 0\)

\(\displaystyle X(0) = 0\)
\(\displaystyle X(L) = 0\)

We have three cases:

\(\displaystyle \lambda = 0\)
\(\displaystyle \lambda > 0\)
\(\displaystyle \lambda < 0\)

Let us start with the first case.

Let \(\displaystyle \lambda = 0\), then we have:

\(\displaystyle \frac{\partial^2 X}{\partial x^2}= 0\)

\(\displaystyle X(0) = 0\)
\(\displaystyle X(L) = 0\)

The general solution to this differential equation is:

\(\displaystyle X(x) = c_1x + c_2\)

Apply the first boundary condition.

\(\displaystyle 0 = c_1(0) + c_2\)

This gives:

\(\displaystyle c_2 = 0\), then we have:

\(\displaystyle X(x) = c_1x\)

Apply the secod boundary condition.

\(\displaystyle 0 = c_1L\)

This gives:

\(\displaystyle c_1 = 0\)

Therefore, the first case gives only the trivial solution.

\(\displaystyle X(x) = 0\)
 
Now we test the next case.

Let \(\displaystyle \lambda = \alpha^2 > 0\).

Then, we have:

\(\displaystyle \frac{\partial^2 X}{\partial x^2} + \alpha^2 X = 0\)

\(\displaystyle X(0) = 0\)
\(\displaystyle X(L) = 0\)

I am \(\displaystyle 100\%\) positive you know that the solution to this differential equation is:

\(\displaystyle X(x) = c_1\cos \alpha x + c_2\sin \alpha x\)

Apply the first boundary condition.

\(\displaystyle 0 = c_1\)

Then, we have:

\(\displaystyle X(x) = c_2\sin \alpha x\)

Apply the second boundary condition.

\(\displaystyle 0 = c_2\sin \alpha L\)

If we want to have a non-trivial solution, then \(\displaystyle c_2 \neq 0\).

This gives:

\(\displaystyle \sin \alpha L = 0\)

Or

\(\displaystyle \alpha L = \pi,2\pi,3\pi,\cdots\)

Or

\(\displaystyle \alpha L = n\pi, \ \ \ \ \ n = 1,2,3,\cdots\)

Or

\(\displaystyle \alpha = \frac{n\pi}{L}, \ \ \ \ \ \ n = 1,2,3,\cdots\)

Then, we have the solution:

\(\displaystyle X(x) = c_2\sin \frac{n\pi}{L} x\)
 
Let us check if there is a solution to the last case.

Let \(\displaystyle \lambda = -\alpha^2 < 0\)

Then,

\(\displaystyle \frac{\partial^2 X}{\partial x^2} - \alpha^2 X = 0\)

\(\displaystyle X(0) = 0\)
\(\displaystyle X(L) = 0\)

I'm very certain that everyone knows how to solve this differential equation. The solution is:

\(\displaystyle X(x) = c_3\cosh \alpha x + c_4\sinh \alpha x\)

Apply the first boundary condition.

\(\displaystyle 0 = c_3\)

Then, we have:

\(\displaystyle X(x) = c_4\sinh \alpha x\)

Apply the second boundary condition.

\(\displaystyle 0 = c_4\sinh \alpha L\)

Since \(\displaystyle \alpha L \neq 0\), then \(\displaystyle \sinh \alpha L \neq 0\).

This gives us:

\(\displaystyle c_4 = 0\), and we have the trivial solution:

\(\displaystyle X(x) = 0\)
 
So, there is a solution only for \(\displaystyle \lambda > 0\) which makes sense since it is a Dirichlet problem.

The general solution so far is:

\(\displaystyle u(x,t) = \sum_{n=1}^{\infty}\left(A_n\cos a\alpha_n t + B_n\sin a\alpha_n t\right)\sin \alpha_n x\)

Since the solution to the time equation is:

\(\displaystyle T(t) = c_3\cos a\alpha t + c_4\sin a\alpha t\)
 
Apply the first initial condition.

\(\displaystyle u(x,0) = \sum_{n=1}^{\infty}\left(A_n\right)\sin \alpha_n x\)


\(\displaystyle \frac{1}{4}x(L - x) = \sum_{n=1}^{\infty}A_n\sin \alpha_n x\)


\(\displaystyle \frac{1}{4}x(L - x)\sin \alpha_m x = \sum_{n=1}^{\infty}A_n \sin \alpha_n x \sin \alpha_m x\)


\(\displaystyle \int_{0}^{L}\frac{1}{4}x(L - x)\sin \alpha_m x \ dx = \sum_{n=1}^{\infty}A_n \int_{0}^{L}\sin \alpha_n x \sin \alpha_m x \ dx\)


\(\displaystyle \frac{1}{4}\int_{0}^{L}x(L - x)\sin \alpha_m x \ dx = A_m \int_{0}^{L}\sin \alpha_m x \sin \alpha_m x \ dx\)


\(\displaystyle A_m = \frac{\frac{1}{4}\int_{0}^{L}x(L - x)\sin \alpha_m x \ dx}{\int_{0}^{L}\sin^2 \alpha_m x \ dx}\)
 
Apply the second initial condition.

\(\displaystyle u_t(x,0) = \sum_{n=1}^{\infty} a\alpha_nB_n \ \sin \alpha_n x\)

\(\displaystyle 0 = \sum_{n=1}^{\infty} a\alpha_nB_n \ \sin \alpha_n x\)

This gives:

\(\displaystyle B_n = 0\)

Then, the general solution to the partial differential equation is:

\(\displaystyle u(x,t) = \sum_{n=1}^{\infty} A_n\cos a\alpha_n t \ \sin \alpha_n x\)

where

\(\displaystyle \alpha_n = \frac{n\pi}{L}\)

And

\(\displaystyle A_n = \frac{\frac{1}{4}\int_{0}^{L}x(L - x)\sin \alpha_n x \ dx}{\int_{0}^{L}\sin^2 \alpha_n x \ dx}\)
 
\(\displaystyle A_n = \frac{\frac{1}{4}\int_{0}^{L}x(L - x)\sin \alpha_n x \ dx}{\int_{0}^{L}\sin^2 \alpha_n x \ dx}\)
Let us try to solve:

\(\displaystyle \int_{0}^{L}\sin^2 \alpha_n x \ dx = \frac{1}{2}\int_{0}^{L}1 - \cos 2\alpha_n x \ dx\)


\(\displaystyle = \frac{1}{2}\bigg(x - \frac{\sin 2\alpha_n x}{2\alpha_n}\bigg)\bigg|_{0}^{L} = \frac{1}{2}\bigg(L - \frac{\sin 2\alpha_n L}{2\alpha_n}\bigg)\)

We know that:

\(\displaystyle \alpha_n = \frac{n\pi}{L}\)

Then,

\(\displaystyle \frac{1}{2}\bigg(L - \frac{\sin 2\alpha_n L}{2\alpha_n}\bigg) = \frac{1}{2}\bigg(L - \frac{L\sin 2n\pi}{2n\pi}\bigg) = \frac{L}{2}\)

This gives:

\(\displaystyle A_n = \frac{\int_{0}^{L}x(L - x)\sin \alpha_n x \ dx}{2L}\)
 
\(\displaystyle A_n = \frac{\int_{0}^{L}x(L - x)\sin \alpha_n x \ dx}{2L}\)
Let us try to solve:

\(\displaystyle \int_{0}^{L}x(L - x)\sin \alpha_n x \ dx = -\frac{L{\alpha}_{n} \sin\left(L{\alpha}_{n}\right) + 2 \cos\left(L{\alpha}_{n}\right) - 2}{{\alpha}_{n}^{3}}\)


\(\displaystyle = \frac{2 - 2 \cos(n\pi)}{\frac{n^3\pi^3}{L^3}} = \frac{2L^3\bigg[1 - \cos(n\pi)\bigg]}{n^3\pi^3}\)

Then,

\(\displaystyle A_n = \frac{\int_{0}^{L}x(L - x)\sin \alpha_n x \ dx}{2L} = \frac{2L^3\bigg[1 - \cos(n\pi)\bigg]}{2Ln^3\pi^3}\)

Or

\(\displaystyle A_n = \frac{L^2\bigg[1 - \cos(n\pi)\bigg]}{n^3\pi^3} = \frac{L^2\bigg[1 - (-1)^n\bigg]}{n^3\pi^3}\)

Then, the general solution in a more organized form is:

\(\displaystyle u(x,t) = \textcolor{blue}{\frac{L^2}{\pi^3}\sum_{n=1}^{\infty} \frac{1 - (-1)^n}{n^3}\cos \frac{an\pi}{L} t \ \sin \frac{n\pi}{L} x}\)
 
Top