MATH761 Lesson02: Finite difference calculus

Problem. Study the accuracy and stability of finite difference discretizations of the IBVP for the heat equation

qt=qxxin(0,1),q(t=0,x)=f(x),q(t,0)=0,q(t,1)=0

Approach:

Solution.

By separation of variables:

q(t,x)=n=1Bnsin(nπx)e-(nπ)2tn=1PBnsin(nπx)e-(nπ)2t,Bn=f,bn=201f(x)sin(nπx)dx.

Example. f(x)=sin(πx),P=4,𝑩={1,0,0,0}

q(t,x)=e-π2tsin(πx)

Figure 1. Heat IBVP solution at t={0.,0.1,0.2,0.3,0.4,0.5}.