This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Spring 2010 MAT260 – BEREGNINGSALGORITMER 2 Obligatory Exercise 2 Deadline: 29. April 15.00 Print your name and Candidate number on the front page, and deliver your solutions to the problems below in a box marked MAT260 in the ’Ekspedisjon’ office in the 5th floor Problem 1 Use the Leap-frog method a) x n = x n − 2 + 2 hf n − 1 , n = 2 , 3 , . . ., to integrate the differential equation x ′ ( t ) = x (1- x ) ≡ f ( t, x ) , four steps from t = 0 to t = 2 with initial value x (0) = 0 . 5. Use Euler’s method in the first step. Write down the formulas you use to compute each of the four x-values. The global error in the computed approximation of x (2) is of order two. Using b) eight steps from t = 0 to t = 2 gives x (2) ≈ . 88110. Use your own result in combination with this result to estimate the error in the approximation . 88110. Explain the assumptions that your error estimate is based on. Write a Matlab function [t,x] = Leap frog(f,ts,te,xs,N) which takes c) a total of N equidistant steps from time...
View Full Document
This note was uploaded on 05/23/2010 for the course MAT mat260 taught by Professor Berntsen during the Spring '10 term at Bergen Community College.
- Spring '10