# Effectively Dirac delta in numeric PDE - Mathematica or Matlab solution?

I am trying to solve a following Partial Differential Equation:

u_t(x,y,t)= u_xx(x,y,t)+u_yy(x,y,t) + 7 u(x,x,t)


which causes troubles due to the last term u(x,x,t) not being u(x,y,t).

For example Mathematica complains that order of variables is bad, and I did not find anything appropriate to try in matlab.

One of methods to solve this problem is to discretize the equation and to get the time dependent ODE:

x'(t) = A(t) x(t),    (2)


with A(t) the discretization matrix. The matrix A(t) is just a discrete laplacian plus some simple sparse matrix.

So in principle one could solve (2), but this seems inefficient (I know that NDsolve basically does just that but in practise NDSolve is much faster then the method implemented by hand). Is there something obvious that I am missing ?

-
What does u(x,x,t) mean? If you are trying to use a symbolic math program why don't you use u(x,z,t) than substitue z=x into the solution? –  WebMonster Jun 17 '12 at 9:07
u(x,x,y) is u(x,y,t) for y=x, I am afraid that setting x=y in solution is not good enough as this has to be done in the equation The evolution has to be done as follows: assuming we have u(x,y,t) for some t, to get u(x,y,t+dt) we add u_xx(x,y,t) + u_yy(x,y,t) + 7 u(x,y=x,t) (we add value at different point, so our equation is nonlocal, but this should not be a problem when solving it by the method of lines) Symbolic solution will not be available I use Mathematica for numerics –  user1461582 Jun 17 '12 at 15:39
Have you tried replacing the last term by 7 DiracDelta[x - y] u[x,y,t]? –  rcollyer Jun 17 '12 at 18:41
Why don't you post a self-contained example with specific initial and boundary conditions, preferably close to what you need? –  Leonid Shifrin Jun 18 '12 at 18:08
I'm really intrigued by this question, but as it is, is basically unanswerable. I don't believe there's an out of the box scheme to solve the equation (I might be wrong, but the lack of answers lead me to think so), and without initial and boundary conditions, it's hard to think on a numerical scheme to approach the equation. For example, let $u(x,y,t) = f(x,t)$ where $f_t = f_{xx} + 7f$, then $u$ is a solution if $f$ satisfies the initial and boundary conditions. Another thing that bothers me is the use of "delta" in the title, as I don't see it in the equation in the stated form. –  Pragabhava Aug 12 '12 at 4:20