Chapter 4One-parameter root-finding problems

Quite often problems involve only one parameter. In such cases, some general computational tools actually “crash” when asked to solve them, although this is generally a failure in their software design to deal with the single dimension. However, even if we have a well-programmed solver for any number of parameters, it is usually a good idea to use a tool for finding the root of a function of one parameter or to find the minimum (or maximum) of such a function rather than try to apply the more general program. This chapter considers root-finding.

4.1 Roots

Let us look at how problems involving the root(s) of a function of one variable may arise and how R may solve them. Although we will mention polynomial root-finding, because it is a very common problem, we regard this particular problem (and eigenvalues of matrices) to be somewhat different from those that will be the focus here.

We also wish to point out the limitations of computational technology for root-finding. Treating root-finders as black boxes is, in the author's view, dangerous, in that it risks many possibilities for poor approximations to the answers we desire, or even drastically wrong answers. Largely, this is because users may make assumptions about the problems and/or the software that are not justified. Indeed, in the present treatment, we mostly seek only real-valued solutions to equations—a big assumption.

We also want to show that the built-in tool for one-dimensional ...

Get Nonlinear Parameter Optimization Using R Tools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.