MATH529 L16
Fourier transform solution of PDEs

Fourier transforms of common functions

Clear["Global`*"];
ℱ[u_,x_,α_]:=FourierTransform[u,x,α];
ℱinv[u_,α_,x_]:=InverseFourierTransform[u,α,x];

Exponential and related functions

ℱ[Exp[a x],x,α]

ℱ[Sin[a x],x,α]

ℱ[Cos[a x],x,α]

Normal (Gaussian)  distribution

f[x_,σ_]=Exp[ -(((x/σ))^2)];F[α_,σ_]= ℱ[f[x,σ],x,α]

Manipulate[Plot[{f[x,σ],F[x,σ]},{x,-5,5},PlotRange->All,Frame->True,FrameLabel->{"x,α","f,F"},PlotLabel->"Fourier transform of centered normal distribution",PlotLegends->{"f","F"},GridLines->Automatic],{{σ,1},0.1,10}]

ℱ[1,x,α]

(Sqrt[2 π]) DiracDelta[α],{{σ,1},0.1,10}]

Error functions

f[x_]=Erf[x];F[α_]= ℱ[f[x],x,α]

Plot[{f[x],Im[F[x]]},{x,0.1,5},PlotRange->All,Frame->True,FrameLabel->{"x,α","f,F"},PlotLabel->"Fourier transform of error function",PlotLegends->{"f","F"},GridLines->Automatic]

ℱ[1,x,α]

ℱ[Erf[x],x,α]

Monomials

f[x_,n_]=(x^n);F[α_,n_]= ℱ[f[x,n],x,α]

Table[F[α,n],{n,0,3}]

Table[F[α,n],{n,-1,-3,-1}]

U[x,s] /. sol /. BCsol

Example: Heat equation

Solve (Subscript[u, t ])= k (Subscript[u, x x]) in -∞<x<∞, t>0, u(x,0)=1(Subscript[u, 0]) for |x|<1, 0 otherwise .

Fourier transform of PDE

Define the PDE, and notation for Fourier transform of u

Clear["Global`*"];
ℱ[u_,x_,α_]:=FourierTransform[u,x,α];
ℱinv[u_,α_,x_]:=InverseFourierTransform[u,α,x];

Plot[HeavisidePi[x/2],{x,-2,2}]

Define problem

Define PDE

PDE = (∂_t)u[x,t] == (a^2) (∂_(x,x))u[x,t];
ApplySides[ℱ[#,x,α]&,PDE]

(Subscript[u, 0])

Introduce notation for Fourier transforms

ℱu = {ℱ[u[x,t],x,α] -> U[α,t],ℱ[Derivative[0,1][u][x,t],x,α] -> Derivative[0,1][U][α,t]};
ODE = ApplySides[ℱ[#,x,α]&,PDE] /. ℱu

Fourier transform of initial condition

h[x_,a_]=HeavisidePi[a x]; H[α_,a_]=ℱ[h[x,a],x,α]

Manipulate[Plot[{h[x,a],H[x,a]},{x,-10,10},PlotRange->All,Frame->True,FrameLabel->{"x,α","f,F"},PlotLabel->"Fourier transform of unit step function",PlotLegends->{"f","F"},GridLines->Automatic,PlotPoints->1000],{{a,0.5},0.1,10}]

U0[α_]=H[α,1/2]

Solve the ODE, apply IC

DSolve[ODE,U[α,t],t][[1,1]]

sol=DSolve[{ODE,U[α,0]==U0[α]},U[α,t],t][[1,1]]

Inverse Fourier transform of the ODE solution

u[x_,t_]=Simplify[ℱinv[U[α,t] /. sol,α,x]]

Simplify[PDE]

Animate[Plot[u[x,t] /. a->1, {x,-π,π},Frame->True,FrameLabel->{"x","u"},GridLines->Automatic,PlotRange->{{-π,π},{-1,1}}],{t,0,1}]