O'Reilly logo

Financial Instrument Pricing Using C++, 2nd Edition by Daniel J. Duffy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 24Ordinary Differential Equations and their Numerical Approximation

24.1 Introduction and Objectives

In this chapter we introduce first-order ordinary differential equations (ODEs) and their numerical approximation in C++. In general, it is difficult to find an analytical solution to these problems and for this reason we use the finite difference method to compute an approximate solution. There is a vast literature on this area of numerical analysis. We scope this domain and we attempt to do justice to the following topics:

  • A1: What is an ODE, does it have a solution in a given interval and is the solution unique?
  • A2: Qualitative properties of the solution of an ODE.
  • A3: Linear and nonlinear scalar ODEs and systems of ODEs.
  • A4: Numerical solution of ODEs.
  • A5: An introduction to the Boost C++ odeint library for solving ODEs.
  • A6: Some applications of ODEs in computational finance.

We discuss a number of these topics in this chapter. We continue with more advanced cases and applications in Chapter 25. Some relevant literature is Henrici (1962), Brauer and Nohel (1969), Conte and de Boor (1981) and Lambert (1991), to mention just a few. In general, each reader will have her own personal preferences as to which books are most relevant.

24.2 What is an ODE?

An ODE is an equation that defines a relationship involving the derivatives of an unknown function y with respect to a single variable. The highest-order derivative in the equation determines the order of the equation. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required