Domain of a Differential Equation

A reader recently asked me to do a post answering some questions about differential equations:

The 2016 AP Calculus course description now includes a new statement about domain restrictions for the solutions of differential equations. Specifically, EK 3.5A3 states “Solutions to differential equations may be subject to domain restrictions.” [The current 2020 CED uses the same wording in Essential Knowledge statement FUN-7.E.3] Could you write a blog post discussing (1) an example of how to determine the domain restriction; (2) speculating on whether one of the points for the differential equation on the free response will be allotted for specifying the restriction; and (3) speculating whether this concept could appear on the multiple choice and if so how.

First, let me compliment him on noticing EK 3.5A3. I overlooked it and have not seen anyone pick up on this yet. It seems to be a new item in the course description. Don’t panic. In the current 2020 CED EK FUN-7.E.3 says

A single question asking for the domain and range was asked before, but some time ago. Specifically, 2000 AB6 and 2006 AB 5 asked for the domain of the solution of a differential equation (see below for both). These are the only instances I can find that required students to find the domain of the solution. 

Since 2008 many of the scoring standards included the domain, but they were not required to earn any points. These are discussed below. The domains were included in the solution, I suspect, because the standards are made public, and the readers want to publish the most complete answer.

What is required of the domain?

The generally accepted requirements are that the solution of a differential equation must be a function whose domain (1) must be an open interval, (2) on which the differential equation is true, and (3) contains the initial condition. Comments:

  • The interval must be open since derivatives are not defined at the endpoints of intervals. The derivative is a two-sided limit and at an endpoint you can only approach from one side. While one-sided derivatives may be defined, they are a more burdensome requirement and not necessary.
  • Practically speaking, this means that the solution may not cross a vertical asymptote or go through a point where the function is undefined; it must stay on the side where the initial condition is.
  • The differential equation must be true in the sense that substituting the solution and its derivative(s) into the differential equation must result in an identity. (See 2007 AB 4(b) for practice).
  • And of course, the initial condition point’s x-coordinate must be in the domain.

Teachers sometimes ask why we cannot just skip over an asymptote or an undefined point. When you do this, you are then working with a piecewise function. No problems there, but consider that on the piece(s) outside the domain as described above, you could have any function you want and still meet the three requirements above.

Finding the domain.

Here are some examples. Notice that the differential equation, its solution, and the initial condition all come into consideration.

2000 AB 6: After finding the solution y=\frac{1}{2}\ln \left( 2{{x}^{3}}+e \right), finding the domain is a pre-calculus question, requiring one to solve the simple inequality 2{{x}^{3}}+e>0. The domain is \displaystyle x>\sqrt[3]{\frac{-e}{2}}.

2006 AB 5: Will be discussed below in answer to another question he asked.

2008 AB 5: The differential equation is undefined at x = 0 and the initial condition is to the right of this. So, the domain is all positive numbers.

2011 AB5/BC5: The domain is given in the stem; Time starts now and the differential equation applies “for the next 20 years”, so, 0 < x < 20

2013 AB 6: The solution is y=-\ln \left( -{{x}^{3}}+3{{x}^{2}}-1 \right), So the domain is all x such that x = 1 (the initial condition) and for which -{{x}^{3}}+3{{x}^{2}}-1>0. No further simplification was given. By graphing calculator the range is about 0.65270<x<2.89739.

2013 BC 5: The solution, \displaystyle y=-\frac{1}{{{\left( x+1 \right)}^{2}}}, contains a vertical asymptote at x = –1. Since the initial condition is (0, –1) the domain is x > –1; the side of the asymptote containing the initial condition.

2014 AB 6: Neither the equation, nor the solution, \displaystyle y=3-2{{e}^{-\sin \left( x \right)}}, has any values for which x is undefined; so, the domain is all real numbers.

2016 AB 4: The differential equation is \displaystyle \frac{dy}{dx}=\frac{{{y}^{2}}}{x-1} with f(2) = 3. The solution \displaystyle y=\frac{1}{\tfrac{1}{3}-\ln \left( x-1 \right)}, has a vertical asymptote where the denominator is 0, namely x=1+{{e}^{1/3}}, and is undefined (because of the logarithm) for x\le 1. The largest open interval containing the initial condition is between these two values, namely 1<x<1+{{e}^{1/3}}

