CSM-521 - Lab1
CSM-521 - Lab1
1. Write a computer program in C/MATLAB that uses the explicit and Crank
Nicolson method to approximate the solution of heat equation
𝒖𝒕 = 𝒖𝒙𝒙 𝟎 < 𝒙 < 𝟏, 𝒕 > 𝟎
𝒖(𝒙, 𝟎) = 𝟏𝟎𝟎𝐬𝐢𝐧𝝅𝒙 𝟎<𝒙<𝟏
𝒖(𝟎, 𝒕) = 𝒖(𝟏, 𝒕) = 𝟎 𝒕 > 𝟎.
At t = 0.5, compare the numerical results with those from the exact solution
𝟐
𝒖 = 𝟏𝟎𝟎 𝒆−𝝅 𝒕 𝐬𝐢𝐧𝝅𝒙
No. of x subintervals = 10, time step = 0.005.