< Previous Section  Home  Next Section > 
In Chapter 5 we employed the power of digital technologies to develop a method for approximating the net accumulation from a reference point of a quantity whose exact values we assumed could be represented by a yettobeknown function f in relation to moments of its independent variable x. The method, in outline, was this:
Figure 10.1.1, repeated from Chapter 5, illustrates this process.
The function $A$ that we defined in Chapter 5 was this.
Start with a reference value $x=a$, a standard interval length $\Delta x$, and a function $r_f$, defined in closed form, whose values give the exact rate of change of the exact accumulation function $f$ at each moment in its domain. Values of the function $A$, defined below, give the approximate accumulation in $f$ from $a$ to $x$. (See Section 4.7 for a refresher on summation notation.)
Up until now we have trusted that we can make $\Delta x$ small enough so that making it smaller makes no appreciable difference in the accuracy of the approximate accumulation function. We did not, however, investigate how good an approximation is for a particular value of $\Delta x$ or for particular values of $x$. We shall do that now.
Our explorations of how well an approximation method works will follow this pattern:
There are several ways to judge how well an approximation method works
for a particular rate of change function.
Whether to focus on absolute or relative error is a matter of judgment. If you are measuring an accumulation of microscopic particles, an approximation that has an absolute error of $3.7\times10^{7}$ grams might seem very close to exact. If, however, a highly accurate measure is $5.1\times 10^{8}$ grams, then your relative error is $$\frac{3.7\times10^{7}}{5.1\times 10^{8}}=7.255,$$ or over 720%.
On the other hand, if you are measuring the distance to a star, an approximation that has an absolute error of 2 billion kilometers might seem highly inaccurate. If, however, a highly accurate measure is 700.21 light years, then your relative error is $$\frac{2\times10^9}{700.21\times 9.461\times 10^{12}}=0.0000302,$$or about 3/1000 of 1%.
The three approximation methods discussed above were all based on the idea of pretending that the accumulation function has a constant rate of change over all $\Delta x$intervals. The differences among those approaches arose from our choice of the place within a $\Delta x$interval at which we take a value of $r_f$ as the constant rate of change that approximates the values of $r_f$ over that interval.
We could make other assumptions that lead to different choices of our assumed constant rate of change over $\Delta x$intervals. For example, instead of assuming that $f$ has a constant rate of change over a $\Delta x$interval, we could assume that $f$ has constant acceleration over each $\Delta x$interval.This would be the same thing as assuming that $r_f$ changes linearly over each $\Delta xinterval$.
Instead of approximating exact net accumulation by pretending that accumulation happens at a constant rate over each $\Delta x$interval, we can approximate exact net accumulation by pretending that accumulation happens with constant acceleration over each $\Delta x$interval. 
In order to approximate the net change in values of f (i.e., net accumulation), we need a constant rate of change over each $\Delta x$interval. So we still face the question of what constant rate of change we shall assume for f over each $\Delta x$interval.