2017 AB 4: The endpoints of the domain are stated in the stem of the problem. The time t begins when the potato is removed from the oven so t > 0 and the differential equation in (c) is given for  t < 10. So the domain is 0 < t < 10.

2018 AB 6: Both the differential equation and its general solution are defined for all Real numbers: \displaystyle -\infty <x<\infty

All of these require no “calculus”- they are “find the domain” questions from pre-calculus with the concern about vertical asymptotes. There are some other considerations. A longer and far more detailed discussion of this can be found in “The Domain of Solutions to Differential Equations”, by former chief reader Larry Riddle.

I think that answers the first question my reader asked. As to his second and third questions, I guess the answer is yes. At some point students will be asked to state the domain of a differential equation. My guess is it will be a fairly easy one-point part of a free-response question. If solving the differential equation is necessary, then it seems too long for a multiple-choice question. This is all guesswork on my part; I have no knowledge of what’s on future exams.

2019 AB 4: The solution is a polynomial and there valid for all Real numbers.

2021 AB 6: The solution contains a power of e. The domain is all Real numbers.

2021 BC 4: The solution contains terms with ln(x). The domain is all x > 0.

2022 AB 5: The domain is all Real Numbers


My reader also asked about absolute value

Another question that may be related to this topic is the relevancy of the absolute value signs in the solutions to differential equations. When can they be kept in the solution, and when are they redundant?

Absolute values can really confuse kids. See my posts “Absolutely” and “Absolute Value.” Pre-calculus topics, yes, but they come back again and again.

Here are two examples about absolute values and domains:

2005 AB 6: After separating the variables and applying the initial condition we arrive at {{y}^{2}}=-2{{x}^{2}}+3. This is not a function; its graph is an ellipse. We cannot just write y=\pm \sqrt{-2{{x}^{2}}+3}, since that is not a function either. With the initial condition f(1) = –1, we have \sqrt{{{y}^{2}}}=\left| y \right|=-y. Then choose the half of the ellipse where y is negative -y=\sqrt{3-2{{x}^{2}}} and y=-\sqrt{3-2{{x}^{2}}}. The domain is -\sqrt{1.5}<x<\sqrt{1.5}.

2006 AB 5. The initial value question is to solve \displaystyle \frac{dy}{dx}=\frac{1+y}{x},x\ne 0,\text{ and }f\left( -1 \right)=1.

After a few steps we arrive at \left| 1+y \right|=C\left| x \right|. At the initial condition point 1+y>0 and therefore \left| 1+y \right|=1+y. Continuing, we arrive at y=2\left| x \right|-1. For the AP exam, we can stop here, since we have a function and algebraic simplification is not required.

The domain was asked for. Since it is given that x\ne 0, and there are no other “bad” places, the domain must be one side of the y-axis or the other. The initial condition tells us that the domain is to the left of the y-axis, x<0. Since, this is so, \left| x \right|=-x and the solution simplifies to y=-2x-1\text{ and }x<0


I really appreciate questions from readers, so if you want to ask about some topic please ask me at lnmcmullin@aol.com . I’m always looking for new topics to write about – or said a different way, I’m running out of ideas!


.

Revised 4-3-18

Revised 12-23-2018 to include the 2017 and 2018 differential equation questions.

Revised 11-23-2020 – 2019 exam

Revised 1-11-2021

Differential Equations (Type 6)

Differential equations are tested every year. The actual solving of the differential equation is usually the main part of the problem, but it is accompanied by a related question such as a slope field or a tangent line approximation. BC students may also be asked to approximate using Euler’s Method. Large parts of the BC questions are often suitable for AB students and contribute to the AB sub-score of the BC exam.

