Solutions of Problems about Numerical Methods

1.

(a) y0 = -1/4 , y1 = -3/4 , y2 = -5/4, y3 = 1/4

(b) Partial derivative is 2 which is positive, hence problem is unstable and we have to expect exponentially growing errors for a numerical method.

(c) Errors yj - y(j) for j=0,1,2,3: 0, 1/2, 2, 13/2. Exact solution goes to -infinity for t going to infinity. Euler values go to +infinity.

2.

(a) y1' = y2 , y2' = 1 - y1 , y1(0) = 2 , y2(0) = -1.

(b) at t=1: approximation for ( y1 , y2) is (2,-1) + 1(-1,1-2) = (1,-2)

(c) at t=1: approximation for ( y1 , y2) is (2,-1) + 1[(-1,-1)+(-2,0)]/2 = (1/2,-3/2)

(d) exact value is 1 - sin(1) + cos(1) = 0.6988
Euler error is 0.3012, Improved Euler error is 0.1988.
For the Euler method we expect that doubling the number of steps will roughly give one half of the error. So we would expect errors of 0.3012/2, 0.3012/4 for h=1/2, h=1/4.
For the Improved Euler method we expect that doubling the number of steps will roughly give one quarter of the error. So we would expect errors of 0.1988/4, 0.1988/16 for h=1/2, h=1/4.

(e) (y1(1),y2(1)) = (y1(0),y2(0)) + h( y2(1), 1-y1(1)) gives linear system: y1(1)-y2(1)=2 and y1(1)+y2(1)=0. Hence y1(1)=1, y1(1)=-1.