The Mathematics of Financial Modelingand Investment Management

(Brent) #1

9-DifferntEquations Page 250 Wednesday, February 4, 2004 12:51 PM


-----

250 The Mathematics of Financial Modeling and Investment Management

To illustrate the finite difference method, consider the following
simple ordinary differential equation and its solution in a finite interval:

f ′()x = fx()


df
= dx
f

log fx()= xC+

fx()= exp(xC+ )

As shown, the closed-form solution of the equation is obtained by separa-
tion of variables, that is, by transforming the original equation into
another equation where the function f appears only on the left side and
the variable x only on the right side.
Suppose that we replace the derivative with its forward finite differ-
ence approximation and solve

fx( i + 1 )– fx()i
------------------------------------- = fx() i
xi + 1 – xi

fx( i + 1 ) = [ 1 + (xi + 1 – xi)]fx()i

If we assume that the step size is constant for all i:

()= [ 1 + ∆x]
i
fxi fx() 0

The replacement of derivatives with finite differences is often called the
Euler approximation. The differential equation is replaced by a recur-
sive formula based on approximating the derivative with a finite differ-
ence. The i-th value of the solution is computed from the i–1-th value.
Given the initial value of the function f, the solution of the differential
equation can be arbitrarily approximated by choosing a sufficiently
small interval. Exhibit 9.1 illustrates this computation for different val-
ues of ∆x.
In the previous example of a first-order linear equation, only one ini-
tial condition was involved. Let’s now consider a second-order equation:

f ′′()x + kf x()= 0

Free download pdf