Rewriting partial differential equation

249 Views Asked by At

I have some trouble rewriting a partial differential equation, more specifically the heat equation in one dimension:

$ \frac{\partial u}{\partial t} = \frac{\partial^2 u}{\partial x^2} + f(x,t)\\ $

with $x \in [0,1]$ and $t\geq0$.

The boundary conditions:

$ u(x,0) = v(x), \space x \in [0,1], \\ u(0,t) = l(t), \space t>0, \\ u(1,t) = r(t), \space t>0. $

The spatial derivative can be replaced by its central difference approximation, and the forward difference approximation is used to replace the time derivative. Denoting the approximation of $u(x_i,t^k)$ as $u_i^k$ and introducing shorthand notation $f^k_i = f(x_i,t^k)$, the following is obtained:

$ \frac{u_i^{k+1}-u_i^k}{\Delta t} = \frac{u^k_{i+1}-2u_i^k+u^k_{i-1}}{\Delta x^2} + f_i^k $

which holds at all internal grid points. This can be rewritten such that the numerical values $u_i^{k+1}$ at time $t^{k+1}$ can be computed independently from the other values at $t^{k+1}$:

$ u_i^{k+1} = u^k_i + \frac{\Delta t}{\Delta x^2}(u^k_{i+1}-2u^k_i+u^k_{i-1}) + \Delta t f^k_i. (Eq. 6.3) $

The numerical solution at the boundaries of the finite difference grid can be defined as: $ u^0_i = v(x_i) $

where $i = 1,2,...,M$ for the inital condition, and likewise for the boundary conditions:

$ u^k_0 = l(t^k), \\ u^k_{M+1} = r(t^k),\\ $

where $k = 1,2,...,K$.

To gain insight into the stability properties of the scheme invoked by above equation we can resort to an analysis that is based upon the Fourier series representation of the solution, which for this case with periodic boundary conditions and $f=0$ is given by:

$ u^k_i=e^{iK x_i-i\omega t^k}, (Eq. 6.4) $

My question now is the following: I don't understand how the author goes from equation (6.3) to (6.4). He mentions the use of the complex Fourier series of $f(t)$ as

$ F(t) = \Sigma^{+\infty}_{n=-\infty}a_ne^{i\omega_nt}, $

but I don't know how he applied it here.

1

There are 1 best solutions below

4
On

Plug equation 6.4 into the pde with $f=0$ and determine which values of $K$ satisfy it (hint: they're complex). Add these solutions (damped waves travelling in opposite directions) in amounts which match the periodic boundary conditions at $x=0$ and $x=1$. Then apply the same principle to the discretised version of the pde and compare the two solutions to assess the accuracy of the numerical solution.