This preview shows pages 1–3. 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: Jaime Frade Computational Finance: Dr. Kopriva Homework #6 1. Show that once can approximate the intial value problem for y = F ( t, y ) by Y n +1 = Y n + t F ( t n +1 / 2 , Y n +1 / 2 ) (1) where t n +1 / 2 = t n + t 2 . NOTE: For Midpoint Rule over [ a, b ] Z b a f ( x ) dx = ( b a ) f a + b 2 (2) Integrating y = F ( t, y ) over [ t n +1 , t n ], by using the midpoint quadrature will obtain: Z t n +1 t n y dt = Z t n +1 t n F ( t, y ) dt = ( t n +1 t n ) F ( t n +1 / 2 , y ( t n +1 / 2 )) + n From (2) = t F ( t n +1 / 2 , y ( t n +1 / 2 )) + n From t = t n +1 t n (3) where n is the local truncation error. Define t = ( t n +1 t n ) and t n +1 / 2 = t n + t 2 From (3), obtain the following: y ( t n +1 ) y ( t n ) = t F ( t n +1 / 2 , y ( t n +1 / 2 )) + n (4) Define y ( t n ) = y n Y n , y ( t n +1 ) = y n +1 Y n +1 , and y ( t n +1 / 2 ) = y n +1 / 2 Y n +1 / 2 . From above, can redefine (4) to obtain the following: Y n +1 = Y n + t F ( t n +1 / 2 , Y n +1 / 2 ) (5) Show that this approximation is second order. I will use aposterior approach using the Talyor Series. Let t * = t 2 . y n +1 = y n +1 / 2 + t * y n +1 / 2 + ( t * ) 2 y 00 n +1 / 2 2! + ( t * ) 3 y 000 ( ) 3! (6) y n = y n +1 / 2 t * y n +1 / 2 + ( t * ) 2 y 00 n +1 / 2 2! ( t * ) 3 y 000 ( ) 3! (7) Taking the difference between (6) and (7), will obtain: y n +1 y n = t y n +1 / 2 + ( t * ) 3 y 000 ( ) 3 = t F ( t n +1 / 2 , Y n +1 / 2 ) + ( t * ) 3 y 000 ( ) 3  {z } = LTE (8) Comparing (8) and (4), obtain the following for the local truncation error(LTE): n = O (( t ) 3 ) (9) The approximation when using (5) is second order from above (9) 1 2. To solve (5), one needs the value for Y n +1 / 2 . This can be approximated using Eulers Method to give the following scheme. Y * n +1 / 2 = Y n + t 2 F ( t n , Y n ) (10) Y n +1 = Y n + t F ( t n +1 / 2 , Y * n +1 / 2 ) (11) Show that this method is second order. Let t * = t 2 . From (10), can approximate with a local trunction error using the talyor series as: y * n +1 / 2 = y n + ( t * ) y n + * (12) I will use aposterior approach using the Talyor Series for y n +1 / 2 Y n +1 / 2 . y n +1 / 2 = y n + t * y n  {z } +( t * ) 2 y 00 n 2! + O (( t * ) 3 ) = Y * n +1 / 2 + * + ( t * ) 2 y 00 n 2! + O (( t * ) 3 ) From (12) (13) Using Talyor Series on to expand F ( t n +1 / 2 , Y * n +1 / 2 ), from (11). F ( t n +1 / 2 , Y * n +1 / 2 ) = F ( t n +1 / 2 , Y n +1 / 2 ) + ( Y * n +1 / 2 Y n +1 / 2  {z } =(13) ) F Y + O (( Y * n +1 / 2 Y n +1 / 2 ) 2  {z } ( t 2 ) 2 ) = F ( t n +1 / 2 , Y n +1 / 2 ) + Y * n +1 / 2 Y * n +1 / 2 ( t * ) 2 Y 00 n 2!...
View
Full
Document
This note was uploaded on 12/14/2011 for the course MAP 5611 taught by Professor Staff during the Fall '10 term at FSU.
 Fall '10
 staff

Click to edit the document details