Matheno - Learn Well and Excel

B.4 Lab 1 Introduction: Approximate & Bound Error for df/dx

On this screen we’ll introduce this lab activity, designed so you can use some of the key ideas in Calculus for yourself before we develop them more formally. We’ll continue to improve our approximation of df/dx for a given function at a particular point, now with the addition of quantifying our error bound so we know how accurate our approximation is. We’ll also see how we can decrease our error to within a given tolerance. Cool stuff!


Quick Recap

So far in this Section on average rates of change, we have been considering intervals of whatever size we wish.

To end this Section, and Chapter, let’s return now to the fundamental challenge of the previous Section, and actually of all of Calculus: how do we determine $\left. \dfrac{df}{dx} \right|_{x=a},$ the function f‘s instantaneous rate of change at $x=a?$

As you’ll recall from that Section, we obtained successively better approximations to a function’s instantaneous rate of change by anchoring the first point of the secant line at the point of interest, and then moving the second, “free” end of the secant line closer and closer to that point, thereby shrinking the interval. As we shrunk that interval, the resulting slopes gave us better and better approximations to the function’s instantaneous rate of change at the point 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.Now that we have the concept of “average rate of change,” we can be more systematic about our approach. Specifically, recall that the average rate of change for a function over an interval equals the slope of the secant line that passes through the initial and final points of that interval.

Hence, computing the slope of the secant line is the same as calculating the average rate of change.
 

This screen is essentially set-up; the next screen has full functionality.
We’re now going to work through our first “lab,” in which we’ll systematically determine the instantaneous rate of change for a particular function, $f(x) = 2^x,$ at $x=1,$ by considering the average rate of change of the function for various intervals around that point. On this screen we’ll introduce the systematic steps you’ll use, and then on the following screen you’ll cycle through those steps to reach whatever level of accuracy you would like. The steps we’ll use lie at the heart of Calculus, and we will return to them again and again.
Why two whole screens on this lab?!? Show/Hide our quick answer.

Why are we doing so much with all of this here?!?

The answer is simple: because it’s all that important.

Essentially: We’re building up to the Definition of the Derivative, which is one of two fundamental pillars in Calculus. And that definition (along with that of the Integral, the other pillar) relies entirely on the notion of “the limit,” which actually underlies all of Calculus.

You’ll be in a much better position to understand both what a limit is, and why it is so foundational in Calculus, if you have bumped up against the mathematical problem it solves for us — indeed, why without it, the entire field of Calculus wouldn’t exist!

To help you develop your understanding of the limit, we’re going to build heavily on the work we’re doing in this Lab, particularly the idea that we can estimate a value to within whatever error tolerance we choose.

Additionally, as a practical matter, when working in data science (or “data analytics”) you often don’t have the expression for a function (like $f(x) = x^2$ or something), and so must instead rely on being able to manipulate the data to draw the conclusions you need, including being able to quantify the answer to “how confident are we in this result?”. The approach we’re using here is entirely applicable in that realm as well.

[collapse]

You’ll notice throughout the lab a light lab-notebook-type grid behind everything. This background is meant to remind you that we’re exploring a single context throughout these activities.


Lab 1.1, Introduction: Estimate $\left. \dfrac{df}{dx} \right|_{x=1}$ for $f(x) = 2^x$

 

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.

On this screen we’re going to work through some initial, sample data to illustrate the lab’s procedure. Then on the next screen you’ll have full-functionality to collect data of your choosing.

Part I: Estimate from the right

The interactive Desmos graph below shows the graph of our function of interest, $f(x)=2^x.$ Our goal is to estimate the function’s instantaneous rate of change at $x=1,$ $\left. \dfrac{df}{dx} \right|_{x=1}.$ As before, we have anchored the left point of the secant line at the point of interest: $x_1 = 1,$ and $y_1 = f(x_1) = 2^1 = 2.$

One big change from the estimates we did in the preceding section is that we are now anchoring the second “free end” of the secant line to the curve, rather than having you try to place that point as close to the curve as you could manage. That is, for every $x_2$ value we’ll automatically calculate the corresponding y-value: $y_2 = f(x_2).$ The point $(x_2, y_2)$ thus lies on the function’s curve.

On this screen we will set some sample values of $x_2$ to illustrate the steps you’re going to take, and thus get your data collection underway. Then on the next screen you’ll be able to set $x_2$ to whatever you’d like to continue your investigation, and we’ll save you some work and continue to automatically calculate $y_2 = f(x_2)$ for you.

FIRST DATA POINT:
The first $x_2$ value we’ve set is $x_2 = 2.2.$ The corresponding y-value is
\[f(2.2) = 2^{2.2} = 4.59479342\] and so the current point ($x_2,\, y_2)$ is $(2.2, 4.59479342),$ as you can see in the graph below. Note that Desmos displays the point’s y-value with fewer digits on the graph, $y_2 = 4.595.$ We’ll keep more digits in our record-keeping and calculations than Desmos may display.

