8
$\begingroup$

I have a PDE in the form of $ \frac{\partial u}{\partial t} + \frac{\partial u}{\partial x} + u = \delta(x-1), $ with initial condition $u(x,0)=100$. I'm trying to solve it numerically, but I have no idea on which method should I use. Most of the examples that I refer to has no delta function in the PDE.

Can anyone guide me on what should I do?

Thank you very much.

  • 0
    @doraemonpaul Is exaclty the same thing. See [my answer](http://math.stackexchange.com/a/251807/19532) for details.2012-12-06

2 Answers 2

6

You can restate the problem by integrating the equation in $x \in (1-\epsilon,1+\epsilon)$ and taking $\epsilon \to 0$.

$ \int_{1-\epsilon}^{1+\epsilon} \left(\frac{\partial u}{\partial t} + \frac{\partial u}{\partial x} + u\right) dx = \int_{1-\epsilon}^{1+\epsilon} \delta(1-x)dx = 1. $

Now we have to make the assumption that we can exchange the temporal derivative with the integral, and then $ \frac{\partial}{\partial t} \left(\int_{1-\epsilon}^{1+\epsilon} u dx \right) + \int_{1-\epsilon}^{1+\epsilon}\frac{\partial u}{\partial x} dx + \int_{1-\epsilon}^{1+\epsilon} u dx = 1 $ Taking the limit as $\epsilon \to 0$ and assuming it can be exchanged with the time differentiation (and $u$ is integrable I think, I'm not so fresh on my analysis courses) we have that $ \lim_{\epsilon \to 0} \big[u(1+\epsilon, t) - u(1-\epsilon,t)\big] = 1 $ or, in other words, that the jump of the function $u$ at the point $x = 1$ is of magnitude $1$.

Finally, solve for $0 < x < 1$, $1 < x < 1000$ and glue the solutions using the jump condition.

Analytic solution

For $0 < x < 1$ you have that $ \frac{\partial u}{\partial t} + \frac{\partial u}{\partial x} + u = 0 $ with initial conditions $u(x,0) = 100$.

Using the method of characteristics you have the equivalent system \begin{align} \frac{d x}{d \eta} &= 1 &x(\xi)\big|_{\eta = 0} &= \xi\\ \frac{d t}{d \eta} &= 1 &t(\xi)\big|_{\eta = 0} &= 0\\ \frac{d u}{d \eta} &= -u &u(\xi)\big|_{\eta = 0} &= 100 \end{align} wich can easily be solved, leading to \begin{align} x(\xi, \eta) &= \eta + \xi \\ t(\xi,\eta) &= \eta \\ u(\xi,\eta) &= 100e^{-\eta} \end{align} and then we can invert for $(\xi,\eta)$ , leading to the solution $u(x,t) = 100e^{-t}$. On $x=1$, $u(1,t) = 100e^{-t}$, the jump condition states that $ u(1^+,t) = 1 + 100e^{-t} $ and then,

For $1 < x < 1000$ the problem is $ \frac{\partial u}{\partial t} + \frac{\partial u}{\partial x} + u = 0 $ with $u(x,0) = 100$, and $u(1,t) = 1 + 100e^{-t}$. Clearly, there is an inconsistency in $t=0$, $x=1$, derived from $\delta(x-1)$, and the solution is not well defined there. Given that the PDE is a transport equation, the problem will propagate along the characteristic $t = x - 1$, as we will see next.

Case $t < x - 1$.

In this case, the method of characteristics leads to the system \begin{align} \frac{d x}{d \eta} &= 1 &x(\xi)\big|_{\eta = 0} &= \xi\\ \frac{d t}{d \eta} &= 1 &t(\xi)\big|_{\eta = 0} &= \eta\\ \frac{d u}{d \eta} &= -u &u(\xi)\big|_{\eta = 0} &= 100 \end{align} and, as before, the solution is $u(x,t) = 100 e^{-t}$.

Case $x - 1 < t$.

In this case, the method of characteristics leads to the system \begin{align} \frac{d x}{d \xi} &= 1 &x(\eta)\big|_{\xi = 0} &= 1\\ \frac{d t}{d \xi} &= 1 &t(\eta)\big|_{\xi = 0} &= \eta\\ \frac{d u}{d \xi} &= -u &u(\eta)\big|_{\xi = 0} &= 1 + 100e^{-\eta} \end{align} hence \begin{align} x(\xi, \eta) &= \xi + 1 \\ t(\xi,\eta) &= \xi + \eta \\ u(\xi,\eta) &= \left(1 + 100e^{-\eta}\right)e^{-\xi} \end{align} then $\xi = x - 1$, $\eta = t - x +1$ and $ u(x,t) = e^{1-x} + 100e^{-t} $

It helps to draw a $(x,t)$ diagram to see exactly whats going on. In the whole upper plane, there's the solution $100 e^{-t}$ that comes from the initial condition. Starting from $x = 1$, there is a new component to the solution, namely $e^{1-x}$. This arises from the discontinuity of the function at $x = 1$, and propagates along the characteristics $t = x - c$, where $c \le 1$. Since the solution has to propagate with velocity $1$, the discontinuity wont be seen until time $t = x-1$, where the delta generated wave will reach the observer. The solution can be written as $ u(x,t) = 100e^{-t} + e^{1-x}\big(H(t - x + 1) - H(x - 1)\big) $

  • 0
    @DarrelWee I've added the complete deduction for the analytic solution. I don't have time to do the numericall algorithm, but the only thing you need to do is, supposing $x_m = 1$, substitute $u_{m+1}$ with $1 - u_m$ in the algorithm.2012-12-10
2

Note that this PDE just belongs to the PDE of the form http://eqworld.ipmnet.ru/en/solutions/fpde/fpde1302.pdf so that exact solution can find easily, so you have not necessarily to solve it numerically.

The general solution is $u(x,t)=e^{-x}C(x-t)+e^{-x}\int\delta(x-1)e^x~dx=e^{-x}C(x-t)+e^{1-x}H(x-1)$

$u(x,0)=100$ :

$e^{-x}C(x)+e^{1-x}H(x-1)=100$

$C(x)=100e^x-eH(x-1)$

$\therefore u(x,t)=e^{-x}(100e^{x-t}-eH(x-t-1))+e^{1-x}H(x-1)=100e^{-t}-e^{1-x}H(x-t-1)+e^{1-x}H(x-1)$

  • 0
    @DarrelWee You are asking a circular question. The only way to solve it numerically is either appropiately approximate the $\delta$ function by a very steep candidate (one that reflect the ill condition numerically), or to use the jump condition derived on my answer in a discreete form, i.e. $u(x_{M+1},t^i) - u(x_M,t^i) = 1$, where $x_M = 1$. Since the jump condition is derived directly from the equation and the solution is the one obtained by doraemonpaul, I don't see how numerics will validate the analytical sol. Is the analytical what validates the numerical and not the other way around.2012-12-06