Figure 10.1.7. Assume that the approximate net accumulation function changes with constant acceleration over each $\Delta x$interval. Then r(x), f's approximate rate of change at x, changes linearly. Locate the midvelocity for each $\Delta x$interval.  Figure 10.1.8 Assume that the approximate net accumulation function changes with constant acceleration over each $\Delta x$interval. Then r(x), f's approximate rate of change at x, changes linearly. Use midvelocity, $r_\mathrm{mid}(x)$, as the our assumed constant rate of change that approximates the rate of change of f at each value of x in a $\Delta x$interval. 
Figure 10.1.9. The graph of $y=A_4(x)$ with $\Delta x$=0.6,
where $A_4$ is the approximate net accumulation function for f
gotten by using $r_\mathrm{vmid}(x)$ as the approximate rate of
change of f with respect to x for every value of x in a $\Delta
x$interval. 
Figure 10.1.10. The graph of $y=A_4(x)$ with $\Delta x$=0.2,
where $A_4$ is the approximate net accumulation function for f
gotten by using $r_\mathrm{vmid}(x)$ as the approximate rate of
change of f with respect to x over each $\Delta x$interval.
Notice the remarkably close approximation even with 0.2 as a value
of $\Delta x$ 
Reflection 10.1.12. Use GC to compare
two methods of approximating exact accumulation, one using
$r_f(\mathrm{mid}(x))$ and one using using $r_\mathrm{vmid}(x)$.
The error in an approximation of an accumulation function's value is due not only to the method we use. It is also influenced by the size of $\Delta x$ in conjunction with the behavior of the accumulation function's rate of change function.
For example, the left side of Figure 10.1.11 shows (on the left) graphs of $y=r_f(x)$, $\color{red}{y=r_\mathrm{mid}(x)}$, and $\color{blue}{y=r_\mathrm{vmid}(x)}$ and (on the right) their respective accumulation functions as the value of $\Delta x$ goes from $\Delta x=1$ to $\Delta x=0.02$.
We recommend that you watch the animation in Figure 10.1.11 several times, focusing first on the left pane, then on the right pane in relation to the left pane. Move your cursor away from the animation to make its scroll bar disappear.
There is a lot to see in Figure 10.1.11. Drag the scroll bar to appropriate places in the animation as we focus on different aspects of what the animation illustrates.
Regarding approximations of $r_f(x)$:
As the value of $\Delta x$ becomes smaller, both methods produce constant rates of change over $\Delta x$intervals that become closer to the values of $r_f(x)$ over the same intervals.
Regarding approximations of $f(x)$:
As the value of $\Delta x$ becomes smaller, both methods produce approximate accumulations $\Delta x$intervals that become closer to the values of $f(a, x)$ over the same intervals.
For any given value of $\Delta x$, the faster that the rate of change of $r_f(x)$ changes with respect to $x$ over an interval, the farther apart are values of $A_\mathrm{mid}(a, x)$ and $A_\mathrm{vmid}(a, x)$. Using differential notation, the greater the value of $\dfrac{d^2}{dx^2}r_f(x)$ over an interval, the farther apart are values of $A_\mathrm{mid}(a, x)$ and $A_\mathrm{vmid}(a, x)$.
As the value of $\Delta x$ becomes smaller, values of $A_\mathrm{mid}(a, x)$ become closer to values of $f(a, x)$ faster than do values of $A_\mathrm{vmid}(a, x)$.
Put another way, if we halve the value of $\Delta x$, the improvement in approximations of $f(a, x)$ over an interval by $A_\mathrm{mid}(a, x)$ tends to be greater than the improvement in the approximations of $f(x)$ by $A_\mathrm{vmid}(a, x)$.Another way to look at these same observations is by building a table of values of $A_\mathrm{mid}(a, x)$ and $A_\mathrm{vmid}(a, x)$ for particular values of x and diminishing values of $\Delta x$.
The table in Figure 10.1.12 uses definitions of $A_\mathrm{mid}$ and $A_\mathrm{vmid}$ that are modified to accept the accumulation's reference value and the value of $\Delta x$ as arguments. We did this so that we could hold the accumulation's reference value and end value constant while varying the value of $\Delta x$.
The GC file that produced Figure 10.1.12 is at this link.
You should inspect Figure 10.1.12 closely. Approximations of $f(1,15)$ become better with smaller values of $\Delta x$. But there are two more things to see:
This suggests that relative error of either method is proportional to $(\Delta x)^2$.
This is consistent with the error bounds for $A_\mathrm{mid}$ and $A_\mathrm{vmid}$ given immediately above. The bound for $A_\mathrm{mid}$ over an interval involves the quotient $\frac{xa}{24}$ while the bound for $A_\mathrm{mid}$ involves the quotient $\frac{xa}{12}$, and everything else is the same in both expressions. In other words, the maximum error bound for $A_\mathrm{mid}$ is half as large as the maximum error bound for $A_\mathrm{vmid}$.
It is important to understand that a bound on absolute error of approximation is not the same as actual absolute approximation error. An error bound says that the absolute approximation error cannot be any more than a certain value. It does not say what the actual error is. 
Reflection 10.1.13. The error bounds for both $A_\mathrm{mid}(a,x,\Delta x)$ and $A_\mathrm{vmid}(a,x,\Delta x)$ contain the term $$\left({\mathrm{max}\atop{a≤t≤x}} \left\dfrac{d^2}{dt^2}r_f(t)\right\right).$$Try to explain two things: (1) How this term means, "the largest value of the second derivative of $r_f(t)$ over the interval $a \le t \le x$", and (2) why the second derivative of $r_f$ matters in determining maximum absolute error.
Reflection 10.1.14. Use techniques from Chapter, 7, Section 3 (Optimization) to compute $\left({\mathrm{max}\atop{a≤t≤x}} \left\dfrac{d^2}{dt^2}r_f(t)\right\right)$ for $r_f$ as defined in Figure 10.1.12. Use this value to compute the maximum relative error of $A_\mathrm{mid}(1,15,0.25)$ as an approximation of $f(1,15)$, where $f(a,x)$ is defined as in Figure 10.1.12. Compare your maximum relative error with the appropriate entry in Figure 10.1.12.
Reflection 10.1.15. Is the maximum relative
error that you computed in Reflection 10.1.14 for
$A_\mathrm{mid}(1,15,\Delta x)$ valid for all values of x from 1 to
15, or only for $x=15$? Explain.
In the prior section we developed the method $A_\mathrm{vmid}$, which used the rate of change that is half way between $r_f$'s values at each end of a $\Delta x$interval as the constant rate of change that we assumed for accumulation as $dx$ varies through each $\Delta x$interval.
We derived the midvelocity method by assuming that $f$, $r_f$'s exact accumulation function has a constant acceleration (2ndorder rate of change) over $\Delta x$intervals. This assumption produced a method that was better than either the left(x) or right(x) methods, but not as good as taking $r_f(\mathrm{mid}(x))$ as the constant rate of change over any $\Delta x$interval containing the value of $x$.
Another method for approximating net accumulation from exact rate of change is to assume that $f$, the exact accumulation function for $r_f$, has a 3rdorder rate of change function (3rd derivative) that is essentially constant over each $\Delta x$interval.
You would be right to ask, "What good does it do to assume that $f$ has a 3rdorder rate of change function that is essentially constant over sufficiently small $\Delta x$intervals?" This assumption implies that $r_f^{(1)}$, f 's 2ndorder rate of change function, is essentially linear over each $\Delta x$intervals and that $r_f$ is essentially quadratic over each $\Delta x$interval. And we know how to compute exact accumulation of a quadratic rate of change function!
Reflection 10.1.16. Explain how assuming
that an exact accumulation f has a 3rdorder rate of change that is
essentially constant over $\Delta x$intervals implies that its
1storder rate of change function is essentially quadratic over the same
$\Delta x$intervals.
An advantage to approximating $r_f$, f 's exact rate of change function, with a quadratic function over an interval is that a quadratic function is more sensitive to how $r_f$ changes over that interval than is a linear approximation to $r_f$. A quadratic approximation to $r_f$ should give us better approximations to the net change in accumulation over an interval than would linear approximations to $r_f$ over that interval.
Another advantage of using a quadratic function to approximate $r_f$ over an interval is that we do not need to assume a constant rate of change over a complete $\Delta x$interval to approximate exact accumulation over that interval. We can approximate exact accumulation over complete $\Delta x$intervals by using integration techniques to compute the exact accumulation of the quadratic rate of change function that approximates $r_f$ over that $\Delta x$interval.
Figure 10.1.13 illustrates the idea of approximating exact rate of change over an interval with a quadratic function over that same interval. The animations in Figure 10.1.13 use a sliding interval instead of a fixed interval to illustrate this approximation technique. This is only to show that the technique works for any arbitrary interval. Move your cursor away from an animation to make its scroll bar disappear.



