From Wikipedia,

However, when I plug the formula of $ u(x,t)$ into Mathematica 12, it doesn’t seem to satisfy the PDE (does not give $ 0$ ):

Here is the code:

`G[x_, t_] := 1/Sqrt[4*Pi*k*t]*Exp[-x^2/(4*k*t)] u[x_, t_] := Integrate[G[x - y, t - s]*f[y, s], {y, -Infinity, Infinity}, {s, 0, t}] FullSimplify[D[u[x, t], t] - k*D[u[x, t], {x, 2}] - f[x, t], Assumptions -> t > 0] `