chapter eight

8 Understanding Rates of Change

 

This chapter covers

  • Calculating the average rate of change in a function
  • Approximating the instantaneous rate of change of a function at a point
  • Picturing how the rate of change in a function is itself changing
  • Reconstructing a function from its rate of change

In Part 2 of this book, we’re going to embark on an overview of calculus.  Broadly speaking, calculus is the study of continuous change, so we’ll be talking a lot about how to measure rates of change of different quantities, and what these rates of change can tell us.  

In this chapter, I’ll introduce you to two of the most important concepts from calculus: the derivative and the integral.  Both of these are operations that work with functions.  The derivative takes a function and tells you its rate of change.  The integral does the opposite, taking a function giving a rate of change and reconstructing the original function.

I’ll focus on a simple example from my own work in data analysis for oil production.  The set up we’ll picture is a pump lifting crude oil out of a well, which then flows through a pipe into a tank.  The pipe is equipped with a meter that continuously measures the rate of fluid flow, and the tank is equipped with a sensor that detects the height of fluid in the tank, and reports the volume of oil stored within it.

Figure: Schematic diagram of a pump lifting oil from a well and pumping it into a tank.

8.1   Calculating average flow rates from volumes

8.1.1    Implementing an average_flow_rate function

8.1.2   Picturing the average flow rate with a secant line

8.1.3   Negative rates of change

8.1.4   Exercises

8.2   Plotting the average flow rate over time

8.2.1   Finding the average flow rate in different time intervals

8.2.2   Plotting the interval flow rates alongside the flow rate function

8.2.3   Exercises

8.3   Approximating instantaneous flow rates

8.3.1   Finding the slope of very small secant lines

8.3.2   Building the instantaneous flow rate function

8.3.3   Currying and plotting the instantaneous flow rate function

8.3.4   Exercises

8.4   Approximating the change in volume

8.4.1   Finding the change in volume on a short time interval

8.4.2   Breaking up time into small intervals

8.4.3   Picturing the volume change on the flow rate graph

8.4.4   Exercises

8.5   Plotting the volume over time

8.5.1   Finding the volume over time

8.5.2   Picturing Riemann sums for the volume function

8.5.3   Improving the approximation