hw3 - diagram will suffice For θ = 0 5 1 use your code for...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
MEE 210B Homework # 3 Due February 9, 2009, 9am in class Note: Please turn in the programming problem separately from the theory problems. Reading: (1) A User’s View of Solving Stiff Ordinary Differential Equations (on the class website), (2) Wikipedia article on automatic differentiation 1. (1 point each part) Are the following equations stiff? Explain why or why not. Assume an error tolerance of 10 - 2 . (a) y 0 = y , t [0 , 1], y 0 = 1 (b) y 0 = - 1000( y - t 3 ) + 3 t 2 , t [0 , 1], y 0 = 1 (c) y 0 = - 1000( y - sin(1000 t )) + 1000 cos(1000 t ), t [0 , 1], y 0 = 0 2. Consider the θ -method: y n +1 = y n + θhf n + (1 - θ ) hf n +1 where 0 θ 1 and f n = f ( t n , y n ). (a) (1 point) What is the local truncation error? (b) (1 point) What is the local error? (c) (1 point) What is the order of this method? (d) (2 points) A method is called A-stable if its region of absolute stability contains the left half of the complex plane. For which values of θ is the θ -method A-stable? Justify your answer. 3. (10 points) Write a MATLAB code to implement the theta method for systems of ODEs. Explain the structure of your code (a flowchart or
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: diagram will suffice). For θ = 0 , . 5 , 1, use your code for solving: • The ODE system of Homework 2, Problem 3, with the stepsizes as indicated 1 • The predator-prey problem y 1 = . 25 y 1-. 01 y 1 y 2 y 2 =-y 2 + . 01 y 1 y 2 for 0 ≤ t ≤ 10 with stepsizes h = 0 . 1 and h = 0 . 001, and initial values y 1 = y 2 = 10. Plot y 1 vs. t and y 2 vs. t , and y 1 vs. y 2 . Note: You should write your own Newton iteration, but there is no need to write your own linear system solver. Use the func-tion provided in Matlab for that. Provide a subroutine for each problem that computes the Jacobian matrix. Do not use finite difference approximation or automatic differentiation to compute the Jacobian. DO NOT USE THE MATRIX INVERSE. IF YOU USE THE MATRIX INVERSE, YOU WILL NOT GET CREDIT FOR THIS PROBLEM! 2...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern