Math 269A: Assignment 1

Assigned Monday Oct 15, due Monday Oct 22


Theory

[1] Prove convergence for the trapezoidal method by modifying the proof from class for the forward Euler method.


[2] Find the solution for the ODE, for general initial data:

                                               


Computation

[3](a) Implement the backward Euler methods and the trapezoidal method to solve

on the interval 0 ≤ t ≤ π with dt = π /N.

(b) Apply your program and graph the solution and the error, for y0 = 0 and for N=20,40,80. Use the results to show that the Trapezoidal method is 2nd order, while the forward Euler method is 1st order.
(c) Apply your program and graph the solution and the error, for y0 = 1 and for N=20,40,80. Which method is more accurate?

Note: Perform this by modifying the following functions, which are written for forward and backward Euler. Please names the files BEulerTrap.m and TrapInv.m.

FBEulerStiff.m

BEInv.m

G.m


What You Should Turn In