Home » Posts tagged 'JCM_math545_HW1_S17'

# Tag Archives: JCM_math545_HW1_S17

## Getting your feet wet numerically

Simulate the following stochastic differential equations:

- \[ dX(t) = – \lambda X(t) dt + dW(t) \]
- \[ dY(t) = – \lambda Y(t) dt +Y(t) dW(t) \]

by using the following Euler type numerical approximation

- \[X_{n+1} = X_n – \lambda X_n h + \sqrt{h} \eta_n\]
- \[Y_{n+1} = Y_n – \lambda Y_n h + \sqrt{h} Y_n\eta_n\]

where \(n=0,1,2,\dots\) and \(h >0\) is a small number that give the numerical step side. That is to say that we consider \( X_n \) as an approximation of \(X( t) \) and \( Y_n \) as an approximation of \(Y( t) \) each with \(t=h n\). Here \(\eta_n\) are a collection of mutually independent random variables each with a Gaussian distribution with mean zero and variance one. (That is \( N(0,1) \).)

Write code to simulate the two equations using the numerically methods suggested. Plot some trajectories. Describe how the behavior changes for different choices of \(\lambda\). Can you conjecture where it changes ? Compare and contrast the behavior of the two equations.

Tell your story with pictures.