B4 - discretising heat equation PDEs

lax equivalence theorem

a consistent finite difference method applied to a well-posed linear initial value problem is convergent if and only if it is stable

∂y∂t=α∂2y∂x2→ykj+1−ykjΔt=αyk+1j+yk−1j−2ykj(Δx)2ykj+1=ykj+αΔt(Δx)2[yk+1j+yk−1j−2ykj] ykj=∑m=0M−1exp⁡(i2πΔxLmk)y¯mj

where, y¯mj are fourier amplitudes of each mode, m

ykj=exp⁡(imq0k)y¯mj

where, q0=2πΔxL

exp⁡(imq0k)y¯mj+1=exp⁡(imq0k)y¯mj+αΔt(Δx)2[exp⁡(imq0(k+1))y¯mj+1+exp⁡(imq0(k−1))y¯mj−2exp⁡(imq0k)y¯mj]y¯mj+1=y¯mj[1+αΔt(Δx)2(eimq0+e−imq0−2)]=y¯mj[1+2αΔt(Δx)2(cos⁡(mq0)−1)] g=1+2αΔt(Δx)2[cos⁡(mq0)−1]=1−4αΔt(Δx)2sin2⁡(mq02) m=L2Δx ykj=exp⁡(imq0k)y¯mj=iπkyk+1j=exp⁡[im(k+1)q0]y¯mj=exp⁡[iπ(k+1)]