Matheno - Learn Well and Excel

B.5 Lab 1 Activity: Approximate & Bound Error of df/dx

We assume that you have completed the “Lab 1: Introduction” on the preceding screen. If you have not, please do so now in order to understand the steps below.


As we proceed through the activities below, please keep in mind that computing the slope of the secant line is the same as calculating the average rate of change for the interval of interest.
Title text: Computing Average Rate of Change. Graph of y = f(x) versus x, with the points (a, f(a)) and (b, f(b)) labelled, and a secant line passes through them. Text says: average rate of change = f(b) - f(a), divided by b - a, which equals the slope of the line that passes through the interval's initial and final points. Text at the bottom says: Graphically, finding the average rate of change on the interval [a, b] means computing the slope of the secant line that passes through the interval's initial and final points.


 
This lab is based on work done by the CLEAR Calculus Project at Oklahoma State University.
From the Project’s website: “Project CLEAR Calculus is a research-based effort to make calculus conceptually accessible to more students while simultaneously increasing the coherence, rigor, and applicability of the content learned in the courses.”
We at Matheno appreciate the work CLEAR Calculus has done to help students learn Calculus better, and are happy to build off of their efforts.

As a reminder, at the end of Lab 1 Introduction on the preceding screen we summarized the work of the lab through using Oerhtman’s Five Questions for Approximations: [Ref]
Show/Hide Five Questions for Approximations as used in this Lab

1. What are you approximating?
We are approximating the instantaneous rate of change $\left. \dfrac{df}{dx} \right|_{x=1}$ for $f(x) = 2^x,$ which
equals the slope of the tangent line to the curve $y=f(x)$ at $x=1.$

2. What are the approximations?
To approximate the instantaneous rate of change, we use the average rates of change for the function over an interval that starts or ends with $x_1 =1.$
\[\text{average rate of change}_{[x_1,\, x_2]} = \text{slope of line segment} = \frac{\color{purple}{\Delta
y}}{\color{green}{\Delta x}} = \frac{\color{purple}{f(x_2)\,-\, f(x_1)}}{\color{green}{x_2\, -\, x_1}}
\] If we take the other endpoint of the interval to the right of $x=1$ (so $x_2 \gt 1$), then we obtain an overestimate. And if we take the other endpoint to the left of $x=1$ (so $x_2
\lt 1$), then we obtain an underestimate.

3. What are the errors?
The error in a given approximation is the difference between the instantaneous rate of change $\left. \dfrac{df}{dx} \right|_{x=1}$ and our current estimates of the average rate of change. Above, we determined that

\[0.79202823 \le \left. \dfrac{df}{dx} \right|_{x=1} \le 1.65685425 \]

Hence the size (absolute value) of our current error for the underestimate and the error for our overestimate are
\begin{align*}
\text{current error for the underestimate } &= \left| \overbrace{\left( \left. \frac{df}{dx} \right|_{x=1}\right)}^\text{true value}\, -\, \overbrace{0.79202823}^\text{our underestimate}\right| \\[8px] \text{current error for the overestimate } &= \quad\left| \overbrace{\left( \left. \frac{df}{dx} \right|_{x=1}\right)}^\text{true value}\, -\, \overbrace{1.65685425}^\text{our overestimate}\right|
\end{align*}
Note that we do not know the exact value of either of those errors; if we did, we would know the value of $\left. \frac{df}{dx} \right|_{x=1}$ itself!

More generally, for any average rate of change we compute as an estimate, the size (absolute value) of the error is
\[\text{error } = \left|\left( \left. \frac{df}{dx} \right|_{x=1}\right)\, -\, \dfrac{\color{purple}{f(x_2)\,-\,f(x_1)}}{\color{green}{x_2\, -\, x_1}}\right| \] 4. What is the bound on the size of the errors?
While we don’t know the size of either of the errors, we do know that they can be no larger than the overall error bound we found above, which is the difference between the overestimate value and the underestimate value. Currently that error bound value is

\begin{align*}
\text{error bound} &= 1.65685425 – 0.79202823 \\[8px] &= 0.86482602
\end{align*}

Hence we know

$\left| \left( \left. \frac{df}{dx} \right|_{x=1}\right) – 0.79202823\right| \le 0.86482602 \quad$ and $\quad\left|
\left( \left. \frac{df}{dx} \right|_{x=1}\right) – 1.65685425\right| \le 0.86482602$