What students should be able to do

  • Find the general solution of a differential equation using the method of separation of variables (this is the only method tested).
  • Find a particular solution using the initial condition to evaluate the constant of integration – initial value problem (IVP).
  • NEW Determine the domain restrictions on the solution of a differential equation. See this post for more on this. 
  • Understand that proposed solution of a differential equation is a function (not a number) and if it and its derivative are substituted into the given differential equation the resulting equation is true. This may be part of doing the problem even if solving the differential equation is not required (see 2002 BC 5 – parts a, b and d are suitable for AB)
  • Growth-decay problems.
  • Draw a slope field by hand.
  • Sketch a particular solution on a (given) slope field.
  • Interpret a slope field.
  • Use the given derivative to analyze a function such as finding extreme values
  • For BC only: Use Euler’s Method to approximate a solution.
  • For BC only: use the method of partial fractions to find the antiderivative after separating the variables.
  • For BC only: understand the logistic growth model, its asymptotes, meaning, etc. The exams so far, have never asked students to actually solve a logistic equation IVP

Look at the scoring standards to learn how the solution of the differential equation is scored, and therefore, how students should present their answer. This is usually the one free-response answer with the most points riding on it. Starting in 2016 the scoring has changed slightly. The five points are now distributed this way:

  • one point for separating the variables
  • one point each for finding the antiderivatives
  • one point for including the constant of integration and using the initial condition – that is, for writing “+ C” on the paper with one of the antiderivatives and substituting the initial condition; finding is value is included in the “answer point.” and
  • one point, the “answer point”, for the correct answer. This point includes all the algebra and arithmetic in the problem.

A future post suggested by a reader and tentatively schooled for April 4, 2017, will discuss the domain of the solution of a differential equation. The domain is often included on the scoring standard, but unless it is specifically asked for in the question students do not need to include it. This is a new topic not previously on the Course Description.

Shorter questions on this concept appear in the multiple-choice sections. As always, look over as many questions of this kind from past exams as you can find.

For some previous posts on differential equations see January 5, 2015 and for post on related subjects see November 26, 2012,  January 21, 2013 February 16, 2013

Revised 3-21-17, 08:21 to reflect new point distribution.


Next Posts:

Friday March 24: Others (Type 7: related rates, implicit differentiation, etc.)

Tuesday March 28: for BC Parametric Equation (Type 8)

Friday March 31: For BC Polar Equations (Type 9)

Tuesday April 4: For BC Sequences and Series.

Friday April 7, 2017 The Domain of the solution of a differential equation.

Area & Volume (Type 4)

Given equations that define a region in the plane students are asked to find its area and the volume of the solid formed when the region is revolved around a line or used as a base of a solid with regular cross-sections. This standard application of the integral has appeared every year since 1969 on the AB exam and all but one year on the BC exam.

What students should be able to do:

  • Find the intersection(s) of the graphs and use them as limits of integration (calculator equation solving). Write the equation followed by the solution; showing work is not required. Usually no credit is earned until the solution is used in context (as a limit of integration). Students should know how to store and recall these values to save time and avoid copy errors.
  • Find the area of the region between the graph and the x-axis or between two graphs.
  • Find the volume when the region is revolved around a line, not necessarily an axis or an edge of the region, by the disk/washer method.
  • The cylindrical shell method will never be necessary for a question on the AP exams, but is eligible for full credit if properly used.
  • Find the volume of a solid with regular cross-sections whose base is the region between the curves. For an interesting variation on this idea see 2009 AB 4(b)
  • Find the equation of a vertical line that divides the region in half (area or volume). This involves setting up and solving an integral equation where the limit is the variable for which the equation is solved.
  • For BC only – find the area of a region bounded by polar curves: A=\tfrac{1}{2}\int\limits_{{{\theta }_{1}}}^{{{\theta }_{2}}}{{{\left( r\left( \theta  \right) \right)}^{2}}}d\theta

If this question appears on the calculator active section, it is expected that the definite integrals will be evaluated on a calculator. Students should write the definite integral with limits on their paper and put its value after it.  It is not required to give the antiderivative and if a student gives an incorrect antiderivative they will lose credit even if the final answer is (somehow) correct.

