## Exercises Chapter 6

A Partial Differential Equation Approach

### Exercises Chapter 6

hi Daniel

I have a couple of questions regarding chapter 6 exercises, I hope you can help me

1.- in the first test case, you give as initial condition the value in t=1: y(1)=1. I find problems when dealing with it, since I can't apply the algorigthms... how am I supposed to deal with it?

2.- While with test case number 2 I find that the exact solution is prety similar to those offered by the numerical methods applied (i.e predictor-corrector and runge-kutta orders 2 and 4), in the test case 1, when I choose a large T (like T=3) the exact solution goes way quickly...

is this the expected behaviour?

Thank you for your help
JLMARTIN

Posts: 16
Joined: Mon Jul 30, 2012 9:52 am

Hi

no news? JLMARTIN

Posts: 16
Joined: Mon Jul 30, 2012 9:52 am

Hi JL,

Sorry, I was away. I will get back to you.

D Cuchulainn

Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

Hi JL,

1.- in the first test case, you give as initial condition the value in t=1: y(1)=1. I find problems when dealing with it, since I can't apply the algorigthms... how am I supposed to deal with it?

DD In principles it's just a different start point. Can you take t' = t - 1.

2.- While with test case number 2 I find that the exact solution is prety similar to those offered by the numerical methods applied (i.e predictor-corrector and runge-kutta orders 2 and 4), in the test case 1, when I choose a large T (like T=3) the exact solution goes way quickly...

DD The exact solution goes to the value 2 when T gets big.

How many mesh points are you taking?

Adaptive meshing would use eq. (6.43) to find the correct meshe size. Cuchulainn

Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

Thank you Daniel for your help

for the first test case, I'm using

T=3

h=0.01

Tolerance=0.001

max iterations=1000

If I use 6.43, and given that I'm using the test case 2, what would be the condition for the convergence? If I use the L2 norm, isnt df/dy=(1/3)*t*y^(-2/3)? but in which should I apply the condicion ||df/dy||*h<2?

Regards
JLMARTIN

Posts: 16
Joined: Mon Jul 30, 2012 9:52 am

Hi JL,

Since this is 1 factor then the norm just becomes the absolute value of df/dy.

Problem is we don't know y. So some heuristics.

Ex.

say df/fy = 1/y^2. let's assume y > 0.7 on [0, 0.2] (normally see this from iterated values of y_{k} )

then h < 2y^2 on interval [0, 0.2]. Then convergence if h < 2(0.7)^2.

So, something similar in you case.

hth

Daniel Cuchulainn

Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

understood!

thank you Daniel
JLMARTIN

Posts: 16
Joined: Mon Jul 30, 2012 9:52 am

Return to Finite Difference Methods in Financial Engineering (Duffy)

### Who is online

Users browsing this forum: No registered users and 1 guest 