Starting from:

$20

MA322-Lab 8 Solved

1.    Consider following BVP

 

with exact solution

y(x) = 1 + x − cosx − (1 + π/2)sinx.

Use second order scheme to complete following table

h
y(1/2)
f.d. solution at 1/2
error
ratio of error
1/4

1/8

1/16

1/32

1/64
 
 
 
 
Finally plot exact solution and finite difference solution for h = 1/64.

2.    Consider the following BVP

 .

Consider the following finite difference scheme

 .

and U1 = UN = 0, where

 

Compute the local truncation error of the above scheme and show that it is O(h4). Hence show that the scheme is fourth order accurate. Take f(x) = sin(x) so that the exact solution is u(x) = sin(x). Write a computer program to implement the above scheme. Solve the problem for N = 10,20,40,80,160,320 grid points and compute error in maximum norm and discrete L2 norm in each case. Plot the error versus N on a log-log plot and verify the fourth order accuracy in both the norms.

3.    Consider following BVP

 

with h = 1/3. If the exact solution is y(x) = 2ex − x − 1, find the absolute errors at the nodal points using second order finite difference scheme.

4.    

 
 
 

Solve the boundary value problem

 

with h = 0.25, by using central difference approximation to   and

i. central difference approximation to , ii. backward difference approximation to  , iii. forward difference approximation to  .

If the exact solution is y(x) = (e10x–1)/(e10 − 1), compare the magnitudes of errors at the nodal points in the three methods.

More products