Now, please check the box below the graph “to use the selected interval and calculate the line segment’s slope value.”

Then, once you’ve made sense of the calculation that’s shown, click the “Add data to table” button. This value of the average rate of change for this first interval is your first estimate of $\left. \dfrac{df}{dx} \right|_{x=1},$ albeit not a very good one, and we don’t yet have an error bound. Still, it’s a start!

Graph of $y=f(x)$ versus x
(The points on this graph are not movable.)

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

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


Part II: Underestimate or Overestimate?

Notice that both of our values for $x_2$ were to the right of our point of interest, $x_1 = 1:$ Our first data set had $x_2 = 2.2,$ while our second data set had $x_2 = 1.5.$

Looking at the graph for the function, do you think the computed average rates of change for the sample intervals in Part I are an underestimate of the function’s instantaneous rate of change at $=1,$ or an overestimate? What’s your reasoning?

Show/Hide Hint
We will obtain better and better estimates for the instantaneous rate of change as we slide the second point closer and closer to the left, toward $x_1 = 1.$ As we do so, will the slope of the resulting secant line increase, or decrease?
[collapse]

The function's graph curves upward as you move to the right. Is the slope of the secant line through the points (1,2) and (1.5, 2.828) an overestimate or underestimate to df/dx at x = 1?

Tap on your answer below:


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

We’ve reproduced the graph and slope-calculator from above — but now the second “free end” point of the line segment is to the left of $x_1=1.$ In particular, for this sample data collection we have set the value $x_2 = -0.8$. From the reasoning of the animation above, we know that the resulting secant line’s slope is an underestimate of the instantaneous rate of change at $x=1.$

Since we know we are now collecting data that produce estimated values that are less than the function’s instantaneous rate of change, we’ll put the new information in a different table.

Proceed as you did in Part 1 above and, after you’ve made sense of the slope calculation, add this initial data to the new table below.

Graph of $y=f(x)$ versus x
(The points on this graph are not movable.)

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

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


Part IV: The Error Bound

The graph below intially shows sample data; we’ll update it with your data in a minute. But first let’s understand what the graph shows:

The green line, with the larger slope, shows a possible result from Part I above, with the line-segment now extended to a full-line. Its slope thus represents an overestimate of $\left. \dfrac{df}{dx} \right|_{x=1}.$

The blue line, with the shallower slope, shows a possible result from Part III above. Its slope thus represents an underestimate of $\left. \dfrac{df}{dx} \right|_{x=1}.$

If you’d like, you can check the box to “Show instantaneous rate (orange tangent line),” which has slope equal to the function’s true value of $\left. \dfrac{df}{dx} \right|_{x=1}.$ At this point in the course we don’t know how to calculate this true-value yet, and so we’re providing this line merely for comparison purposes.

You can also choose to see the function’s curve with “Show $f(x) = 2^x$ (light grey line).” By doing so, you can see how the orange tangent line just grazes the curve at $x=1.$ You can also see, by contrast, how the blue lower-bound secant line intersects the function’s grey curve at two points. The green upper-bound secant line also intersects the curve at two points.

Once you understand what the graph shows, please proceed to. . .

Update the graph with my data
When you’re ready, click the “Show my error bounds” button beneath the graph. This action will update the slope of the green line with the value from the bottom row of your Data Table I above, showing your current upper-bound estimate for the instanteous rate of change. Simultaneously it will update the slope of the blue line with the value from your Data Table II above, showing your current lower-bound estimate. You’ll see some additional a summary of your current estimates below the graph as well.

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


Conclusion to this introduction

[A conclusion will appear here when you have completed the parts above.]


Overview of the approximation process

Before we leave this screen, let’s summarize the approximation process we are using — especially since, as we said, we’ll use variations of this process at crucial places several times in this course. We’re going to use the framework developed by Michael Oerhtman of the CLEAR Calculus Project [Ref]. It consists of these five questions:


Oerhtman’s Five Questions for Approximations [Ref]
  1. What are you approximating?
  2. What are the approximations?
  3. What are the errors?
  4. What is the bound on the size of the errors?
  5. How can the error be made smaller than any predetermined bound?


In this lab, the answers to those questions are:
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$ (the orange tangent line in the graph immediately above).

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 (the slope of the blue secant line in the graph above). And if we take the other endpoint to the left of $x=1$ (so $x_2 \lt 1$), then we obtain an underestimate (the slope of the green secant line in the graph above).

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 on the next screen.

Please proceed when you’re ready.



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.


Buy us a coffee We're working to add more,
and would appreciate your help
to keep going! 😊

We'd appreciate your feedback! 😊
How helpful?

What are your thoughts or questions?

Subscribe
I'd like to be
0 Comments
newest
oldest most voted
Inline Feedbacks
View all comments