There is a calculator program available that will give the set-up and not just the answer so recently this question has been on the no calculator allowed section. (The good news is that in this case the integrals will be easy or they will be set-up-but-do-not-integrate questions.)

Occasionally, other type questions have been included as a part of this question. See 2016 AB5/BC5 which included an average value question and a related rate question along with finding the volume.

Shorter questions on this concept appear in the multiple-choice sections. As always, look over as many questions of this kind from past exams as you can find.

For some previous posts on this subject see January 911, 2013


Next Posts:

Friday March 17: Table and Riemann sums (Type 5)

Tuesday Match 21: Differential Equations (Type 6)

Friday March 24: Others (Type 7: related rates, implicit differentiation, etc.)

Tuesday March 28: for BC Parametric Equation (Type 8)


Rate and Accumulation Questions (Type 1)

The Free-response Questions

The free-response questions fall into 10 general categories or types. The multiple-choice questions fall largely into the same categories plus some straight-forward questions asking students to find limits, derivatives, and integrals. Often two or more type are combined into one question. The types are the following.

  1. Rate and Accumulation
  2. Linear motion
  3. Graph Analysis
  4. Area / Volume
  5. Table and Riemann sum
  6. Differential Equation (and slope fields)
  7. Others (implicit differentiation, related rates, theorems, et. al.)
  8. Parametric Equations (BC only)
  9. Polar Equations (BC only)
  10. Sequences and Series (BC only)

My numbering has changed over the years. This numbering follows this index where each type is referenced to free-response and multiple-choice questions of the same type.

I will discuss each type individually over the next few weeks starting today with Type 1.


AP Type Questions 1: Rate and Accumulation

These questions are often in context with a lot of words describing a situation in which some things are changing. There are usually two rates acting in opposite ways. Students are asked about the change that the rates produce over some time interval either separately or together.

The rates are often fairly complicated functions. If they are on the calculator allowed section, students should store the functions in the equation editor of their calculator and use their calculator to do any integration or differentiation that may be necessary.

The main idea is that integral of a rate of change over the time interval [a, b] is the net amount of change

