SST 301 • UNIT 6 • Statistics

Determining Roots of Equations & Optimization

Topics covered: Univariate & Multivariate Root Finding, Local Extrema & Stationary Points

Looking for SST 301 Determining Roots of Equations & Optimization PDF material?
Generate printable PDF revision notes, past examination papers with marking rubrics, and formula cheat sheets.
Download Course PDF Pack (.zip)

Syllabus Study Notes (Core Overview)

Free Overview Preview

1. Concept and Use Case

Root finding and optimization are two closely related computational tasks. Root finding seeks the value or values of a variable at which a function equals zero. Optimization seeks the value or values of a variable at which a function attains a maximum or minimum. In many practical settings, the two tasks are linked: the stationary points of a differentiable function are found by solving the equation obtained when its first derivative is set to zero.

The approved course context identifies the following tools and ideas for this unit:

  • Searching intervals for roots using uniroot().
  • Finding all roots with uniroot.all().
  • Polynomial roots using polyroot().
  • Solving nonlinear systems using multiroot() from the rootSolve package.
  • First and second derivative tests using $dy/dx=0$ and $d^2y/dx^2$.
  • Finding local maxima and minima.
  • Numerical optimization using optimize().

These tools address both univariate and multivariate problems. Univariate root finding concerns a single equation in one unknown. Multivariate root finding concerns a system of equations in several unknowns. Local extrema and stationary points concern the shape of a function and the classification of its turning points.

The study of roots and optimization builds on earlier work with user-defined functions, loops and control structures, solutions of systems of linear equations, and differentiation and integration of univariate functions. A user-defined function supplies the mathematical rule whose root or optimum is sought. Loops and control structures support repeated evaluation and interval searching. Differentiation supplies the derivative conditions that characterize stationary points. Systems of linear equations provide a foundation for understanding systems of nonlinear equations, where the same idea of solving simultaneously for several unknowns appears in a more general form.

A representative use case is a function that describes a quantity of interest, such as a cost, a concentration, or a displacement. Finding where the function crosses zero answers a question about balance or break-even. Finding where the function reaches its lowest or highest value answers a question about best or worst performance. The numerical procedures in this unit make these questions tractable when an algebraic solution is difficult or impossible to obtain by hand.

2. Data, Syntax, and Core Concepts

2.1 Functions as Inputs

Root finding and optimization operate on functions. In the approved study profile, a function is defined with the general form:

function.name <- function(argument1, argument2, ...)

A simple example from the approved evidence is:

square.function <- function(x)

This shows that a function is created by assigning a function definition to a name, and that the definition lists one or more arguments. The body of the function then computes a result from those arguments. For root finding, the function returns a value whose zero is sought. For optimization, the function returns a value whose maximum or minimum is sought.

2.2 Univariate and Multivariate Problems

A univariate problem involves one independent variable. A multivariate problem involves two or more independent variables. Root finding in the univariate case seeks a scalar $x$ such that a function $f(x)$ satisfies:

$$
f(x)=0
$$

Root finding in the multivariate case seeks a vector of values such that several functions are simultaneously zero. If there are $n$ unknown variables and $n$ equations, the problem is to find values that satisfy all equations at once.

Optimization in the univariate case seeks a value of $x$ at which a function $f(x)$ is maximized or minimized. Optimization in the multivariate case seeks a combination of values of several variables at which a function of several variables is maximized or minimized.

2.3 Roots and Zeros

A root of a function is a value of the independent variable at which the function evaluates to zero. The terms root and zero are used interchangeably in this context. A function may have no real root, one real root, or several real roots. The number and location of roots depend on the function.

For a polynomial of degree $n$, there are $n$ roots when complex roots are counted. The approved notes on matrices illustrate this principle in the context of eigenvalues: for an $n\times n$ matrix there will be $n$ roots and thus $n$ eigenvalues. The characteristic equation produces a polynomial, and the roots of that polynomial are the eigenvalues. This establishes the general principle that a polynomial of degree $n$ has $n$ roots.

2.4 Stationary Points

A stationary point of a differentiable function is a point at which the first derivative is zero:

$$
\frac{dy}{dx}=0
$$

At a stationary point, the tangent to the curve is horizontal. Stationary points include local maxima, local minima, and points of inflection. The first derivative test identifies where stationary points occur. The second derivative test helps classify them.

2.5 First and Second Derivative Tests

The first derivative test uses the sign of the first derivative to locate stationary points. Setting the first derivative to zero and solving gives the $x$-values of the stationary points.

The second derivative test uses the sign of the second derivative at a stationary point to classify it:

  • If $\frac{d^2y}{dx^2}<0$ at a stationary point, the function has a local maximum there.
  • If $\frac{d^2y}{dx^2}>0$ at a stationary point, the function has a local minimum there.
  • If $\frac{d^2y}{dx^2}=0$ at a stationary point, the test is inconclusive, and the point may be a point of inflection or another type of stationary point.

2.6 Numerical Methods and Their Role

Numerical methods approximate roots and optima when exact algebraic solutions are impractical. The approved tools for this unit are:

  • uniroot() for finding a single root within a specified interval.
  • uniroot.all() for finding all roots within a specified interval.
  • polyroot() for finding the roots of a polynomial.
  • multiroot() from the rootSolve package for solving systems of nonlinear equations.
  • optimize() for numerical optimization of a univariate function.

Each tool has its own requirements and produces results that must be interpreted in the context of the problem.

Unlock Complete Study Notes & Exam Traps

The full guide includes formal proofs, worked exemplar calculations, high-yield exam traps, and examiner marking schemes. Continue studying this topic in Mentify Prep Studio.

Ready to practice this topic interactively?
Generate custom exam variants, chat with the AI course tutor, and solve past papers.
Launch Interactive Study