SetDirectory[$HomeDirectory<>"/Documents/handouts/math467/SolvingParabolicPDEs"]

Graphics[{EdgeForm[],FaceForm[LightGray],Rectangle[{-5,0},{5,2}],Black,Line[{{-5,0},{5,0}}],Line[{{-5,2},{5,2}}],PointSize[Large],Point[{3,3/2}],Text["\!\(\*TemplateBox[<|"boxes" -> FormBox[
RowBox[{"(", 
RowBox[{
StyleBox["x", "TI"], ",", 
StyleBox["t", "TI"]}], ")"}], TraditionalForm], "errors" -> {}, "input" -> "(x, t)", "state" -> "Boxes"|>,"TeXAssistantTemplate"]\)",{3,3/2},{0,2}],Text["\!\(\*TemplateBox[<|"boxes" -> FormBox[
RowBox[{"∂", 
StyleBox["R", "TI"]}], TraditionalForm], "errors" -> {}, "input" -> "\\partial R", "state" -> "Boxes"|>,"TeXAssistantTemplate"]\)",{-3,2},{0,-2}],Text["\!\(\*TemplateBox[<|"boxes" -> FormBox[
RowBox[{"∂", 
StyleBox["R", "TI"]}], TraditionalForm], "errors" -> {}, "input" -> "\\partial R", "state" -> "Boxes"|>,"TeXAssistantTemplate"]\)",{-3,0},{0,2}],Text["\!\(\*TemplateBox[<|"boxes" -> FormBox[
StyleBox["R", "TI"], TraditionalForm], "errors" -> {}, "input" -> "R", "state" -> "Boxes"|>,"TeXAssistantTemplate"]\)",{-3,1}],Arrow[{{2,2},{2,3}}],Arrow[{{2,0},{2,-1}}],Text["\!\(\*TemplateBox[<|"boxes" -> FormBox[
RowBox[{
StyleBox["N", FontSlant -> "Bold"], "==", 
StyleBox["j", FontSlant -> "Bold"]}], TraditionalForm], "errors" -> {}, "input" -> "\\mathbf{N}=\\mathbf{j}", "state" -> "Boxes"|>,"TeXAssistantTemplate"]\)",{3,2},{0,-2}],Text["\!\(\*TemplateBox[<|"boxes" -> FormBox[
RowBox[{
StyleBox["N", FontSlant -> "Bold"], "==", "-", 
StyleBox["j", FontSlant -> "Bold"]}], TraditionalForm], "errors" -> {}, "input" -> "\\mathbf{N}=-\\mathbf{j}", "state" -> "Boxes"|>,"TeXAssistantTemplate"]\)",{3,0},{0,2}]},Axes->Automatic,AxesLabel->{"\!\(\*TemplateBox[<|"boxes" -> FormBox["ξ", TraditionalForm], "errors" -> {}, "input" -> "\\xi", "state" -> "Boxes"|>,"TeXAssistantTemplate"]\)","\!\(\*TemplateBox[<|"boxes" -> FormBox["τ", TraditionalForm], "errors" -> {}, "input" -> "\\tau", "state" -> "Boxes"|>,"TeXAssistantTemplate"]\)"},Ticks->None,BaseStyle->FontSize->12]

Export["unboundedheatdomain.pdf",%,"PDF"]

Export["unboundedheatdomain.eps",%%,"EPS"]

Example

U[x_,t_,ξ_,τ_]:=(((E^(-((((x-ξ))^2)/(4 κ (t-τ))))) HeavisideTheta[t-τ])/(2 (Sqrt[π]) (Sqrt[κ (t-τ)])))

gf[x_,t_,ξ_,τ_]:=U[x,t,ξ,τ]-U[-x,t,ξ,τ]

h[t_]:=Exp[-t]

q[x_,t_]:=1+Sin[x t]

f[x_]:=((Cos[x])^2)

κ=1

u[x_,t_]:=NIntegrate[κ h[τ]Derivative[0,0,1,0][gf][x,t,0,τ],{τ,0,t}]+NIntegrate[f[ξ]gf[x,t,ξ,0],{ξ,0,Infinity}]+NIntegrate[q[ξ,τ]gf[x,t,ξ,τ],{τ,0,t},{ξ,0,Infinity}]

ContourPlot[u[x,t],{x,0,3π},{t,0,π+0.1},FrameLabel->{, },BaseStyle->FontSize->12,Contours->Range[0.5,3.5,0.5],FrameTicks->{{Table[k π/4,{k,0,4,1}],None},{Table[k π/2,{k,0,6,1}],None}},AspectRatio->1/3,Epilog->{Map[Text[#,{π,t/.Quiet[FindRoot[u[π,t]==#,{t,0.75}]]},Background->White]&,{1,2,3}],Map[Text[#,{2π,t/.Quiet[FindRoot[u[2π,t]==#,{t,0.75}]]},Background->White]&,{0.5,1.5,2.5,3.5}]}]

Export["semiinfiniteheat.pdf",%,"PDF"]

Export["semiinfiniteheat.eps",%%,"EPS"]