5. How can the error be made smaller than any predetermined bound?
If we want a smaller error bound, we simply shrink the size of the interval $\left[x_1, x_2 \right]$ over which we compute the average rate of change. We will take this very approach below.

[collapse]

Let’s continue from where we left off on the preceding screen and collect more data. We’ve already included the data from that previous screen here so you don’t have to re-do those first entries.


Part I: Estimate from the right

The graph below is the same as that on the preceding screen, except you now control the value of $x_2$ and hence the size of the interval we’re examining. Here in Part I, we require $x_2 \gt x_1 (=1)$ so we know we’re currently generating only overestimates of $\left. \frac{df}{dx} \right|_{x=1}.$

Start by moving $x_2$ to be closer to $x_1.$ Then click the box underneath the graph “to use the selected interval and calculate the line segment’s slope value.” Make sure the resulting calculation makes sense to you.

Then when you’re ready, add the resulting data to your table with the “Add data to table” button.

You can then change the value of $x_2$ and add more data, or continue to the next part. You can return to this calculator and add more data whenever you’d like.

Graph of $y=f(x)$ versus x

Data Collection for Slope of Line Segments
Data Point$(x_2, y_2)$$\Delta x$Average Rate of Change over Interval
= Line Segment’s Slope:

$\dfrac{\Delta y}{\Delta x} = \dfrac{f(x_2)\, -\, f(1)}{x_2\, -\, 1}$

1(2.2, 4.59479342)1.22.16232785
2(1.5, 2.82842712)0.51.65685425

After you’ve collected some data, you can use the “Sort data” button above so that your smallest interval $\Delta x$ is at the bottom of the table. The value for the Average Rate of Change for that smallest interval, in the last row, is your (current) best estimate for $\left. \dfrac{df}{dx} \right|_{x=1},$ and we will use this value – the one from the bottom row – later in “Part III: Bounding the error.”


Part II: Develop a lower bound for the estimate (estimate from the left)

Proceed as you did before — now with the second “free end” point of the line segment constrained to values less than 1, so we’re shrinking our interval from the left.

Graph of $y=f(x)$ versus x

Data Collection for Slope of Line Segments
Data Point$(x_2, y_2)$$\Delta x$Average Rate of Change over Interval
= Line Segment’s Slope:

$\dfrac{\Delta y}{\Delta x} = \dfrac{f(x_2)\, -\, f(1)}{x_2\, -\, 1}$

1(-0.8, 0.57434918)-1.80.79202823

After you’ve collected some data, you can use the “Sort data” button above so that your smallest interval $\Delta x$ is at the bottom of the table. The value for the Average Rate of Change for that smallest interval, in the last row, is your (current) best estimate for $\left. \dfrac{df}{dx} \right|_{x=1},$ and we will use this value – the one from the bottom row – next in “Part III: Bounding the error.”


Part III: Bounding the error

We explained what this graph shows on the preceding screen .

Sample Upper & Lower Bounds for the Instantaneous Rate of Change at x = 1

Conclusion

[Concluding text will appear here after you’ve determined the value
of $\left. \dfrac{df}{dx} \right|_{x=1}$ within the desired error bound.]


The upshot

  1. A function’s average rate of change over an interval is equal to the slope of the secant line that passes through the endpoints of the interval:
    \[\text{average rate of change}_{[x_1,\, x_2]} = \text{slope of line segment} = \frac{\color{purple}{\Delta
    y}}{\color{green}{\Delta x}} = \frac{\color{purple}{f(x_2)- f(x_1)}}{\color{green}{x_2\, -\, x_1}}\]
  2. You can make the average rate of change arbitrarily close to the instantaneous rate of change at $x_1$ by making $x_2$ sufficiently close to $x_1$ (and hence $\Delta x$ sufficiently small).


These points raise a natural question that led to the development of Calculus itself:

How small can we make $\Delta x$??

We know it can’t be exactly zero, because we can’t divide by zero in the slope calculation.
So how small can we make it?

We will take up this key question – arguably THE key question – when we explore THE key tool in Calculus in the next Chapter, on “Limits”.



Reference for Oehrtman’s Five Questions: Oehrtman, M. (2008). Layers of abstraction: Theory and design for the instruction of limit concepts. In M. P. Carlson & C. Rasmussen (Eds.), Making the Connection: Research and Teaching in Undergraduate Mathematics Education, (MAA Notes, Vol. 73, pp. 65-80). Washington, DC: Mathematical Association of America.