Solution to Boring PDE #1

The general solution to (Subscript[u, t])=x is given by u(t,x)=xt+f(x).

f[x_]:=Exp[-x^2];
u[t_,x_]:=x*t+f[x];

I am now going to plot the solution at different times for different values of t:

Plot[{u[0,x],u[1,x],u[2,x]},{x,-10,10},PlotStyle->Thick,AxesLabel->{"x","u(t,x)"},LabelStyle->Directive[Black, Large],PlotRange->{-5,4}]

We can also illustrate the behavior using a contour plot which is also called a density plot

f[x_]:=Sin[x];
DensityPlot[u[t,x],{x,-3,3},{t,0,1},ColorFunction->"TemperatureMap",PlotLegends->Automatic]

f[x_]:=Exp[-x^2];
Animate[Plot[u[t,x],{x,-3,3},PlotRange->{-4,4},PlotStyle->Thick,AxesLabel->{"x","u(t,x)"},LabelStyle->Directive[Black, Large]],{t,0,5},AnimationRunning->False]

Solution to Boring PDE #2

f[x_]:=Exp[-x^2];
u[t_,x_]:=f[x]/(f[x]*t+1);

I am now going to plot the solution at different times for different values of t:

Plot[{u[0,x],u[1,x],u[2,x]},{x,-10,10},PlotStyle->Thick,AxesLabel->{"x","u(t,x)"},LabelStyle->Directive[Black, Large],PlotRange->{-1,1}]

We can also illustrate the behavior using a contour plot which is also called a density plot

f[x_]:=Sin[x];
DensityPlot[u[t,x],{x,-3,3},{t,0,1},ColorFunction->"TemperatureMap",PlotLegends->Automatic]

f[x_]:=Sin[10*x];
Animate[Plot[u[t,x],{x,-3,3},PlotRange->{-4,4},PlotStyle->Thick,AxesLabel->{"x","u(t,x)"},LabelStyle->Directive[Black, Large]],{t,0,5},AnimationRunning->False]