(a) Quadratic approximation to $r_f$ over intervals of length
2.0. 
(b) Quadratic approximation to $r_f$ over intervals of length 1.0.  (c) Quadratic approximation to $r_f$ over intervals of length 0.5. 
Figure10.1.13. Three approximations to an exact rate of change
function by a quadratic function over an interval of length $\Delta
x$, with $\Delta x=2.0$, $\Delta x=1.0$, and $\Delta x=0.5$. The
intervals slide along the xaxis to illustrate quadratic approximation
over any interval.


(a) Left. Graph of $\color{red}{y=r_\mathrm{quad}(x)}$,
the quadratic approximation to $y=r_f(x)$ over intervals of
length $\Delta x=1.0$. Heavy gray lines show left and right ends
of successive $\Delta x$intervals. Light gray lines show middles
of $\Delta x$intervals. Graph of $\color{red}{y=r_\mathrm{quad}(x)}$
passes through graph of $y=r_f(x)$ at left end, middle, and right
end of each $\Delta x$interval. Right. The
graph, $\color{green}{\text{in green}}$, of the exact
accumulation function from $r_f$ along with the graph of
$\color{red}{A_\mathrm{quad}}$, the approximate accumulation
function. 
(b) Left. Graph of $\color{red}{y=r_\mathrm{quad}(x)}$, the quadratic approximation to $y=r_f(x)$ over intervals of length $\Delta x=0.4$. Heavy gray lines show left and right ends of successive $\Delta x$intervals. Light gray lines show middles of $\Delta x$intervals. Graph of $\color{red}{y=r_\mathrm{quad}(x)}$ passes through graph of $y=r_f(x)$ at left end, middle, and right end of each $\Delta x$interval. Right. The graph, $\color{green}{\text{in green}}$, of the exact accumulation function from $r_f$ along with the graph of $\color{red}{A_\mathrm{quad}}$, the approximate accumulation function. 
Figure10.1.14. (a) Quadratic approximation to $r_f$ with $\Delta x=1.0$. (b) Quadratic approximation to $r_f$ with $\Delta x=0.4.
One thing has remained common among all the methods we examined for approximating values of the exact accumulation function f from its exact rate of change $r_f$. It is that we approximate $r_f$ with a function for which we know how to calculate accumulation over an interval from rate of change over that interval.
Until now, all our methods assumed a constant rate of change over intervals. The different methods (left, mid, right, midvelocity) all yielded a constant rate of change over $\Delta x$intervals, which made it easy to calculate approximate accumulation over every $\Delta x$interval.
The situation with quadratic approximations to $r_f$ over $\Delta x$intervals is a bit different. We will calculate approximate accumulation over an interval by calculating the accumulation due to a rate of change function that is quadratic over that interval.
Let $r_f$ be the exact rate of change function for an exact accumulation function $f$. Let $[a,b]$ be any interval in the domain of $r_f$. The quadratic approximation to $r_f$ over this interval must be such that $r(a)=r_f(a)$, $r\left(\frac{a+b}{2}\right)=r_f\left(\frac{a+b}{2}\right)$, and $r(b)=r_f(b)$. In other words, the graph of the approximate rate function $r$ must pass through the graph of $r_f$ at the left, middle, and end values of $[a,b]$. Then, Reflection 10.1.17. Let $r_f$ be defined
as $r_f(x)=\cos(x)+0.3\sin(10x)$.
$$\Delta x$$  $$A_\mathrm{mid}(2,5,\Delta x)$$  $$A_\mathrm{quad}(2,5,\Delta x)$$  $$\left\dfrac{f(2,5)A_\mathrm{mid}(2,5,\Delta x)}{f(2,5)}\right$$  $$\left\dfrac{f(2,5)A_\mathrm{quad}(2,5,\Delta x)}{f(2,5)}\right$$ 
1.0  
0.5  
0.25  
0.125  
0.0625  
0.03125  
0.0150625  
0.0078125 
Up until now we have compared values of approximate accumulation functions for exact accumulation functions that can be defined in closed form. This allowed us to compare our approximations at specific values of x with values that we could compute directly from the closed form definition of the accumulation function. This allowed us to inspect the accuracy of various approximation methods. Through this approach we determined that the quadratic approximation method is better by far than any of the other methods we inspected.
But the vast majority of accumulation functions that you will meet in applied settings cannot be represented in closed form. A seemingly simple case is $r_f(x)=\sin(3\cos(5x))$. Here is what Wolfram Alpha Pro reports when asked for an antiderivative of $\sin(3\cos(5x))$.
Up until now we compared approximate values of accumulation functions with values calculated from closed form definitions. But in the case of $r_f(x)=\sin(3\cos(5x))$, we do not have a calculated exact value for comparison. What do we compare our approximations with? The answer is, "with each other".
Figure 10.1.18 gives two columns of numbers. The first column contains values of $\Delta x$. The second column contains values (to 12 significant digits) of $A_\mathrm{quad}(1, 3, \Delta x)$, where $A_\mathrm{quad}(1,3,\Delta x)$ is defined in terms of $r_f(x)=\sin(3\cos(5x)$.
Reading Figure 10.1.18 from the top, we see that values of $A_\mathrm{quad}(1,3,\Delta x)$ agree with each other in more decimal places as values of $\Delta x$ become smaller. This is true until $\Delta x$ has a value of 0.001. After that, we see no change. In other words, making $\Delta x$ smaller than 0.001 makes no discernible difference in our approximations of $\int_1^3 r_f(x)dx$. The exact value for $\int_1^3 r_f(x)dx$ seems to be 0.2091763371 to 12 significant digits. It might have more digits, but we don't know them.
It is in this sense that we say that values of $A_\mathrm{quad}(1,3,\Delta x)$ converge to an exact value which we do not know, but which we can state approximately. We will delve further into the idea of convergence in Section 10.2.
Indeed, using the error bounds for quadratic
approximation with $\Delta x=0.001$, and the knowledge that
$$\dfrac{\displaystyle{{\mathrm{max}\atop{a≤t≤x}}}
\left\dfrac{d^4}{dt^4}r_f(t)\right}{180}\approx 176250$$we can say that
for $1\le x \le 3$,
$$\left \int_1^xr_f(t)dtA_\mathrm{quad}(1,x,0.001)\right \le
\frac{x1}{180}\cdot 176250\cdot (0.001)^4\le \frac{31}{180}\cdot
176250\cdot (0.001)^4 \approx 0.00000000009792.$$
Remember that this is an upper bound on approximate accumulation error for any rate of change function that has a maximum fourth derivative of 176250 over the interval $[1,3]$, so it is a conservative bound. Our list of approximations in Figure 10.1.18 suggests that our approximation $\int_1^3(\sin(3\cos(5x))dx\approx 0.209176673371$ is well within that bound.