I am trying to put down some code to get numerically the solution of the following PDE: $$ \partial^2_t\phi-\partial^2_x\phi+\lambda\phi^3=\delta(x)\delta(t). $$ Of course, there are several problems already starting with a proper numerical definition of the Dirac deltas and a proper setting of the initial conditions. Last but not least this equation is nonlinear.
My question is this: Is there any library of known numerical recipes for this kind of problems, also for the linear case? I have no prejudice about the code and also well-known packages as Matlab or Mathematica are good for my aims.