# CHAPTER 19An Introduction to Optimisation and the Solution of Nonlinear Equations

## 19.1 Introduction and Objectives

In this chapter we introduce a number of algorithms to solve nonlinear equations and to find the minimum value of a function in one unknown variable. This is called *univariate root finding* and *minimisation*, respectively. We reduce the scope to functions of a single variable and to the computation of implied volatility. There are enough topics to consider even for this seemingly simple problem.

The goals are:

- Algorithms to solve nonlinear equations and to compute function minima. In this case we are interested in the mathematical and numerical foundations of the problem.
- Instantiate the software model that we introduced in Chapter 9 to create a generic system to solve nonlinear problems. This is a design step.
- Apply the newly developed code to compute
*implied volatility*. - Employ modern C++ multiparadigm syntax and language features to promote developer productivity.

We examine the twin topics of computing the *roots of functions* and *function minimisation* and subsequent implementation in C++. Some of the advantages are that we are employing a defined process to create a software framework to solve problems, as introduced in Chapter 9.

Some of the benefits that this chapter delivers are:

- It discusses a number of robust nonlinear solvers for univariate functions based on C++11 and the Boost C++ libraries. We assemble these solvers in one place for easy reference. ...

Get *Financial Instrument Pricing Using C++, 2nd Edition* now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.