Heat equation on a half-line

g[x_,t_]=1/Sqrt[4 Pi t] Exp[-x^2/4/t]

f[x_]=Exp[-x^2]

u[x_,t_]=Integrate[f[y]*(g[x-y,t]-g[x+y,t]),{y,0,Infinity},Assumptions->t>0]

Plot[u[x,0.0001],{x,-3,3}]

Animate[Plot[u[x,t],{x,-3,3},PlotRange->{-1,1}],{t,0.001,1}]

Animate[Plot[u[x,t],{x,0,3},PlotRange->{-1,1}],{t,0.001,1}]

f[x_]=1

u[x_,t_]=Integrate[f[y]*(g[x-y,t]-g[x+y,t]),{y,0,Infinity},Assumptions->t>0]

Plot[u[x,0.0001],{x,-3,3}]

Animate[Plot[u[x,t],{x,0,3},PlotRange->{-1,1}],{t,0.001,1}]

Using ListAnimate with pre-computed frames

f[x_]=1/(1+x^2)

u1[x_,t_]:=NIntegrate[f[y]*(g[x-y,t]-g[x+y,t]),{y,0,Infinity}]

Plot[u1[x,0.0001],{x,0,3}]

Table[k^2,{k,1,4}]

myframes=Table[Plot[u1[x,t],{x,0,3},PlotRange->{0,1}],{t,0.0001,1,0.01}];

ListAnimate[myframes]

Animate[Plot[u[x,t],{x,0,3},PlotRange->{-1,1}],{t,0.001,1}]