Homework 2: 0 j+1 0 J 0 J 1 j+1 J 1
Homework 2: 0 j+1 0 J 0 J 1 j+1 J 1
1. Find the order of accuracy of the following implicit scheme for numerical dierentiation: fj +1 + 4fj + fj 1 = 3 (fj +1 fj 1 ) h
Show all steps leading to the nal result. 2. Use the Pad e scheme from problem 1 and the following boundary schemes to dierentiate f (x) = sin(5x) on 0 x 3. f0 + 2 f1 = 1 h 5 1 f0 + 2 f1 + f2 2 2 1 h 5 1 fn 2fn1 fn2 2 2
fn + 2fn1 =
Plot the solution using 15 uniformly spaced points and compare against the true solution. Also, include a printout of the Matlab code used to generate the derivative.