$$ u_t (x,t) - u_{xx} (x,t) = 0, \quad u(0,t)=0, \quad u_x(2,t)=0, \quad u(x,0)=\delta(x-x_0) $$

where $0<x_0<2$ is a given constant.

I worked out my solution by using separation of variables $$u(x,t)=X(x)T(t) \implies \frac{X''(x)}{X(x)}=\frac{T'(t)}{T(t)}=\lambda$$

For $\lambda>0$ and $\lambda=0$ we get trivial solutions, but for $\lambda=-k^2<0$ we get the solutions

$$ X(x)=c_1 sink_nx, \quad k_n=\frac{\pi}{2}(\frac{1}{2}+n), \quad n=0,1,... $$ $$ T(t)=c_2e^{-k_n^2t} $$

Superposition gives the general solution to the PDE as

$$ \sum_{n=0}^\infty c_n sin(k_nx)e^{-k_n^2t}, \quad k_n=\frac{\pi}{2}(\frac{1}{2}+n)$$

Now for my question, I don't understand how to handle the initial condition to calculate the fourier coefficients $c_n$. I have the solution for it though, and what they have done is this (I understand this step);

$$ u(x,0)=\sum_{n=0}^\infty c_n sin(k_n x) = \delta(x-x_0) \quad (1)$$

This is the step I don't understand;

$$ (1) \implies c_n = \frac{\int_0^2 \delta(x-x_0)sin(k_nx)dx}{\int_0^2 sin^2(k_nx)dx}=sin(k_n x_0) $$

Any explanation as to why and how they got that expression for $c_n$, and also why it equals $sin(k_n x_0)$ (it's like they're discounting the denominator and only looking at the numerator?) would be greatly appreciated.


Starting from your last equation

$$ \sum_n c_n \sin (k_n x) = \delta(x - x_0) $$

Multiply by $\sin (k_m x)$ on both sides and integrate

$$ \sum_n c_n \color{blue}{\int \sin (k_m x) \sin (k_n x)~{\rm d}x} = \int \delta(x - x_0)\sin (k_m x)~{\rm d}x \tag{1} $$

The blue term is zero unless $n = m$, which means

$$ \sum_n c_n \color{blue}{\delta_{nm}\int \sin (k_n x) \sin (k_n x)~{\rm d}x} = c_m\color{blue}{\int \sin^2 (k_m x) ~{\rm d}x} = \int \delta(x - x_0)\sin (k_m x)~{\rm d}x $$

and from here

$$ c_m = \frac{\int \delta(x - x_0)\sin (k_m x)~{\rm d}x}{\int \sin^2 (k_m x) ~{\rm d}x} $$

  • $\begingroup$ Thanks for the help! I will give you the green tick, but if you can share any intuition as to why this procedure is done, that would be great aswell. $\endgroup$ – armara May 19 at 9:38
  • 1
    $\begingroup$ @armara Intuitively speaking, imagine you have a vector ${\bf x}$ which you can represent in an orthonormal basis ${\bf x} = \sum_k a_k {\bf u}_k$, if you want to know the components $a_k$, you just need to project the vector on the elements of the basis, ${\bf x} \cdot {\bf u}_k = a_k$. In your case, the elements of the basis are the functions $\sin(k_n x)$, the inner product $\cdot$ is an integral, and the vector ${\bf x}$ is the distribution $\delta(x - x_0)$. Hope this makes sense. The big difference is that the basis is orthogonal, but not orthonormal, so you end up with the denominator $\endgroup$ – caverac May 19 at 10:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.