36 Integration
Anti-derivatives are useful when you know how a quantity is changing but don’t yet know the quantity itself.
It is important, of course, to keep track of which is the “quantity itself” and which is the “rate of increase in that quantity.” This always depends on context and your point of view. It is convenient, then, to set some fixed examples to make it easy to keep track of which quantity is which.
Context | Quantity | Rate of increase in quantity |
---|---|---|
Money | Cash on hand |
Cash flow |
Fuel | Amount in fuel tank |
Fuel consumption rate, e.g. kg/hour |
Motion | Momentum |
Force |
notation | ||
notation |
We will also adopt a convention to make it simpler to recognize which quantity is the “quantity itself” and which is the “rate of increase in that quantity.” We will use CAPITAL LETTERS to name functions that are the quantity itself, and lower-case letters for the rate of increase in that quantity. For example, if talking about motion, an important quantity is momentum and how it changes over time. The momentum itself will be
Notice that we are using the phrase “rate of increase” rather than “rate of change.” that is because we want to keep straight the meaning of the sign of the lower-case function. If
For a business, money coming in means that
The objective of this chapter is to introduce you to the sorts of calculations, and their notations, that let you figure out how much the CAPITAL LETTER quantity has changed over an interval of
The first step in any such calculation is to find or construct the lower-case function
The second step in any such calculation is to compute the anti-derivative of the lower-case function, giving as a result the CAPITAL LETTER function. You’ve already seen the notation for this, e.g.
antiD()
available which will do the job for you.) Later chapters will look at the issues around and techniques for doing the computations by other means.
The remaining steps in such calculations are to work with the CAPITAL LETTER function to compute such things as the amount of that quantity, or the change in that quantity as it is accumulated over an interval of
36.1 Net change
Perhaps it goes without saying, but once you have the CAPITAL LETTER function, e.g.
In this regard,
However, in using and interpreting the
But we have a special purpose in mind when calculating
Instead, the correct use of
Suppose you have already constructed the rate-of-change function for momentum m()
. For instance, m()
is in seconds, and the output is in kg-meters-per-second-squared, which has the correct dimension for force.
You want to find the amount of force accumulated between time
# You've previous constructed m(t)
<- antiD(m(t) ~ t)
M M(5) - M(2)
## [1] -1.392131
To make use of this quantity, you will need to know its dimension and units. For this example, where the dimension [
36.2 The “definite” integral
We have described the process of calculating a net change from the lower-case function
- Construct
. - Evaluate
at two inputs, e.g. , giving a net change, which we will write as .
As a matter of notation, the process of going from
The punctuation
Several names are used to describe the overall process. It is important to become familiar with these.
is called a definite integral of . and are called, respectively, the lower bound of integration and the upper bound of integration, although given the way we draw graphs it might be better to call them the “left” and “right” bounds, rather than lower and upper.- The pair
is called the bounds of integration.
As always, it pays to know what kind of thing is
Remember also an important distinction:
is a function whose output is a quantity. is a quantity, not a function.
Of course,
The use of the term definite integral suggests that there might be something called an indefinite integral, and indeed there is. “Indefinite integral” is just a synonym for “anti-derivative.” In this book we favor the use of anti-derivative because it is too easy to leave off the “indefinite” and confuse an indefinite integral with a definite integral. Also, “anti-derivative” makes it completely clear what is the relationship to “derivative.”
Since 1700, it is common for calculus courses to be organized into two divisions:
- Differential calculus, which is the study of derivatives and their uses.
- Integral calculus, which is the study of anti-derivatives and their uses.
Mathematical notation having been developed for experts rather than for students, very small typographical changes are often used to signal very large changes in meaning. When it comes to anti-differentiation, there are two poles of fixed meaning and then small changes which modify the meaning. The poles are:
- Anti-derivative:
, which is a function whose output is a quantity. - Definite integral
, which is a quantity, plain and simple.
But you will also see some intermediate forms:
, which is a function with input . , which is the same function as in (a) but with the input name being used. , which is a function with input .Less commonly,
which is a function with two inputs, and . The same is true of and similar variations.
36.3 Initial value of the quantity
Recall that we are interested in a real quantity
Still, even if we cannot determine
In other words, just knowing
Let’s develop our understanding of this unknown constant
- Focus first on the top graph. The function we are integrating,
, is known before we carry out the integration, so it is shown in the top graph.
Now look at both graphs, but concentrate just on the arrows in the two graphs. They are always the same: carbon copies of one another.
Finally the bottom graph. We are starting the integral at
. Since nothing has yet been accumulated, the value . From (1) and (2), you know the arrow shows the slope of . So as is being constructed the arrow guides the way. When the slope arrow is positive, is growing. When the slope arrow is negative, is going down.
In tallying up the accumulation of
But what if we knew an actual value for
We only need to know
Another way to state the relationship between the anti-derivative and
In the (fictional) account of the 1690 experiment, we had Galileo release the ball at time
A remarkable feature of integrals is that it does not matter what we use as the lower bound of integration, so long as we set the initial value to correspond to that bound.
36.4 Integrals from bottom to top
The bounds of integration appear in different arrangements. None of these are difficult to derive from the basic forms:
- The relationship between an integral and its corresponding anti-derivative function:
This relationship has a fancy-sounding name: the second fundamental theorem of calculus. - The accumulation from an initial-value
For many modeling situations, and are fixed quantities, so and are also quantities; the output of the anti-derivative function at inputs and . But either the lower-bound or the upper-bound can be input names, as in
Note that
On occasion, you will see forms like
- The accumulation from a time
less than 0 up until 0. - The reverse accumulation from 0 until time
.
Reverse accumulation can be a tricky concept because it violates everyday intuition. Suppose you were harvesting a row of ripe strawberries. You start at the beginning of the row—position zero. Then you move down the row, picking strawberries and placing them in your basket. When you have reached position
But suppose you go the other way, starting with an empty basket at position
This is not to say that there is such a thing as a negative strawberry. Rather, it means that harvesting strawberries is similar to an integral in some ways (accumulation) but not in other ways. In farming, harvesting from 0 to
Another property of integrals is that the interval between bounds of integration can be broken into pieces. For instance:
You can confirm this by noting that
Finally, consider this function of
First, how do we know it is a function of
Second, there is a shortcut for calculating
Since
This complicated-looking identity has a fancy name: the first fundamental theorem of calculus.
36.5 Exercises
Exercise 36.01
As you know,
Here are some definite integrals for which, without stating anything more about the function, we give you the numerical result.
Consider these the facts you have to work with when answering the following questions:
Part A
-8 -42 -24 13
Part B
6 22 -6 -22
Part C
- -3
- 8
- -8
- insufficient information to answer question
Part D
- -3
- 0
- -8
- insufficient information to answer question at t
Part E
6 15 12 3
Part F
-6 22 6 -22
Exercise 36.02
The equation below shows three items, all of which are equivalent even though they look different. You can see this from the equal signs separating the three items.
When you reach the point where you can say, “That’s obvious,” and can write down the three items from memory, you will have achieved an important facility with calculus.
Part A Since the three items are equivalent, they are all the same kind of “thing.” What kind of thing are they?
- a quantity
- a function of
- an interval
- an integration bound
- an anti-derivative
- a constant of integration
The equation has been written in color to help you identify elements that are the same in each of the three items.
Part B Which of the colors stands for a bound of integration?
black blue brown magenta
Part C Which of the colors stands for the derivative of a function that appears elsewhere in the equation?
black blue tan magenta
Part D Which of the colors stands for an anti-derivative of a function that appears elsewhere in the equation?
black blue tan magenta
Exercise 36.03
Remember our conventions for notation:
- Fixed quantities (perhaps with units)
- Symbols: e.g.
, , , , - Examples: 3.2, 4.8 meters, 17 feet/sec
- Symbols: e.g.
- Names of inputs to functions
- Symbols: e.g.
, , , , - Examples: position, time, velocity
- Symbols: e.g.
- Functions of an input
- Symbols: e.g.
, , - Examples: position as a function of time, density as a function of position
- Symbols: e.g.
- Functions evaluated at a specific numerical input
- Symbols: e.g.
, , - Examples: velocity at the finish line, starting position
- Symbols: e.g.
In particular, take care to distinguish between these two kinds of symbolic items:
, which means as a function of , which means the function evaluated at the specific input , producing a quantity (e.g., 3.5 meters/sec.)
A major source of confusion for students is that
is a function , since and are different input names. is a function, the exact same function as in (ii).
With this in mind, turn to our three perspectives on a definite integral
and are numerical constants and are functions of is the function evaluated at the specific input , producing a quantity. Likewise .
Part A What kind of a thing is
a fixed quantity a function of
Part B What kind of a thing is
a quantity a function of
Part C What kind of a thing is
a quantity a function of
Part D According to our notation convention, what kind of a thing is
- a quantity
- a function of both
and - a function of
- a function of
- a definite integral
Part E According to our notation convention, what kind of a thing is
- a number
- a function of both x and u
- a function of
- a function of
- a definite integral
Part F According to our notation convention, what kind of a thing is
- a number
- a function of both x and u
- a function of
- a function of
- a definite integral
Now turn to the entities involved in the so-called “First Fundamental Theorem of Calculus.” (“Fundamental theorem” is a highfalutin way of saying something like, “This isn’t obvious at first glance, and so you should be especially careful to memorize it so that you identify it when you see it.” Another way to state it is, “Every function is the derivative of some anti-derivative.” But you knew that already, since “every function has an anti-derivative.”)
Here are the entities involved, which you will recognize as a slight modification of an earlier statement:
Let’s look at the right-most expression
Part G Which of the following correctly justifies the step
is a constant is an anti-derivative. does not appear.
Taking the left-most and right-most expressions in the above equation, we have
Part H Is there an algebraic simplification of
- No, because it depends on what
is. - Yes, because
is simply . - No, because we could just as easily have written
- Yes, because it is the same thing as
The equation
Exercise 36.04
In the 1660s, John Boyle made use of then-new instrumentation to measure gas pressure. He discovered what’s now called Boyle’s Law, which says that, at constant temperature in a closed system, pressure times volume is a constant:
In the 1720s, Daniel Fahrenheit developed the first reliable thermometer consisting of a column of mercury in a glass straw. He developed a temperature scale which divided the range from freezing to boiling into 180 small units, which he called “degrees,” as was traditional in measuring angles. (In 1742, Anders Celsius created another scale with freezing at 0 and 100 small units—still called “degrees”—between freezing and boiling.
With the availability of reliable thermometers, scientists started to consider the role of temperature in the relationship between pressure and volume. Their many discoveries were eventually synthesized into a “combined gas law” and then into an “ideal gas law” which famously states:
Here,
The “mol” cancels out the dimension of
Part A It is convenient to have specific units in mind for pressure and volume. Since
Part B In the SI units system, volume has units of cubic meters:
For use in calculus, it is helpful to re-write the Ideal Gas Law in functional form. There are several ways to do this. For instance, if we wanted to measure the number of moles of gas in a container, we could use the function
Now consider a very simple machine consisting of a cylinder, closed on one end and sealed by a movable piston at the other, as in this picture.
Source: R. Castelnuovo - Own work, CC BY-SA 3.0
The machine in the picture is more complicated than the simple machine we want to model. The picture includes two small valves at the top of the cylinder connected each to a pipe.
Our machine has no valves and no pipes. The cylinder is charged with gas when it is manufactured. After that, nothing material goes in or out of the closed cylinder/piston system.
When you push on the cylinder, the volume available for the gas gets smaller and the pressure increases. When you let the cylinder push on you, the volume available gets bigger and the pressure decreases. The amount of gas,
And, to simplify even more, let’s insist that the temperature of the cylinder and its gaseous content does not change from room temperature: 293
If you start in a high-volume, low-pressure state and push the piston to move to a low-volume, high-pressure state at the same temperature, you will be putting energy into the machine.
The “area” of each little box in the graph, that is, pressure times volume,
Part C How much energy (in Joules) corresponds to one small rectangle of area in the graph?
500 J 625 J 2500 J 25,000 J
Part D By counting rectangles in the graph, estimate how much energy needs to be put into the machine when the volume changes from 7.5 m
1000 J 3000 J 5000 J 10,000 J
Now that you have compressed the gas in the cylinder, by doing work on it, let’s heat up the machine to 1200K.
Part E What will be the pressure of the gas when the volume of the machine is 2.5 m
1000 2000 3000 4000
Part F Starting with the machine at 1200K and a volume of 2.5 m
about 5000 J about 10,000 J about 50,000 J about 100,000 J
The net work done by the machine in completing the cycle, shifting from compression at low temperature to expansion at high temperature, is the difference between the energy put out by the machine when expanding and the energy put into the machine to compress the gas. Such a machine is called a “heat engine” since it turns a source of high temperature and a source of low temperature into energy.
In a SANDBOX, evaluate the code below. The first line defines a function compress_energy
.
Similarly, calculate the energy done by the machine in the high-temperature expansion expand_energy
.
You may want to make a graph of your
<- makeFun( n*8.314*T/V ~ V + T, n=1)
P <- makeFun(n*8.314*T*log(V) ~ V + T, n=1)
antiP
<- ... evaluate antiP appropriately
compress_energy <- ... ditto
expand_energy # prints out the values
compress_energy expand_energy
Exercise 36.05
The function windspeed(t)
records wind speed at the site of a wind-turbine farm over one day, that is, speed2power(s)
is the production function for the model of wind turbine used at the farm: the input is speed in miles per hour, the output is in kilowatts. (Both these functions were created for this exercise. They are not about a real turbine at a real wind farm, but are somewhat realistic.) Hint: you can nest a function inside of another function. For instance, if I had a function (‘solarpanelpower’) that calculates the amount of power a solar panel generates and another function (‘sunlight’) that tells me the amount of sunlight at time of the day (‘TOD’). I could evaluate this in one step like the following: ‘solarpanelpower(sunlight(TOD))’. This would give me the amount of power from the solar panel based upon the time of the day.
Your task, find the total energy generated over the 24-hour period by the turbine. Reminder: energy
We don’t have an algebraic formula for windspeed(t)
even though it is a function. You can use antiD()
to find the anti-derivative of the electric power function.
The answer you compute should be saved to the name result
. The units will be in kWh – kilowatt hours.
# ignore these definitions. They are setting up the
# functions for you to use
<- rfun(~ t, seed=982)
tmp <- rfun(~ t, seed = 2932)
tmp2 <- rfun(~ t, seed = 43)
tmp3 <- function(t) {
windspeed abs(tmp((t - 5)*3) + tmp2((t - 10)*2) + tmp3((t - 15)*4))
}<- function(s) {
speed2power pmin(ifelse(s < 5, 0, (s-2)^3), 5000)
}
#Your work starts here
slice_plot(windspeed(t) ~ t, bounds(t=c(0, 24)))
# # Uncomment the next lines as you figure out how to fill in the "...blanks..."
# antid_of_power <- antiD( ....power_function_here(t)... ~ t)
# result <- antid_of_power(...night...) - antid_of_power(...morning...)
# result # this prints out the result
Part A Wind turbines of this type have a maximum power rating of 5000 kilowatts. Was this rating exceeded at any point during the day?
- The maximum instantaneous power was about 3500 kilowatts
- The maximum instantaneous power was about 1100 kilowatts
- That threshold was reached about 9 AM
- That threshold was exceeded about 8 AM
- The maximum instantaneous power cannot be determined from the information given.
Part B At the maximum power rating of 5000 kilowatts, what’s the theoretical maximum amount of energy produced by the turbine over a 24-hour day?
- 5000 * 24 kilowatt-hours
- 5000 / 24 kilowatt-hours
- 5000 kilowatts
- Can’t be determined from the information given.
Part C About what fraction of the theoretical maximum energy did the wind turbine generate over the 24-hour period?
- About 2.5%
- About 10%
- About 25%
- About 50%
- Can’t be determined from the information given.
Part D A peak time for residential energy consumption is from 7 am to 9 am. The price at which you can sell electrical energy to the grid operator is $0.09 per kilowatt-hour. At that price, how much would the energy produced from 7-9 am be worth?
About 20 cents. About $150 About $350 About $650
Part E What’s the average wind speed over the 24-hour period?
About 5 mph About 7 mph About 9 mph
Part F Wind speed fluctuates a lot, but imagine that the wind blew steadily at the average wind speed from the previous problem. How much energy would be generated over the 24-hour period?
- 0 kilowatt hours
- 500 kilowatt hours
- 1000 kilowatt hours
- 10,000 kilowatt hours
Exercise 36.06
The (so-called) “First Fundamental Theorem of Calculus” says:
Part A Consider this new quantity:
Exercise 36.07
Your house has solar panels on the roof. In sunshine, these generate power. You use some of that power immediately for cooking, lighting, and such. Any power generated above your needs gets stored in a battery. Any power used above the solar generation gets supplied by the battery.
Over the course of a day, your use of power fluctuates (you use the toaster, open the refrigerator, etc). Similarly, the solar generation fluctuates as clouds pass by and the sun rises and sets in the sky. The amount of energy stored in the battery fluctuates over the day as you consume energy in your home and produce it with the solar panels.
The unit used for electrical power is a “kilowatt” (kW). An old-fashioned incandescent light bulb consumes about 0.1 kW while lighted, a modern LED bulb generates about the same amount of light using only 0.01 kW. A refrigerator uses about 0.1 kW while a hair-dryer uses about 1 kW when it is running.
Batteries store energy. The usual unit for energy is “kilowatt-hour” (kWh). A refrigerator will, over a 24-hour day, use 0.1 * 24 = 2.4 kWh. Power multiplied by time duration gives energy. If the power were constant, the energy could be calculated by a simple multiplication of the power over the duration. Since power fluctuates, we cannot do the calculation with ordinary multiplication. Instead, we have to integrate power over time.
For this activity, use the “Solar-panels” App.
Add picture/link to app.
Part A Why is it called “net production” instead of just “production?”
- Because your house is connected to the utility electrical network in case you need extra power.
- Because the system designer is something of a poet and wants you to think of the solar cells as a kind of fishing net harvesting photons.
- Because the government will send you surplus hair nets to thank you for reducing CO2 production.
- Because it is not simply production from the solar panels but production minus consumption (the solar panels require energy to run). If you ignored consumption, you would call it “gross energy produced.”
Part B The bottom graph shows energy accumulated in the battery since midnight. What does it mean that the energy accumulated is negative?
- The battery level is lower throughout the day than it was at midnight.
- The battery is discharging over the entire day.
- The sign is not important.
Part C During the interval from 05:00 to 20:00, how much did the energy stored by the battery change? Highlight that interval in the beeps graph.
-2.5 kWh 1.9 kW 15 hours 1.5 kWh
Part D Suppose the battery was holding 20 kWh at 00:00. How much energy was it holding at 15:00?
-2 kWh 18 kWh 20 kWh 24 kWh
Part E When you choose a time interval in the beep graph, how come the energy stored (in kWh) is displayed as an area in the top graph? Keep in mind that the vertical scale of the top graph is kW, not kWh.
- It is pretty.
- To highlight visually the interval that was selected.
- To convert kW to kWh, we are effectively multiplying the power (kW) by the time duration. Power is on the vertical axis, time duration is on the horizontal axis. Multiplying the two corresponds to the area under the graph.
Part F How come two different colors are used to display the “area” under the net power curve?
- The second derivative of the anti-derivative of
is equal to . - No reason related to calculus per se. We like to make graphs pretty.
- Because it is not simply “area.” it is the product of net power and time duration, and sometimes this quantity is negative. The color indicates whether the quantity is positive or negative at any instant.
Exercise 36.08
Suppose the continuous function
Mark each statement as True or False.
Part A
True False
Part B
True False
Part C
True False
Part D
True False
Part E
True False
Part F
True False
Exercise 36.09
Part A Which of the following is NOT equivalent to
Exercise 36.10
Part A Find the antiderivative
Part B Find the antiderivative
Part C Find the value of
Part D What is the approximate value of
Problem with Accumulation Exercises/buck-forgive-canoe.Rmd
Problem with Accumulation Exercises/horse-drive-futon.Rmd
Momentum is velocity times mass. Newton’s Second Law of Motion stipulates that force equals the rate of change of momentum.↩︎