Skip to main content

Section 3.1 Introduction to Rootfinding

In the beginning of the course, we were introduced to the problem of approximating the square root of 65 using only the four standard operations: addition, subtraction, multiplication and division. As we will see, another way to look at that problem is to show that if \(f(x) = x^{2}-65\text{,}\) then \(p=\sqrt{65}\) is the root, or the value of \(p\) such that \(f(p)=0\text{.}\)
Examples are prevalent throughout applied sciences, and here’s a more geometric one that is similar to problems in many Calculus classes:

Example 3.1.1.

Find the area bounded by the \(y\)-axis, the line \(y=x\) and the line \(y=\cos x\) in the first quadrant.
The area sought is the shaded area below:
Figure 3.1.2. Plot of \(y=x\) and \(y=\cos x\text{.}\) The shaded area bounded between the positive \(y\)-axis and the two curves in the first quadrant is shown.
The area is the definite integral of the difference of the two curves. However, the limits on the integral depend on the intersection point which means solving:
\begin{equation*} x= \cos x \end{equation*}
or finding the root of \(f(x) = x-\cos x\text{.}\) This does not have what is called a closed-form solution. Such a solution would be a way to write the solution using other known functions.
The next example is also a standard Calculus question.

Example 3.1.3.

Find the maximum of \(f(x)=x\sin x\) for \(x \in [0,\pi]\text{.}\)
This means solving
\begin{equation*} f'(x) = \sin x + x \cos x = 0 \end{equation*}
which also does not have a closed form solution.
And finally to illustrate that these rootfinding problems arise in other fields, this next example examines how objects fall toward the earth.

Example 3.1.4.

A model of an object falling near the earth that includes drag is that the height \(y\) as a function of time \(t\) is given by
\begin{equation} \begin{aligned}y\amp= y_{0} - \frac{v_{\infty}^{2}}{g}\ln \biggl(\cosh \biggl(\frac{gt}{v_{\infty}}\biggr) \biggr)\end{aligned}\tag{3.1.1} \end{equation}
where \(y_{0}\) is the initial height of the object, \(g\) is the gravitation constant near the earth and
\begin{equation*} \begin{aligned}v_{\infty}\amp= \sqrt{\frac{2mg}{\rho C_{D} A}}\end{aligned} \end{equation*}
is the terminal velocity with \(m\) as the mass, \(C_{D}\) is the drag coefficient and \(A\) is the cross-sectional area of the object.
The time the object strikes the ground is given by the root of the function in (3.1.1) knowing all the other parameters.
These examples are among many in which a solution is sought, but no closed-form solution can be found. We will see in this chapter how to approximate the solutions.

Definition 3.1.5.

The root of a function \(f(x)\text{,}\) is a number \(p\) such that \(f(p)=0\text{.}\) The number \(p\) is also often called the zero.
The root \(p\) of a function \(f\) has multiplicity \(m\) if \(f\) can be written in the form:
\begin{equation*} f(x) = (x-p)^{m} g(x) \end{equation*}
where \(\lim_{x \rightarrow p}g(x) \neq 0\text{.}\)
Multiplicity usually pertain only to roots of polynomials as we saw in Section 1.1. For example, the polynomial: \(f(x) = x^{3}+5x^{2}+3x-9\) can be written as \(f(x) = (x+3)^{2}(x-1)\) so the root \(-3\) has multiplicity 2.
However, a plot of the function \(g(x) = 1-\cos x\) that is in Figure 3.1.6 shows that the root at \(x=0\) has characteristics of a function with multiplicity greater than 1.
Figure 3.1.6. Plot of \(y=1-\cos\) showing the root of the function at \(x=0\text{.}\)
The following theorem provides another tool to find the multiplicity.

Proof.

