Skip to main content

Section 2 Motivation

You might reasonable ask why we need to learn numerical methods. After all, we've spent years learning explicit techniques for solving equations culminating in calculus. We know dozens of formulae for derivatives and integrals, powerfl techniques for evaluating them. We know how to use elimination and substitution to solve systems of linear equations. So why numerical methods? It's probably best to consider some examples. For instance, the function \(f(x) = e^x\) is about as nice as functions come - it has a very smooth graph, since derivatives exist to all orders. Even better, its derivative is itself!

That is one smooth looking plot. What if we replace \(x\) with \(x^2\text{?}\) (Functions of this form are very common in practice. The Gaussian or normal distribution from statistics is a very important example.)

It looks just as smooth, and in fact it is: all derivatives exist everywhere to all orders, and they are pleasing mixtures of polynomials and exponentials, just like Calculus I. Now, suppose I want to find the area under the graphs for \(0\leq x \leq 1\text{.}\) From Calculus II, we know that we can evaluate the integral

\begin{equation*} \int_0^1 e^x \, dx = e - 1, \end{equation*}

which is elementary. What about \(g(x)\text{?}\) Certainly we can still write

\begin{equation*} \int_0^1 e^{x^2} \, dx, \end{equation*}

but now what?

There doesn't seem to be anywhere to go - the function \(e^{x^2}\) does not have a closed antiderivative. There is no way to use the techniques of basic calculus to deal with it. This should be alarming. After all, the function is about as nice as we could ask for. So what do we do? We'll need to look at numerical calculus for the answer.

What about other examples? From very early, we learn how to use algebra to solve equations. Are there equations that can't be solved with algebra? Consider the following question:

Where do the graphs of \(f(x) = 2x\) and \(g(x) = \cos x\) intersect?

A plot shows that they cross. But where? You learned a long time ago to find intersections between two graphs by setting the functions equal:

\begin{equation*} 2x = \cos x \end{equation*}

which really can be thought of as a root finding problem:

\begin{equation*} 2x - \cos x = 0. \end{equation*}

Can algebra solve this? The equation above is sometimes called a transcedental equation - that is, it involves functions that cannot be undone with the operations of algebra. Except in very special cases, there is no way to solve for \(x\text{.}\) And yet, we can see the intersection. To find it, we'll study a pile of techniques in an area called root finding.

Another area of interest is to construct a function from given data. That is, given some points, how can we find a function that passes through those points? This is a question known as interpolation. There are many approaches that we will discuss.