3

I want to solve the below equation

$\partial_t f(x,t)=D \partial_x^2 f(x,t)$ with initial and boundary conditions:

$f(x,0)=\delta(x-x_0)$

$D\partial_x f(x,t)=0$ at $x=L$ and $x=0$;

Can anyone help me with solving it?

Zhi Ruo
  • 43
  • The solution can be found using separation of variables – Dylan Feb 19 '19 at 18:23
  • Are you sure one really can find a solution in presence of 2 walls? @Dylan I tried to use separation of variables but everything is coupled to everything – Zhi Ruo Feb 19 '19 at 19:17
  • 1
    Yes, you can. Two homogeneous boundary conditions makes it ideal for separation of variables – Dylan Feb 20 '19 at 03:06
  • Just curious, but I would like to know what you tried for separation of variables that led to "everything is coupled to everything"? – Dylan Feb 20 '19 at 08:03

1 Answers1

2

Let $f(x,t) = X(x)T(t)$ then we have (assuming $D\ne 0$)

$$ \frac{T'(t)}{DT(t)} = \frac{X''(x) + \frac{1}{D}X'(x)}{X(x)} = -\lambda $$

where $X(x)$ satisfies the BVP

\begin{cases} X'' + \frac{1}{D}X' + \lambda X = 0 \\ X'(0) + \frac{1}{D}X(0) = 0 \\ X'(L) + \frac{1}{D}X(L) = 0 \end{cases}

The characteristic equation is

$$ r^2 + \frac{1}{D}r + \lambda = \left(r+\frac{1}{2D}\right)^2 + \left(\lambda - \frac{1}{4D^2}\right) = 0 $$

Let $\lambda - \frac{1}{4D^2} = \mu^2$, then the solution is

$$ X(x) = e^{-x/2D}\left[A\cos(\mu x) + B\sin(\mu x) \right] $$

Matching up the boundary conditions gives $A=-2D\mu B$ and $\sin(\mu L) = 0$, so we have

$$ X_n(x) = e^{-x/2D}\left[\frac{n\pi}{L} \cos\left(\frac{n\pi}{L}x\right) - \frac{1}{2D}\sin\left(\frac{n\pi}{L}x\right) \right] $$

Along with

$$ T_n(t) = \exp\left(-\left(\frac{n^2\pi^2}{L^2}+\frac{1}{4D^2}\right)Dt\right) $$

Leading to the series solution $u(x,t) = \sum\limits_{n=1}^\infty c_n X_n(x)T_n(t)$. The initial condition requires

$$ u(x,0) = \sum_{n=1}^\infty c_nX_n(x) = \delta(x-x_0) $$

where the constants $c_n$ are given by orthogonality


Edit 3/1: Proof for orthogonality

Here I will show that the eigenfunctions in $X(x)$ are orthogonal with respect to a weighting function. Note that the boundary conditions are equivalent to

$$ X' + \frac{1}{D}X = 0 \implies (e^{x/D}X)' = 0, \quad x = \{0,L\} $$

Let $Y(x) = e^{x/D}X(x)$, then the BVP is reduced to

$$ Y_n'' - \frac{1}{D}Y_n' = -\lambda Y_n, \quad Y_n'(0) = Y_n'(L) = 0$$

or

$$ (e^{-x/D}Y_n')' = -\lambda e^{-x/D}Y_n $$

Following the method similar to this answer we can show that

$$ \int_0^L (e^{-x/D}Y_n')'Y_m dx - \int_0^L (e^{-x/D}Y_m')'Y_n dx = 0 $$

$$ \implies \int_0^L e^{-x/D}Y_nY_m dx = 0 $$

$$ \implies \int_0^L e^{x/D}X_nX_m dx = 0 $$

Now we solve for the constants by

\begin{align} \int_0^L e^{x/D}\delta(x-x_0) X_m(x)\ dx &= \sum_{n=1}^\infty c_n \int_0^L e^{x/D} X_n(x)X_m(x)dx \\ \implies e^{x_0/D}X_m(x_0) &= c_m \int_0^L e^{x/D}X_m^2(x) dx \end{align}

Plugging in the expression for $X(x)$ gives

$$ c_m = \frac{\displaystyle e^{-x_0/D}\left[\frac{m\pi}{L} \cos\left(\frac{m\pi}{L}x_0\right) - \frac{1}{2D}\sin\left(\frac{m\pi}{L}x_0\right) \right]}{\displaystyle \int_0^L \left[\frac{m\pi}{L} \cos\left(\frac{m\pi}{L}x\right) - \frac{1}{2D}\sin\left(\frac{m\pi}{L}x\right) \right]^2dx} $$

Dylan
  • 16,575
  • Comments are not for extended discussion; this conversation has been moved to chat. – quid Feb 23 '19 at 15:24
  • Apparently, they are not orthogonal and you need to delete your answer. If you couldn't prove it, your last step is completely wrong. Your answer just makes people feel this question has a solution as you have written. – Zhi Ruo Feb 23 '19 at 22:08
  • You shouldn't do that. People need to know that the answer is not correct @quid – Zhi Ruo Feb 23 '19 at 22:10
  • @ZhiRuo people should not have to wade through 20+ comments. By now there is an edit, which indicates there is an issue, which is preferable to finding it after numerous comments that got oboslete. . – quid Feb 23 '19 at 23:16
  • The edit doesn't solve the problem since the wrong method have been used here and the edit doesn't make it clear @quid – Zhi Ruo Feb 24 '19 at 09:42
  • @ZhiRuo it indicates that there is an issue, if you think that something specific needs to be pointed out write it up in one to-the-point comment and don't inflate the comment thread via discussing about the merits of removing obsolete comments here. . – quid Feb 24 '19 at 12:04
  • Hi @ZhiRuo, I've added to my answer with a proof for orthogonality. It wasn't straightforward due to the boundary conditions, but the eigenfunctions are orthogonal with a weighting function $e^{x/D}$ – Dylan Mar 01 '19 at 15:34
  • Yes, the integrals are solvable, I just can't be bothered to to them... – Dylan Mar 01 '19 at 15:48
  • Hi, I am wondering why you considered $\lambda-\frac{1}{4 D^2}$ to be positive in your solution? @Dylan – Zhi Ruo Apr 28 '19 at 10:45
  • @ZhiRuo It needs to be positive for a non-trivial solution to exist. – Dylan Apr 29 '19 at 04:31