A Recap of Everything

It has been a long time since I last posted an entry, and that is because we have been stuck on the subject of Fourier series for over two weeks.

We are still solving the heat equation and its steady-state counterparts defined on various kinds of regions, such as a rectangle, a disk, an annulus, and even a sphere defined in cylindrical coordinates.

Every single problem eventually boils down to an infinite series solution that has to be either approximated or computed for; the Fourier series that we are currently dealing with are fairly elementary and require simple techniques such as the ratio test to be evaluated.

Here is an example of this (the heat equation): $$\begin{align} \color{blue}{u_t}&\color{blue}{=ku_{xx}},\qquad0<x<L,\qquad t>0,\\ u(0,t)&=u(L,t)=0,\\ u(x,0)&=100. \end{align}$$ Let $u(x,t)=\phi(x)G(t)$. That is, we are assuming that it is separable. Then $$\begin{align} \phi G’=k\phi’’G,\\ \frac{\phi’’}{\phi}=\frac{G’}{kG}=-\lambda,\\ \phi’’=-\lambda\phi,\tag{1}\\ G’=-\lambda kG.\tag{2} \end{align}$$ The ODE $(1)$ has three cases. Let us also apply the boundary conditions to it:

If $\lambda<0$, then $$\begin{align} \phi(x)&=c_1\cosh\sqrt{-\lambda}x+c_2\sinh\sqrt{-\lambda}x,\\ \phi(0)&=c_1=0,\\ \phi(L)&=c_2\sinh\sqrt{-\lambda}L=0\longrightarrow c_2=0. \end{align}$$ If $\lambda=0$, then $$\begin{align} \phi(x)&=c_1x+c_2,\\ \phi(0)&=c_2=0,\\ \phi(L)&=c_1L=0\longrightarrow c_1=0. \end{align}$$ If $\lambda>0$, then $$\begin{align} \phi(x)&=c_1\sin\sqrt\lambda x+c_2\cos\sqrt\lambda x,\\ \phi(0)&=c_2=0,\\ \phi(L)&=c_1\sin\sqrt\lambda L=0\longrightarrow\lambda=\left(\frac{n\pi}L\right)^2,\qquad n\in\mathbb{N}. \end{align}$$ Therefore, $$ \phi_n(x)=B_n\sin\frac{n\pi x}L. $$ The ODE $(2)$ is simply $$ G_n(t)=C_n\exp\left[-k\left(\frac{n\pi}L\right)^2t\right]. $$ As a result, we have that $$ u_n(x,t)=A_n\sin\frac{n\pi x}L\exp\left[-k\left(\frac{n\pi}L\right)^2t\right], $$ which, by the superposition principle, gives us the general solution to the PDE $$ \color{blue}{u(x,t)=\sum_{n=1}^\infty A_n\sin\frac{n\pi x}L\exp\left[-k\left(\frac{n\pi}L\right)^2t\right].}\tag{3} $$ Applying the initial condition to $(3)$ yields $$ u(x,0)=\sum_{n=1}^\infty A_n\sin\frac{n\pi x}L=100, $$ and using the orthogonality of sine to solve for $A_n$ gives us $$ A_n=\frac{200}L\int_0^L\sin\frac{n\pi x}L\,dx=\left\{\begin{array}{ccc}0&n\text{ even},\\\frac{400}{n\pi}&n\text{ odd}.\end{array}\right. $$ Here is the plot of the function while taking $k=1$ and $L=1$:


It is impressive the amount of work and theory required to solve a very simple-looking PDE!

Note: The waviness at the top of the gif in its first frame is due to a poor numerical approximation of the infinite Fourier series.

No comments:

Powered by Blogger.