Since \(f\) is continuous and has \(m\) continuous derivatives, we can use Taylor’s Theorem (Theorem 1.6.4) to write:
\begin{equation*} f(x) = \sum_{j=0}^{m-1}\frac{f^{(j)}(p)}{j!}(x-p)^{j} + \frac{f^{(m)}(p)}{m!}(x-p)^{m} + \frac{f^{(m+1)}(\xi(x))}{(m+1)!}(x-p)^{m+1} \end{equation*}
for some \(\xi \in [x,p]\text{.}\) Since \(f^{(j)}(p)=0\) for \(j=0,1,\ldots,m-1\text{,}\) all terms in the summation formula above are zero and thus we can write
\begin{equation*} f(x) = \frac{f^{(m)}(p)}{m!}(x-p)^{m} + \frac{f^{(m+1)}(\xi(x))}{(m+1)!}(x-p)^{m+1} \end{equation*}
factoring out a \((x-p)^{m}\) term
\begin{equation*} f(x) = (x-p)^{m} \biggl( \frac{f^{(m)}(p)}{m!}+ (x-p) \frac{f^{(m+1)}(\xi(x))}{(m+1)!}\biggr), \end{equation*}
which has a nonzero limit as \(x \rightarrow p\text{,}\) therefore \(f(x)\) has a root at \(x=p\) of multiplicity \(m\text{.}\)
In converse, assume that \(f(x)\) has a root of multiplicity \(p\text{.}\) This means that we can write
\begin{equation*} f(x) = (x-p)^{m} g(x). \end{equation*}
with \(g(p)\neq 0\text{.}\) Obviously \(f(p)=0\text{.}\) Also if \(f(x)\) has \(m\) continuous derivatives, then \(g(x)\) does as well.
\begin{equation*} \begin{aligned}f'(x)\amp= m (x-p)^{m-1}g(x) + (x-p)^{m} g'(x) \\ f''(x)\amp= m(m-1) (x-p)^{m-2}g(x) + 2 m (x-p)^{m-1}g'(x) + (x-p)^{m} g''(x)\\ f'''(x)\amp= m(m-1)(m-2) (x-p)^{m-3}g(x) + 3 m (m-1) (x-p)^{m-2}g'(x) \\\amp\qquad + 3 m(x-p)^{m-1}g''(x) + (x-p)^{m} g'''(x) \end{aligned} \end{equation*}
In general, we can write
\begin{equation*} f^{(j)}(x) = \sum_{i=0}^{j}k_{i} (x-p)^{m-j+i}g^{(i)}(x), \end{equation*}
where \(k_{i}\) is a function of \(m\) (however the exact form it not needed).
Evaluating \(f^{(m-1)}\) at \(x=p\) results in
\begin{equation*} f^{(m-1)}(p) = \sum_{i=0}^{m-1}k_{i} \cdot (p-p)^{i+1}g^{(i)}(p) = 0 \end{equation*}
since \((p-p)^{i}=0\) for \(i=0,1,2,\ldots,m-1\) and evaluating \(f^{(m)}(x)\) at \(x=p\) results in
\begin{equation*} f^{(m)}(p) = \sum_{i=0}^{m} k_{i} (p-p)^{i} g^{(i)}(p) = k_{0} g^{(0)}(p) \neq 0 \end{equation*}
since \(g^{(0)}(p)=g(p) \neq 0\text{.}\) Therefore the theorem holds.
This is quite a helpful theorem as we will see below, but to get some idea of using it in a general sense, the following shows how to find the multiplicity of roots of two particular functions.

Example 3.1.8.

Use the above theorem to find the multiplicity of the following functions at the given root:
  1. \(f(x)= x^{4}-8x^{3}+24x^{2}-32x+16\) at \(p=2\)
  2. \(g(x)=\sin x -\tan x\) at \(p=0\)
Solution.
For the first function, differentiate and plug in \(x=2\) until the result is not zero. First, \(f(2)=0\text{,}\) then
\begin{equation*} \begin{aligned}f'(x)\amp= 4x^{3} - 24x^{2} + 48 x -32\amp f'(2)\amp= 0 \\ f''(x)\amp= 12x^{2}-48x +48\amp f''(2)\amp= 0 \\ f'''(x)\amp= 24x - 48\amp f'''(2)\amp= 0 \\ f^{(4)}(x)\amp=24\amp f^{(4)}(2)\amp= 24\end{aligned} \end{equation*}
and therefore the multiplicity of the root at \(p=2\) is 4.
For the second function \(g(0)=0\) and then
\begin{equation*} \begin{aligned}g'(x)\amp= \cos x - \sec^{2} x\amp g'(0)\amp= 0 \\ g''(x)\amp= \sin x - 2 \sec x \sec x \tan x\amp g''(0)\amp= 0 \\ g'''(x)\amp= \cos x - 4 \sec^{3} x \tan^{2} x - 2 \sec^{4} x\amp g'''(0)\amp= -1\end{aligned} \end{equation*}
and therefore the multiplicity of \(g\) at \(p=0\) is 3.