Question: Consider following elliptic boundary value problem: u = 2 pi 2 sin ( pi x ) cos ( pi y ) ,

Consider following elliptic boundary value problem:
u =2\pi 2 sin(\pi x) cos(\pi y),(x, y) in (0,1)2,
subject to the boundary condition
u(x,0)= sin(\pi x), u(x,1)= sin(\pi x), x in [0,1],
u(0,y)= u(1,y)=0, y in [0,1].
Implement a second order finite difference scheme for this problem on the (N +1)\times (N +1) uniform grid (same as described in [T4.]). Compare your numerical solution with the exact solution u(x, y)= sin(\pi x) cos(\pi y). Try a few different meshes N =20,40,80,160 and compute the corresponding errors in discrete L1, L\infty , L2 and H1 norms. Plot all these errors in the same figure vs h =1/(N +1) using loglog scale and verify the second order accuracy. (You may use a direct method or iterative method to solve the resulting linear system.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!