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!

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.

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. Why two whole screens on this lab?!? Show/Hide our quick answer.

“

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.

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.

CLEAR Calculus Project at Oklahoma State University.

From the Project’s website:

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.

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.

The first $x_2$ value we’ve set is $x_2 = 2.2.$ The corresponding

\[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

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.)

(The points on this graph are not movable.)

\[\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}}\]

You are currently using the interval with $(x_1, y_1) = (1, 2)$ and $(x_2, y_2) = $ $(2.2, 4.59479342)$.

The slope of the line segment that passes through your interval’s end-points, and hence the average rate of change for this interval, is:

$\dfrac{\color{purple}{\Delta y}}{\color{green}{\Delta x}}$ = $\dfrac{\color{purple}{4.59479342\,-\,2}}{\color{green}{2.2\, -\, 1}} = \dfrac{\color{purple}{2.59479342}}{\color{green}{1.2}}=\color{blue}{2.16232785}$

See the table below: you’ve added your first row of data.

See the table below: you’ve added your second row of data.

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}$ |
---|

Now that you’ve added your first data row, tap the button to create a second data point with the value $x_2 = 1.5.$

Perfect. Now that you’ve seen how to calculate the average rate of change for an interval and add the resulting data to a table, please continue to Part II immediately below.

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]

Tap on your answer below:

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.)

(The points on this graph are not movable.)

You are using the interval with $(x_1, y_1) = (1, 2)$ and $(x_2, y_2)$ = $(-0.80, 0.57434918)$.

The slope of the line segment that passes through the interval’s end-points,

and hence the average rate of change for this interval, is:

$\dfrac{\color{purple}{\Delta

y}}{\color{green}{\Delta x}}$ = $\dfrac{\color{purple}{0.57434918\, -\, 2}}{\color{green}{-0.80\, -\, 1}} = \dfrac{\color{purple}{-1.42565082}}{\color{green}{-1.80}}= \color{blue}{0.79202823}$

Data Point | $(x_2, y_2)$ | $\Delta x = x_2\, – \,x_1$ | Average Rate of Change over Interval = Line Segment’s Slope: $\dfrac{\Delta |
---|

You’ve added the first row to your new data table here. We won’t add a second one now; instead, on the next screen you’ll be able to add as much data as you’d like.

Please continue to the final part of this lab’s procedure, immediately below.

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

You have bounded the instantaneous rate of change such that we now know it lies in the range

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

We know that the actual value lies between those two values (or is equal to one of them).

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

We know that the actual value lies between those two values (or is equal to one of them).

Said differently, the size of your current **error bound**, the difference between the largest and smallest possible values, is

\begin{align*}

\text{error bound} &= 0.456 – 0.123 \\[8px]
&= 0.333

\end{align*}

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

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:

- What are you approximating?
- What are the approximations?
- What are the errors?
- What is the bound on the size of the errors?
- How can the error be made smaller than any predetermined bound?

In this lab, the answers to those questions are:

1.

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*}

\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.

You can support our work with a cup of coffee

We're a small, self-funded team on a mission to provide high-quality, helpful materials to anyone working to learn Calculus well. We provide this site **ad-free**(!), and **we do not sell your data** to anyone. We’ve spent thousands of hours crafting everything that's here, and with your help, we can keep growing and offer more!

If we've saved you some time, or you've found our materials useful, please consider giving *whatever amount feels right to you.* This can take less than 60 seconds, and *anything* you give helps . . . and if you can contribute a little more, that allows us to continue to provide for those with less.

We thank you in advance for whatever you choose to give.

Other payment options

(including Google Pay and Apple Pay)

(including Google Pay and Apple Pay)

Payment information is completely secure and never touches our servers.

Thank you! ❤️