\displaystyle \int_{a}^{b}{{f}'\left( t \right)dt}=f\left( b \right)-f\left( a \right)

If the question asks for an amount, look around for a rate to integrate.

The final (accumulated) amount is the initial amount plus the accumulated change:

\displaystyle f\left( x \right)=f\left( {{x}_{0}} \right)+\int_{{{x}_{0}}}^{x}{{f}'\left( t \right)}\,dt,

where {{x}_{0}} is the initial time, and  f\left( {{x}_{0}} \right) is the initial amount. Since this is one of the main interpretations of the definite integral the concept may come up in a variety of situations.

What students should be able to do:

  • Be ready to read and apply; often these problems contain a lot of writing which needs to be carefully read.
  • Recognize that rate = derivative.
  • Recognize a rate from the units given without the words “rate” or “derivative.”
  • Find the change in an amount by integrating the rate. The integral of a rate of change gives the amount of change (FTC):

\displaystyle \int_{a}^{b}{{f}'\left( t \right)dt}=f\left( b \right)-f\left( a \right).

  • Find the final amount by adding the initial amount to the amount found by integrating the rate. If x={{x}_{0}} is the initial time, and f\left( {{x}_{0}} \right)  is the initial amount, then final accumulated amount is

\displaystyle f\left( x \right)=f\left( {{x}_{0}} \right)+\int_{{{x}_{0}}}^{x}{{f}'\left( t \right)}\,dt,

  • Understand the question. It is often not necessary to as much computation as it seems at first.
  • Use FTC to differentiate a function defined by an integral.
  • Explain the meaning of a derivative or its value in terms of the context of the problem.
  • Explain the meaning of a definite integral or its value in terms of the context of the problem. The explanation should contain (1) what it represents, (2) its units, and (3) how the limits of integration apply in context.
  • Store functions in their calculator recall them to do computations on their calculator.
  • If the rates are given in a table, be ready to approximate an integral using a Riemann sum or by trapezoids.
  • Do a max/min or increasing/decreasing analysis.

Shorter questions on this concept appear in the multiple-choice sections. As always, look over as many questions of this kind from past exams as you can find.


For some previous posts on this subject see January 2123, 2013. This post is revised from the post of March 1, 2013


Next Posts:

Tuesday March 7: Type 2 Linear Motion

Friday March 10: Type 3: Graph Analysis


The Logistic Equation

After my last post, I realized I have never written about the logistic growth model. This is a topic tested on the AP Calculus BC exam (and not on AB). Here is a brief outline of this topic.

Logistic growth occurs in situations where the rate of change of a population, y, is proportional to the product of the number present at any time, y¸ and the difference between the number present and a number, C > 0, called the carrying capacity.

As explained in my last post, some factor limits the overall population possible to an amount C. Ask your students to sketch what they think the graph of such a function may look like and explain why.

The population starts by growing rapidly and then slows down as it approaches C. For example, if a small population of rabbits is placed on an island, the population will grow rapidly until the food starts to run out. The population will eventually level off and not grow greater than there is food to support it.

In symbols, logistic growth is modeled by the differential equation

\displaystyle \frac{dy}{dt}=ky\left( C-y \right) , where k > 0 is the constant of proportionality, or by

\displaystyle \frac{dy}{dt}=Ky\left( 1-\frac{y}{C} \right) and K=Ck

The differential equation is solved using separation of variables followed by using the method of partial fraction to obtain two expressions that can be integrated. The actual solving of the differential equation has never been tested, nor has memorization of the solution. What has been tested is what the solution graph looks like and how those features apply in real situations.

The solution, which need NOT be memorized, is \displaystyle f\left( x \right)=\frac{C{{e}^{kCx}}}{{{e}^{kCx}}+kcD} (D is the constant of integration formally known as “+C.”)

The important features of the graph of the function can be found by examining the differential equation. This is an exercise consistent with MPAC 4: Connecting multiple representations and MPAC 5: Building notational fluency.

logisitc-de

The figure above shows the slope field for a typical logistic differential equation. The values of y where \frac{dy}{dt}=0 indicate the location of a horizontal asymptote. There are horizontal asymptotes at y = 0 and y = C.

For points between the asymptotes 0<y<C, all the factors of the differential equation are positive. This indicates that the function is increasing. Near y = 0 and y = C one factor or the other is small, approaching 0: the graph of the solution (heavy blue line) is leveling off and approaching y = C from below as an asymptote. If the graph is extended into the second quadrant (thin blue line), it approaches the x-axis from above as an asymptote.

If the initial condition is greater than C then the (C – y) factor is negative, and the solution function is decreasing and approaching the asymptote y = C from above. If the number of rabbits put on the island is more than the carrying capacity, the population decreases (the poor rabbits starve).

The differential equation is a quadratic in y. Moving from the initial condition to right the slope of the tangent lines are positive and increasing, so the solution’s graph is concave upwards. After y=\tfrac{1}{2}C the values of the slope (differential equation) remain positive but decrease indicating that the graph is now increasing and concave down. After this point the two factors of the differential equation switch values; that is, moving the same distance left and right of this point the product will be the same, but the values of each factor will have switched. Thus, the point where y=\tfrac{1}{2}C is not only a point of inflection, but also a point of symmetry of the graph.

The maximum value occurs of the first derivative (the differential equation) is at y=\tfrac{1}{2}C. This can be determined from the properties of a quadratic expression or from the second derivative,

\displaystyle \frac{{{d}^{2}}y}{d{{t}^{2}}}=k\left( y\left( -1 \right)+\left( C-y \right)\left( 1 \right) \right)\cdot \frac{dy}{dt}=k\left( C-2y \right)\frac{dy}{dt}.

The second derivative is 0 at y=\tfrac{1}{2}C. This is a point of inflection, the place where the function is increasing most rapidly.

Here is a Desmos demonstration that can be used to investigate the logistic differential equation, its slope field, and solution.


These ideas have all been tested on various BC exams. I cannot quote the questions here, but you may look them up for yourself.

Free-response:

2004 BC 5: (a) asymptotes as limits, and (b) when is the population growing fastest.

2008 BC 6: (a) sketch logistic equation on given slope field for two initial conditions – one between the asymptotes and one above the carrying capacity

Multiple-choice:

2003 BC 21: asymptote as a limit

2008 AB 22: Even though not an AB topic, the translation from words to symbols of the logistic model was tested on the 2008 AB multiple-choice exam. The idea was the translating, not knowledge of the logistic model.

2008 BC 24 given graph, identify differential equation.

2012 BC 14 identify logistic differential equation

There are also logistic questions on the restricted multiple-choice BC exams from 2013, 2014, and 2016; you’ll have to find them for yourself.


If you would like to experiment with logistic equations try graphing using Winplot for PC, Winplot for MACs, Geogebra, or some other program that will graph slope fields and solutions and has sliders. Desmos does not currently graph slope fields, but the solution graph can be produced.

For the differential equation enter \frac{dy}{dx}=ky\left( C-y \right) with sliders for k and C.

If you just want to look at the solution, use any grapher with sliders. The solution can be graphed as \displaystyle f\left( x \right)=\frac{C{{e}^{kCx}}}{{{e}^{kCx}}+kcD} with D, the constant of integration, added as a third slider.

Revised and Desmos Demo link added May 12, 2022

Logistic Growth – Real and Simulated

The logistic growth model describes situation where the growth of some population is proportional to the number present at any time and the difference between that amount and some limiting value called the “carrying capacity.”

The standard example is this: a small group of rabbits is placed on an island. The population will grow rapidly at first (like exponential growth), but eventually will level off when the food source cannot sustain any more rabbits; the island cannot ‘carry” a larger population.Before going on, ask your students to sketch a graph that shows what this model looks like.

Other things follow the same model. The spread of a disease is one, as is the cumulative sales of almost any new product.

The first graph below shows the cumulative sales of several video games. Each graph shows a typical logistic growth shape: sort of an elongated S. The sales begin rapidly and then level off near their carrying capacity.

logistic-2

                                (Source vgchatz.com)

The second graph has information on cumulative iPad sales. 
logistic-1

(Source: The Daily Mail.com)

The top graph is the actual cumulative iPad sales. It shows a typical logistic growth shape. The smooth graph is a copy of Steve Jobs’ estimate of cumulative sales before the iPads went on sale. He clearly anticipated the logistic growth, but the actual sales ran ahead of his expectations. Both graphs seem to be headed for the same carrying capacity. The quarterly sales are graphed as a histogram at the bottom. In calculus terms, the cumulative sales graph is the integral of the quarterly sales – the accumulation of the total sales over time.

Jobs was criticized for using the graph to hide decreasing quarterly sales estimates on the right side of the graph; sales decrease, but the cumulative number keeps rising. The criticism is correct, but is not proof of any ulterior motivation by Jobs. The growth of any new product can be expected to show such a graph and sales will certainly drop after everyone who needs/wants/can’t-live-without the product has one.

Here is another recent graph.

 

Simulation

Here is a way to demonstrate logistic growth in your class.

A disease is introduced into a population of people (your class). At first only one person has the disease. Then it spreads in proportion to the product of the number of people who have it and the number who do not have it. Once a person has it, they are immune and cannot get it again.

  1. Assign everyone in the class a number 1, 2, … N. (This works best for N > 20)
  2. Use the calculator’s random number generator to produce an integer from 1 to N.
  3. When a person’s number comes up, that person is “sick” and stands. (Of course if they’re sick maybe they should sit.)
  4. Then continue, in each round generate as many random numbers as people standing. Those whose numbers appear for the first time stand.
  5. Record the round number and the number of persons standing (i.e. “sick”). Graph the number standing after each round.

Here are the results with a group of 30 people:

Round 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Standing 1 2 3 6 11 19 22 24 28 28 28 29 29 29 30

Plot the data in a suitable windowlogistic-3

(From Teaching Calculus,3rd edition)

Notice the very typical S-shape of the graph, the fast initial growth, and the leveling off at the end.


Look for more on the logistic equation next week.


Coming soon:

  • Jan 31st, The Logistic Equation
  • Feb 7th, Graphing Taylor Polynomials
  • Feb 14th,  Geometric Series – Far Out

Lab-confirmed flu hospitalizations  added 3-5-2018

Density Functions

Density, as an application of integration, has snuck onto the exams. It is specifically not mentioned in the “Curriculum Framework” chapter of the 2016 Course and Exam Description, there is one example in the 2020 CED There is an example (#12 p. 58) in the AB sample exam question section of 2020 Course and Exam Description. The first time this topic appeared was in the 2008 AB Calculus exam. There was a hint in the few years before that with a question in the old Course Description book. Both questions will be discussed below. The idea is that students are supposed to understand integration well enough to apply their knowledge to a new situation (density). 

The Mathematics

A density function gives the amount of something per unit of length, area, or volume, for example

  • The density of a metal rod may be given in units of grams per centimeter.
  • The density of the population of a city may be given in units of people per square mile. (See map at end.)
  • The density of a container of substance may be given in pounds per cubic foot.

The density can be used to find the amount. In each example, notice that the length, area, or volume of the region is multiplied by the density to find the amount.

Example 1: A 10 cm rod with a constant density of 3 g/cm has a mass of 10\text{ cm}\cdot \frac{3\text{ grams}}{\text{cm}}=30\text{ grams}

In other situations, the density is not constant and is given by some function. Suppose our metal rod of length b has a density of \rho \left( x \right) grams/cm where x is measured from one end of the rod. To find the total mass we think of cutting the rod in the very small pieces. (Think partition: each piece has a length of \Delta x in which the density is nearly constant say \rho \left( x \right).) The sum of the mass of these pieces is the Riemann sum \sum\limits_{i=1}^{n}{\rho \left( {{x}_{i}} \right)\Delta x}. The limit of this expression as \Delta x\to 0 gives the total mass in grams: \displaystyle M=\underset{\Delta x\to 0}{\mathop{\lim }}\,\sum\limits_{i=1}^{n}{\rho \left( {{x}_{i}} \right)\Delta x}=\int_{0}^{b}{\rho \left( x \right)dx} Notice that \sum\limits_{i=1}^{n}{\Delta x} is the length of the rod. This is multiplied by the density to find the mass.

Example 2: The next example is from the old Course Description book.

A city is built around a circular lake that has a radius of 1 mile. The population density of the city is f\left( r \right) people per square mile, where r is the distance from the center of the lake, in miles. Which of the following expressions gives the number of people who live within 1 mile of the lake?

(A) 2\pi \int_{0}^{1}{rf\left( r \right)dr}                 (B) 2\pi \int_{0}^{1}{r\left( 1+f\left( r \right) \right)dr}

(C) 2\pi \int_{0}^{2}{r\left( 1+f\left( r \right) \right)dr}      (D) 2\pi \int_{1}^{2}{rf\left( r \right)dr}

(E) 2\pi \int_{1}^{2}{r\left( 1+f\left( r \right) \right)dr}

We need to partition the region so that each piece has a close to a constant density. Thin rings around the lake will accomplish this. A ring, if straightened out is similar to a rectangle of length 2\pi {{r}_{i}} where {{r}_{i}} is the distance from the center of the lake (this is the circumference of the ring), the width of this ring (rectangle) is \Delta r. In this ring (rectangle) the population density is people per square mile, so the population in the ring is f\left( {{r}_{i}} \right) approximated by multiplying the area by the density: 2\pi {{r}_{i}}f\left( {{r}_{i}} \right)\Delta r. Adding these gives a Riemann sum whose limit gives the total population:

\underset{\Delta x\to 0}{\mathop{\lim }}\,\sum\limits_{i=1}^{n}{2\pi {{r}_{i}}f\left( {{r}_{i}} \right)\Delta r}=2\pi \int_{1}^{2}{rf\left( r \right)dr}        Answer (D).

The limits of integration are from the edge of the lake, r = 1 to r = 2 (“one mile from the lake”). Another way to look at this is that \sum\limits_{i=1}^{n}{2\pi {{r}_{i}}\Delta r} is the area of the city; this is multiplied by the population density to find the population.

This type of density situation is called a radial density function.

Notice that the answer looks like the formula for volume by cylindrical shells; this is not quite an accident. The rings around the center are like the shells used when finding volume. It is the units that are different.

Example 3: From the 2008 AB Calculus exam #92.

density

A city located beside a river has a rectangular boundary as shown in the figure above. The population density of the city at any point along a strip x miles from the river’s edge is f\left( x \right) people per square mile. Which of the following expressions gives the population of the city?

(A) \int_{0}^{4}{f\left( x \right)dx}          (B) 7\int_{0}^{4}{f\left( x \right)dx}          (C) 28\int_{0}^{4}{f\left( x \right)dx}

(D) \int_{0}^{7}{f\left( x \right)dx}          (E) 4\int_{0}^{7}{f\left( x \right)dx}

A thin vertical strip of the city {{x}_{i}} miles to the right of the river has an area of 7\Delta x. The population in each such strip is found by multiplying the area by the density function; this gives 7f\left( {{x}_{i}} \right)\Delta x. These are then added forming a Riemann sum, etc.

\text{Population}=\underset{\Delta x\to 0}{\mathop{\lim }}\,\sum\limits_{i=1}^{n}{7f\left( {{x}_{i}} \right)\Delta x}=7\int_{0}^{4}{f\left( x \right)dx}         Answer (B)

Alternative solution: When I first saw this question, not having thought about density for quite a while, I answered it by doing a unit analysis. Since unit analysis is a good thing for students to understand I’ll outline my thinking next.

We are looking for the population so the answer must be in units of “people.” The density function is in units of “people/square mile” (given). Both x and dx are in units of “miles” and the “7” also has units of “miles.” Therefore, the only choice that gives “people” is the one that multiplies the 7, the dx and the density function. This eliminates (A) and (D). The 28 in (C) must be square miles, making the overall units “people-miles” which is not what we’re going for. Finally, choice (E) is eliminated since the 7 and the dx are not in the same direction. This leaves (B).

Example 4: A volume problem adapted from Calculus by Hughes-Hallett, Gleason, et al.

The density of air h meters above the earth’s surface is \rho \left( h \right)=1.25{{e}^{-0.00012h}}\text{ kg/}{{\text{m}}^{3}}. Find the mass of a column of air 25 km high with a square base 3 meters on a side sitting on the surface of the earth.

At any height,  h meters above the earth the volume of a thin slice of the column of air is {{3}^{2}}\Delta h. The mass of this slice is {{3}^{2}}\rho \left( {{h}_{i}} \right)\Delta h. The sum of these slices gives a Riemann sum whose limit gives the total volume:

\displaystyle M=\underset{\Delta h\to 0}{\mathop{\lim }}\,\sum\limits_{i=1}^{n}{9\rho \left( {{h}_{i}} \right)\Delta h}=9\int_{0}^{25,000}{1.25{{e}^{-0.00012h}}dh}\approx 89,082\text{ kg}\text{.}


For other examples see 2018 BC 2, and 2021 AB 1, Good Question 15 and Good Question 16


Check the index of your textbook for density problems. Calculus by Hughes-Hallett Gleason, et al and Calculus by Rogawski (2nd edition) have good exercises and examples. My advice is not to make too big a deal of this, but if you have time, you can take a look. Should this kind of question appear on the free-response section I would guess that the question will be carefully worded so that students who never saw this kind of question would have a good chance of answering it.


The changing population density of Sydney, Australia in persons per hectare. Note the date changes in the key at the lower left.

sydney-density-1991-2011


Revised and updated 8-20-2019


Coming soon:

  • Jan 17th, Every Day series
  • Jan 24th, Logistic Growth – Real and Simulated
  • Jan 31st, The Logistic Equation
  • Feb 7th, Graphing Taylor Polynomials
  • Feb 14th,  Geometric Series – Far Out