Excel Calculus
Excel Calculus
Anneke Bart
Saint Louis University
January 3, 2024
©2012–2021 Mike May, S.J. and Anneke Bart
Licensed to the public under a Creative Commons Attribution-NonComercial-
ShareAlike 4.0 International License1
1 http://creativecommons.org/licenses/by-nc-sa/4.0/
Acknowledgements
This book got its start at a talk by Felkel and Richardson at ICTCM in 2000
where they claimed ”Business students should be taught math using spread-
sheets.” A number of years later I tried teaching with their book and found
much to appreciate from their approach. Their book, Networked Business
Mathematics, is the initial inspiration of this book. However, as often happens
when an academic looks at a textbook, I found the authors had made some
choices I disagreed with, so I wanted to write my own text. As I was going
through beta versions of this book, I discovered the 2004 report of the Cur-
riculum Reform Across the First Two Years (CRAFTY) sub-committee of the
Mathematical Association of America (MAA), and the MAA’s 2004 curriculum
guide. That report has guided many decision concerning this text.
The book has been rewritten in PreTeXt (https://pretextbook.org/index.html2 ),
making it possible to quickly output print, web, pdf versions and more from
the same source.
The continued development of my attempt to make make courses that bet-
ter fit the needs of business students has has received support from the National
Science Foundation (Award #DUE-16251423.)
2 https://pretextbook.org/index.html
iv
Preface
This text is intended for a one semester calculus course for business students
with the equivalent of a college algebra prerequisite. Rather than being a three-
semester engineering calculus course that has been watered down to fit into
one semester it is designed for the business students.
We assume that
v
vi
This book remains a work in progress. Feel free to send comments, correc-
tions, or rebuttals.
Mike May, S.J.
mike dot may at slu dot edu
St Louis, MO 2023
Notes for Instructors
• Teaching materials, like calendars, sample quizzes, and sample tests are
available to instructors on request.
• A landing page (https://mathstat.slu.edu/~may/ExcelCalculus/LandingPage.html3 )
was established with resources that useful for offline work:
◦ There is a pdf version of the book that can be downloaded.
◦ There is a compressed collection of the Excel files used in the text
that can be downloaded.
The text was designed for a particular syllabus at a particular institution.
Let us know if a few additional optional topics would better suit your needs.
We welcome suggestions, comments, and corrections.
Mike May, S.J.
mike.may@slu.edu
St Louis, MO, 2023
3 https://mathstat.slu.edu/~may/ExcelCalculus/LandingPage.html
viii
Notes for Students
This text has been written to make life better for business students taking
calculus. You should be able to see connections between this course and your
business courses. While it uses Excel, it does not assume that you are familiar
with it. The excel worksheets used in the text are available for you to use
and see the underlying code. We are in the process of making them available
in both the worked version, so you can see what was done, and an unworked
version so you can follow along. We recommend you start with the unworked
version. We are also adding videos of all the Excel examples used in the text.
The rules for using Excel in the class violate several de facto rules you have
learned in all your previous math courses. This is done intentionally. This is
probably either your last math class or your second to last math class. We have
added much greater emphasis to how your skills will be used after the course is
over. Mathematicians have worked for millennia to develop techniques for fast
symbol manipulation freed from context. That means the same skills can be
used in many contexts. In a business setting you want to make work products
that you can come back to months or years later. You also want your work to
be understood by others. When practical, we use longer variable names and
break steps apart in Excel. This makes the material easier to read. It also
means that students make fewer mistakes with long formulas.
Excel has special functions for almost any financial calculation you can
think of. For the most part, we will not use the advanced formulas. When
your job is to work with a specific formula every day for months, it will make
sense to learn the special formulas. At this point, the syntax is too complicated
and you will forget them in a short period of time.
Final thoughts:
• If nothing else, this text is free, so it is one less text you need to buy.
• We welcome suggestions, comments, and corrections.
• Videos of the Excel problems are being added.
ix
Contents
Acknowledgements iv
Preface v
2 Business Applications 75
2.1 Market Equilibrium Problems . . . . . . . . . . . . . 75
2.2 Modeling Revenue, Costs, and Profit . . . . . . . . . . . 86
2.3 Nonlinear Functions . . . . . . . . . . . . . . . . . 103
x
CONTENTS xi
7 Integration 303
7.1 Approximating Definite Integrals as Sums . . . . . . . . . 304
7.2 The Fundamental Theorem of Calculus . . . . . . . . . . 315
7.3 Basic Antidifferentiation . . . . . . . . . . . . . . . 328
7.4 Integration by Change of Variables or Substitution. . . . . . 338
7.5 Integration using Computer Algebra . . . . . . . . . . . 346
7.6 The Normal Distribution: An extended numeric example . . . 357
7.7 Applications of the integral: Investment and depreciation . . . 368
7.8 Economics Applications of the Integral . . . . . . . . . . 376
Appendices
Example 1.1.1 Supply and Demand Curves. Supply and demand equa-
tions are often modeled by linear equations. The supply function is a line with
a positive slope, and the demand function is a line with a negative slope.
1
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 2
rise (p1 − p0 )
m= =
run (q1 − q0 )
There are two other forms of a line that are sometimes used. The general
form of a line is a standard notation used in mathematics. The 2-point form
of a line is very handy in those situations where we are not given a slope, but
we are given information about two points that lie on the line.
Example 1.1.3 Finding four versions of a line. We find that we can sell
150 widgets a day if we sell them at $10. If we raise the price to $15, we can
only sell 110 widgets a day. Assume that there is a linear relationship between
price and quantity sold. Find the equation of the line in all four forms.
Solution. Writing this using our variables p (price) and q (quantity of wid-
gets) we see that when p = 10, q = 150 and when p = 15, q = 110. Points are
(usually) given as (q, p), so this means we have two point (150, 10) and (110, 15)
on the line. We always need to find the slope of the line, and in this case
15 − 10 5 −1
m= = = .
110 − 150 −40 8
We are given two points, so the 2-point form of the line should be the easiest
formula to find:
p1 − p0
p − p0 = (q − q0 ).
q1 − q0
In our case this becomes:
15 − 10
p − 10 = (q − 150).
110 − 150
We just found the slope and we just need to pick a point (p0 , q0 ) to finish
the problem. (Recall that p and q are the variables, so we want to leave those as
they are.) In this case lets pick (p0 , q0 ) = (150, 10). Then we get this simplified
version, which is also the point-slope form of this line.
−1
p − 10 = (q − 150).
8
From here we can very easily find the slope intercept form by some straight-
forward algebra: p − 10 = −1
8 (q − 150) implies that
−1 −1 150 −1 230
p= (q − 150) + 10 = q+ + 10 = q+ .
8 8 8 8 8
Thus
−1 230
p= q+ .
8 8
And finally the general form will be another exercise in algebra. We clear
the fractions and put everything on one side.
8p + q − 230 = 0.
□
Example 1.1.4 Finding a line from two points. Suppose that a linear
cost-quantity relationship exists in producing widgets. There is a fixed cost of
$400. There is also a per-unit cost of $11.
Solution.
(a) We have one point of the form (quantity, cost) at (0, 400) from the fixed
cost. This point happens to be an intercept. The slope of the line is
m = 11/1 = 11. We will let C stand for Cost and q stand for quantity.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 4
The general formula for a line with these variables will have the form
C = mq + b.
C = 11q + 400
(b) Using the equation form part a) we see that the cost of producing 200
widgets is
C = 11(200) + 400 = $2, 600
□
Example 1.1.5 A nonlinear function. Sarah is paid $500 for working up
to 40 hours per week. For work beyond 40 hours per week she is paid $18/hour.
Solution.
(a) For this example we will use “designer variables”, longer variables that
make the equation easier to read. The output will be Pay, and the input
variable — the number of hours worked — will be hrs. We are told that
Pay = 500 when hrs = 40. The slope of the line for work beyond 40 hours
is m = 18. Another way to think of this is to say that there is a fixed
Pay of $500 and a variable Pay for any hours in excess of 40: i.e. (hrs -
40). Thus, the equation of the line, according to the point-slope form is
This gives us
□
It can be useful when writing reports to have variables that convey some
meaning. We could have used y for Pay, and x for hrs, but using the much
more easily interpreted variables named Pay and hrs helps when reading the
formulas.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 5
(b) Next we find the equation of the line. There are several ways to
do this and two methods are outlined below.
Exercise Group. For the following problems, start with the information
given:
(a) Give the equation of the line determined by that information.
(b) Using the line, give the predicted value of p for the given q0 .
(c) Give the value of q for which the predicted value of p is 0.
7. A slope of 3, passing through (6, 3), with q0 = 4.
Solution.
(a) Using p = mq + b, we get 3 = 3(6) + b, so b = −15 and the
equation of the line is p = 3q − 15.
−183
for q we get: 12.7(q − 22) = −183 This implies (q − 22) = 12.7 .
Therefore,
183
q = 22 − = 7.59.
12.7
10. A slope of −0.23, passing through (7.6, 19.7), with q0 = 59.6.
11. A slope of 0, passing through (12.3, 9.8), with q0 = 74.
Solution.
Exercise Group. For problems 13-18, start with the equation given:
(a) Give the slope of the line or say that the slope is undefined.
(b) Give the intercepts of the line with the axes.
(c) Give two points that are on the line but not on the axes.
13. 3p + 2q = 6.
Solution.
(a) Solve for p so we can read off the slope more easily: p = −2/3q +
2. Hence the slope is m = −2/3
• Quadratic functions
• Exponential functions
• Logistic functions
Section-1-2-Examples.xlsx
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 9
In some of the models we will investigate later in the course price will be a
linear function. We will assume Price = mq + b. This implies that
Revenue = (mq + b) ∗ q = mq 2 + bq
If m > 0, then the revenue function will look like a parabola that opens up. If
m < 0, then the revenue function will look like a parabola that opens down.
• If b2 − 4ac = 0, then there is 1 root (the vertex will touch the axis)
• If b2 − 4ac < 0, then there are no roots. This means the entire graph
must lie above the x-axis (a > 0) or below the x-axis (a < 0).
format, so it is worth looking at the notation in this case. f (t) = p ∗ ert can
also be written as f (t) = p ∗ exp(rt)
Exponential functions are used for proportional growth or decay. In busi-
ness, compound interest is given as an exponential function. In particular, if
P is the principal and r is the interest rate “compounded continuously” (ex-
pressed as a decimal), then the amount A after time t is given by A = P ert .
The relationship (in general) between a future value (FV) and the present
value (PV) given an interest rate r per period, with t being the number of
compounding periods is given by:
FutureValue : F V = P V ∗ (1 + r)t
where the mean M is the average value, the amplitude A is the distance from
the mean to the maximum, the period is the length of time till the cycle repeats,
and the shift is where we start the cycle for x = 0.
With an appropriate shift we can interchange the sine and cosine functions.
(The functions sin(x) and cos(x) arise from trigonometry.) In this course, we
will not focus on trigonometric functions and their properties. We are only
concerned with having a periodic function for seasonal variations.
looks a bit intimidating, but we will be able to use the power of a spreadsheet
to easily handle it.
In retail, there are several examples of items that follow a normal distri-
bution. In a store selling shoes for women for instance, we would expect to
see that some sizes are more prevalent than others. This would be a factor in
determining what sizes to have in stock, and at what quantities. The typical
scenario in which we will be using this curve model is one where we ask what
range of sizes do we need to cover for the population in an area to be large
enough to justify a specialty store.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 12
Solution.
(a) How to obtain a positive y-intercept: The y-intercept is deter-
mined by b, so we just let b > 0.
(b) How will we know if the graph of the function intercepts the
x-axis at two positive values?
3. For a quadratic model, f (x) = ax2 + bx + c, How do I get a graph
where the vertex has x = 5?
Solution. √Quadratics are parabolas and the zeros (if they exist) are
at x = −b± 2ab2 −4ac
.
The vertex is always located at x = −b2a . So if the vertex is to be
at x = 5 we need to make sure −b 2a = 5. There are many ways to do
this (there are infinitely many different parabolas with their vertex
located at x = 5). One possible solution would be to let b = −10 and
a = 1.
4. For a polynomial model, f (x) = an xn + · · · + a1 x + a0 , how do I get
a graph that goes up at both ends?
5. For an exponential model, f (x) = P ∗ exp(rx), how do I get a graph
with f (0) = 100, that goes to zero as x gets large?
Solution.
• f (0) = P ∗ exp(0) = P , so if f (0) = 100 we know that P = 100.
2 !
4−7
1/20 < exp − < 1/10
s
2 !
4−7
ln(1/20) < − < ln(1/10)
s
−9
ln(1/20) < < ln(1/10)
s2
and hence
9
2.3026 < < 2.996
s2
9 9
So s2 > 2.996 and s2 < 2.3026 .
Hence 1.734 < s < 1.977.
2
10. For a normal model, f (x) = a exp − x−m
s , how do I produce a
graph with a high point at (7, 20), and the value of f (1) between 1
and 2? (You need to use trial and error on this problem.)
11. For the power model, f (x) = axb , how do I produce a graph with
f (1) = 5 and f (3) = 1?
Solution. f (1) = 5 means that a1b = a = 5.
f (3) = 1 means that axb = 5 ∗ 3b = 1 hence 3b = 0.2 and hence
ln(3b ) = ln(0.2).
So b ln(3) = ln(0.2) which implies that b = ln(0.2)/ ln(3) ≈ −1.465.
12. For the inversely proportional model, f (x) = a/x, how do I produce
a graph with f (1) < 0 and f (3) = −5?
13. For the logarithmic model, f (x) = a ln(x) how do I produce a graph
with f (e) = 3?
Solution. f (e) = a ln(e) = a(1) = a, hence a = 3
Exercise Group. For each situation, explain which model you would use
for each situation (linear, quadratic, etc.). Be sure to explicitly mention what
you are using as the free variable (the equivalent of x), what you are using as
the dependent variable (the equivalent of y), and why that model makes sense
in the given situation.
14. The cost of producing an amount of a product is the sum of the
fixed costs, like warehouse rent, and the variable costs, like labor and
materials, which we can assume to be the same for each unit produced.
15. When looking at revenue, we can assume that sales will be linear
function of the price of the object.
Solution. Using a linear model we get Sales = m ∗ Price +b.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 16
Price is the free variable (the input) and sales is the dependent
variable (the output)
16. The amount I expect to be able to withdraw from an account at a
future date, assuming that interest is compounded continuously and
is fixed.
17. The amount of time it takes an investment to double assuming a fixed
interest rate.
Solution. The Future value is given by F V = P V ∗ (1 + r)t
Here the Future value (F V ) will be the input (it will be 2 ∗ P V )
and the output will be the time t.
18. The amount of electricity needed for air conditioners in a Washington,
D.C. at various times of the year.
19. The amount of metal needed to build a fuel tank as a function of the
amount of fuel to be stored.
Solution. Volume is 3-dimensional and the metal would be related
to the surface area — which is 2-dimensional — so the formula would
be something like:
Section-1-3-Examples-Unworked.xlsx
2 external/Examples/Section-1-3-Examples.xlsx
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 17
Standalone
From data we would like to compute the figures for the quarter (add the
three months), the monthly profit (revenues-cost), and the monthly unit costs
(costs/ units sold).
With the formula ribbon, we go to show and select Show Formulas. Since
we want the worksheet to be readable by others, we add labels for the quantities
we are computing, and in each cell we enter the formula for the quantity. The
formula bar tells us which cell has been selected and the formula for that cell.
It is generally easier to edit a formula by using the formula bar.
In this example, we have used several different ways of writing the formula.
In cells E2, B6, and B7 we simply typed in the equation like we would on a
calculator. Thus the profit for January is Revenues — Costs, or 3600-2700.
Since we want Excel to compute this value, we put an equals sign at the start
of the formula.
In cells E3, C6 and C7, instead of typing the values, we use a reference to the
cell where the value is kept. This allows us to change the raw data and have
Excel automatically recompute the quantities that were derived from those
numbers.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 18
In cells E4 and E5 we use Excel’s SUM command. In cell E4, we are taking
the sum of the values in the cells from B4 through D4. We will come back to
commands in Excel later in the section.
Figure 1.3.2
If we unselect Show Formulas, we see the values that Excel computes.
We want to finish our assignment by computing the Profit and Per Unit
Costs for March and for the Quarter. However, we would prefer not to type any
more formulas. (Typing in four more cells is not so bad, but we can imagine
being told to do this for several years of data.) We will use a process called
Quick Fill, that tells Excel to repeat the same formula, with the cell references
appropriately modified.
To do the quick fill, we select the cells we want copied.
We can move the cursor until the cell(s) show the fill handle. This will
change the symbol in the corner of the cell to a thin dark ‘+’.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 19
We then drag the little blue box at the lower left corner of the box of
selected cells. Excel automatically fills in the new values.
We look back at the formulas and see that Excel has produced formulas
where cells are in the same relative position. Profit is the value from the cell 4
rows higher minus the value of the cell three rows higher.
There is a last detail to fix in our report. The quantities in profit and Per
Unit Cost are in money, so we want them formatted correctly. (They should
start with a dollar sign, have a decimal point, and stop at two decimal places
or cents.) We do this by selecting the cells and then formatting the cells as
currency.
Standalone
Next we want to compute the number of shares for each stock. This is 10
times the closing price of Google divided by the closing price of the stock we
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 21
selected.
In the formula for the number of shares of msft, we used $B$3 for the initial
price of goog. This is an absolute cell reference. When we copy the formula
from cell C1 to cell D1, the formula changes from =10*$B$3/C3 to =10*$B$3/D3.
This formula in cell D1 asks for 10 times the value in cell B3, divided by the
value in the 2 rows below the cell of the formula.
Since we have properly used relative and absolute references, we can now
copy this formula to complete the chart, and Excel will modify the formula
appropriately.
We note that the rows and columns can be independently made absolute or
relative. Thus if we are looking at a formula in cell A1, and see a reference to
B2 it means the cell one below and to the right of the location of the formula.
If we see $B2 it means the cell in column B that is one row down from the
formula. If we see B$2 it means the cell in row two that is one column to the
right of the formula.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 22
When we convert back to see the values, we see that an original investment
of $3,385.30 would have made a profit of $3,073.70 in goog stock, $2,128.02 in
msft stock and $11,826.60 in aapl stock. Once again we use the SUM function
and a cell range to add the values in the column. We also use the split screen
icons in the scroll bars to be able to see the correct rows and columns.
Note: Excel can also make references across multiple pages of a workbook,
but we will not need that capability for this course.
By default, Excel names each cell by its row and column. We can
use the name cell in the upper left corner of the Excel sheet to change
the name from the letter/number format into a descriptive name.
The more descriptive name can be useful when constructing and document-
ing the process we are using for our computations. Consider the previous
example with the rich uncle. In cells B1, C1, and D1, we had the number of
shares of Google, Microsoft, and Apple we could have had in the portfolio.
Better names for those cells would then be SharesGOOG, SharesMSFT, and
SharesAAPL. We can name a cell by editing the name box at the left side of
the formula bar.
Figure 1.3.4
We can then use the names in formulas. In general, the formulas with nicely
named variables are easier to read.
Figure 1.3.5
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 23
We type the name of the command we are looking for and we are given a
page of help for that command.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 24
A second kind of help is the formula builder from the formula ribbon. It
gives a more concise help when you do not remember the exact syntax of a
command.
A third source of help is simply to do a web search for Excel help. To find
how to do a computation with an exponential functions you can search for
“Excel formulas exponential.”
E There is only one correct way to add up three quantities with Excel.
F Absolute and relative cell references can be used interchangeably.
G We can only check the underlying functions one cell at a time.
H In Excel, ex is written EXP(x).
Once we quickfill and have the regular view (not showing the formulas)
If column E is copied and pasted into column G, give both the formula
and value for each non-empty cell in column G.
Solution. Any entry that is absolute (with a $) will be fixed. The
relative references (without the $) will change all the Bs to Ds because we
moved over 2 columns.
Formulas
Entries
6. We would like to really understand what happens when we use quick fill.
(A) Let’s consider the entries =A1, =$A1, =A$1, and =$A$1 in row
2. Do quick fill below to fill in 3 more rows and see what happens.
Clearly in the first row these cells all now point to cell A1 and the
value returned is 1. After the first row we get a mixture of values.
Why?
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 28
(B) Next, we can set up the values in column D. Do quick fill to fill in
the 3 columns to the right? Explain the pattern of values we see.
Solution. The random number will differ from person to person, but
the Excel entries are as follows. Note that we need to use an absolute
reference for the value of a!
Formulas
8. Using the help functions to check syntax, write a formula for cell B2, that
looks at the value for cell A2, and if it is negative, returns the square of
it, and if positive returns its square root.
9. Using your favorite source on the web create a spreadsheet that has
the closing price of your favorite stock on the first day of the month
for the past 5 years. Compute the change in adjusted stock price for
each month and identify which month had the greatest increase. (http://
finance.yahoo.com/3 ) is one source for such data.)
Solution. For example if we type in Coca-Cola we get to “The Coca-
Cola Company (KO)”
From the menu on the left choose “Historical Prices” and pull the
monthly data from the past 5 years. Then scroll down and download to
spreadsheet.
Using the Adjusted close we compute the change:
The above partial table shows what the table should look like.
Using the MAX function for this data the biggest change is $3.39.
Finding the month can be done by inspection as this point (there are
more sophisticated ways to do this, but that requires rather advanced
Excel commands). In this instance the greatest change took place in
December 2013.
10. Using your favorite source on the web create a spreadsheet that has the
closing price of your favorite stock on the first day of the month for the
past 5 years. Compute the percentage change in adjusted stock price for
each month and identify which month had the greatest increase.
3 http://finance.yahoo.com/
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 30
11. Create a spreadsheet showing the Consumer Price Index by month from
1930-2010. (Good sources are http://inflationdata.com/4 and http://
www.bls.gov/cpi/5 at the Bureau of Labor Statistics.) Compute the per-
centage change between January and July for each year. Which year had
the greatest percentage change in the first half of the year?
Standalone
Section-1-4-Examples-Unworked.xlsx
2 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/
Section-1-4-Examples.xlsx
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 31
We start by producing a column for x and one for f (x). In the column for
x we start with values −10 and −9, so that we can complete the column with
a quick fill. Similarly, we start the f (x) columns in the first cell with the “x”
replaced by the appropriate cell reference. In this case the formula for f (x) is
in cell B15 and x is in cell A15.
We then use quick fill and quick copy to fill out the table.
Figure 1.4.2
With the values of the cells filled in we highlight the cells we want to graph
(A14 through B35) and add a scatter plot for the highlighted values.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 32
Figure 1.4.3
(The location of the scatterplot will be a bit different with Macs. The
scatterplot is in the Charts ribbon, under other, on Macs.) This gives the
desired graph.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 33
Standalone
Figure 1.4.5
Now, we once again do a quick fill to complete the table, and then add a
scatterplot.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 34
The difference with this second example is that if I now want to look at the
graph of y = −x2 + 3x + 10, I simply change the values of the parameters a, b,
and c.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 35
Standalone
In this case, I want a better look at the vertex of the parabola. I decide
I want to see the graph for 0 ≤ x ≤ 5. My value for x-start is 0. My value
for x-step is one twentieth of the distance from 0 to 5, or (5 − 0)/20 = 0.25. I
plug those values in and see the graph.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 36
Standalone
We then simply select the cells for x and the functions we want graphed
together and produce a scatterplot as before. (To graph g(x) and h(x) together,
we want to select the columns for x, g(x), and h(x).)
Figure 1.4.8
One problem with the graph of g(x) and h(x) together is that the functions
have different orders of magnitude, so we do not see that y = g(x) is a parabola.
One remedy is to use a secondary axis for the graph of h(x). (Simply double
click on one of the points for h(x), and select secondary axis from the axes
tab.)
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 38
Figure 1.4.9
Figure 1.4.10
It is also worthwhile to note that you can manually set the y-range of a
graph by double clicking on the axis and setting the values. This is particularly
useful of the function has a vertical asymptote.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 39
We will return to Wolfram Alpha from time to time, when we have nice
formulas to manipulate.
G Sometimes, there are other tools that are easier to use to produce a
graph.
H We can use absolute references to set up a graph where we can easily
change the viewing window.
I None of the above
The data and the graph looks as follows, and changing a and b allows
us to quickly find several different graphs of the same function.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 42
10. Produce a worksheet with graphs of f (x) = 2x+3 and g(x) = −2x+5, for
x going from -10 to 10. Add a title to the chart. Do something interesting
with the fonts or other options and explain what you did.
11. Use Wolfram Alpha to produce a graph of f (x) = x3 − 16x, for x going
from -5 to 5. Use your favorite screen capture software and paste the
result into an Excel worksheet.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 43
Solution. Using Wolfram, the command and the resulting graph look
like this:
Section-1-5-Examples-Unworked.xlsx
2 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/
Section-1-5-Examples.xlsx
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 44
models that come up repeatedly in the theoretical courses are given names
and used without redoing the theoretical foundation for the model. (This is
why we introduced the normal distribution and the logistic growth function,
neither of which looks like a simple equation.) In this course, we will be happy
with simple heuristic arguments on which model to choose.
The second half of the problem is deciding how to choose the parameters to
give the curve that does the best job of fitting the data. A moment of reflection
shows deciding on the correct definition of “best fitting” is a nontrivial task
beyond the scope of this course. For the time being we will accept the standard
definition:
The best fitting curve minimizes the sum of the squares of the
differences between the measured and predicted values.
We will come back to that definition later in the course, when we know
more calculus, but for now we simply note that it is the standard definition,
and is used by Excel. Instead, we will focus on using Excel to produce a best
fitting curve of the appropriate model. Excel has a preprogrammed feature
that will find the best fitting equation for a data set for a select number of
functions:
• Linear model
• Exponential model
• Polynomial model
• Logarithmic model
• Power model
We will show how to find an equation for a data set, assuming we know
what model would be the best one to represent the data.
Standalone
Figure 1.5.2
Figure 1.5.3
We have added a linear trend line to the graph and can also see the equation
for the line. We could use that equation to plan how many hours we want our
workers on the job based on the number of widgets we expect to sell.
variable, x.)
Standalone
Standalone
Section-1-5-Examples.xlsx
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 49
Figure 1.5.6
Since we expect prices to rise as a percentage of the current prices, we
expect the cpi to be modeled by an exponential curve. We start by selecting
the data, producing a scatterplot, and adding a best fitting curve using an
exponential model. We will always select the option to show the equation on
the chart.
Figure 1.5.7
This first attempt gives an exponential formula, but it is unsatisfactory for
a number of reasons.
• That constant only shows one significant digit, which is not enough to
make meaningful predictions.
• The font size is too small to easily read off the resulting equations.
• The constant coefficient is ridiculously small because it gives the pro-
jected value of the index in the year o.
• The graph does not look like a very good fit. The plot of the numbers
actually looks as though it represents three different graphs.
We will work through the problems one at a time.
equation, select “Format Trendline Label”. We are given a dialog box that lets
us make formatting options. Since the lead coefficient is so small, we want
the numbers formatted in scientific notation. We choose 4 digits beyond the
decimal point in that notation.
Figure 1.5.8
This gives us a better equation. It should be noted that our pictures in this
book use the font option in the formatting to use a larger sized font.
spreadsheet where the adjusted year is the current year minus 1983. In our
graph, we also adjust the labels so a reader can still understand our chart.
Standalone
This breaks the data into two pieces. The first piece is the period from
1983 till 2011. As we see, the exponential model fits quite well in that case.
The second piece is the period from 1973 till 1982. Once again, the ex-
ponential model fits quite well over that period. Notice that the exponent is
quite different in the two periods.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 53
The obvious question that arises is to figure out what happened in 1983
that caused the economic model to shift. That question is beyond the scope
of this course.
(a) Find the best fitting linear function for the data.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 54
(b) Give the production value that function predicts for May.
(c) Give the production value that function predicts for July.
Solution.
(a) Create a scatter plot for the data. Then use the menu to go to Chart
— Chart layout — Trendlines. Find the linear approximation and
under options choose to display the function.
(b) Create a new table using the function to determine the predicted
production levels.
(c) To find the production level for July we enter x = 7 in the table and
compute the output.
The linear model predicts a production of 106, 648 for the month of
July.
2. We have the following data on gizmo sales:
(a) Find the best fitting linear function for the data.
(b) Extend the chart to give the projected sales for each month from
January through September. (You need to add a row for predicted
sales, and also add a number of columns for missing months.)
3. We have the following data on gadget revenue:
(a) Find the best fitting linear function for the data.
(b) Find the best fitting quadratic function for the data.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 55
(c) The data fits a quadratic function better than a linear function.
With a quadratic model we do not maximize revenue by selling as
many units as possible. Explain why this is reasonable in the real
world.
(d) Project the revenue for selling 15,000 units with both linear and
quadratic models.
Solution.
(a) We can do scatterplots and use the linear trendline find the models
we need.
(a) Find the best fitting power function for the data.
(b) Use your power function to estimate the weight of a tank that holds
40,000 gallons.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 56
(c) Find the best fitting linear function for the data.
(d) Use your linear function to estimate the weight of a tank that holds
40,000 gallons.
(e) Visually, both curves seem to fit the data quite well, yet they
make noticeable different predictions for the weight of a larger tank.
Which prediction would you use? Justify your answer.
5. I am looking at sales figures for a new product, the gizmo. The sales
figures seem to be growing at an exponential rate.
(a) Find the best fitting exponential function for the data.
(b) Using your function, predict sales for the July after the data was
collected.
Solution.
(a) Using the scatterplot and the trendline from the Chart menu, we
choose Exponential Trendline and display the function. Note that
we do need to change the months to the appropriate numerical value.
Excel would just replace them by consecutive numbers.
(b) To find the predicted units sold for July we would need x = 19.
Using Excel we see that the predicted number of units sold is 14,949.
Exercise Group. Excel has a limited set of models that can be used for
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 57
trend lines to automatically fit curves to data. In later sections we will look at
how to we can use calculus to find best fitting curves for other models. Until
we develop those techniques, we can make a guess at parameters that will make
curves fit.
6. The unit sales of widgets can be expected to follow a logistic model,
with rapid growth of sales, but with eventual saturation of the market
so that there is a cap on the market. In such a case the sales should
be modeled by a logistic equation, of the form
time(years) 0 2 4 6 8
sales 1000 5610 14,845 19,095 19,870
size 7 8 9 10 11 12
Weight 360 3,390 12,820 20,000 12,826 3,375
(a) Explain why one would guess the 2010 population of a state is
roughly a linear function of the 2000 population of the state.
(b) Download the 2000 and 2010 populations of the 50 states. Pro-
duce a scatterplot that has the 2010 population as a function of
the 2000 population. Find the equation of a best fitting curve
for the data.
(c) Explain what the y-intercept means in terms of people moving
to or away from states with large populations.
9. The tax revenues of the states can be found online. (A good site is
the census bureau at http://www.census.gov/govs/state/5 .)
(a) Explain why one would guess the 2010 tax revenue of a state is
roughly a linear function of the 2010 population of the state.
(b) For 10 states, produce a scatterplot that has the 2010 tax rev-
enue as a function of the 2010 population. Find the equation of
a best fitting curve for the data.
(c) Explain what the y-intercept means in terms of the relationship
of the size of the state and the tax burden per person.
population
5 http://www.census.gov/govs/state/
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 59
Standalone
Section-1-6-Examples.xlsx
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 60
Figure 1.6.2
I then go to the data tab and under the What-If analysis menu choose Goal
Seek. In the Goal Seek dialog, I want to change B3, to f (x), to 40 by changing
A3, or x. I then select OK.
Figure 1.6.3
Excel finds the value and asks if it is OK to replace the initial guess with
that value. In this case, Excel found the value of 11.66666667 or 35/3, which
we could also have found by simple algebra.
Figure 1.6.4
• We note that Excel is not solving the problem algebraically, but is finding
a numerical approximation within a preset tolerance.
For most of our work, that is close enough. Sometimes, however, we may
want more precision. (Our units may be millions of dollars.) In that case, we
can improve the precision with a work around. We add another cell with a
formula whose value is a large number, say 106 , times the error. We then use
Goal Seek to make that value close to zero. We effectively reduce our error
tolerance by a factor of our large number. Applying this to our example gives:
Standalone
We can see that the curves cross when q is somewhere between 100 and 110.
To make this a Goal Seek problem, we add an extra column for the difference
between supply and demand, and look for where that is zero.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 63
Standalone
(We will look at this example in greater detail in a later chapter. For now,
note that this example is in the Excel notebook for this section.) We can see
that we have a bit more than $420,000 after 40 years.
With Goal Seek it is easy to ask the question of how we need to change the
problem to have a balance of $500,000 after 40 years, either by changing the ini-
tial deposit, or the rate at which deposits are increasing, or the expected yield.
We see that we need a yield of 5.74% to have $500,000 ready for retirement.
It is worthwhile to note that in this case our final balance is the result
of a 120-step computation with our input variable. Goal Seek finds a solu-
tion without us having to reduce that 120-step computation to a single long
formula.
Standalone
As mentioned earlier, the reason for looking under the hood of Goal Seek is
to understand when it gives us an unexpected answer. A simplified description
of the method used is that it heads down to where it expects to find a solution
and repeats the process until it is within 0.001 of the desired answer. There
are several easy ways for this method to cause problems.
Standalone
As a general rule, Goal Seek will get to the correct answer if there are no
big curves between the guess and the answer. Another difficulty arises if you
ask Goal Seek a question for which there is no answer. The easy case is when
there is no answer and we don’t even get close. We could ask it to find an x
with x2 + 1 = 0. Since we know that all squares are non-negative, this does
not have an answer. Goal Seek will tell us that, but it will make some pretty
wild guesses.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 67
In this case Goal Seek will run for a fixed number of iterations and tell us
it “may not have found a solution.” In that case it will tell us where it ended
and give us the choice of accepting that point, or cancelling and going back to
where we started. If there is no solution and one of our intermediate points
was close to a point with a flat tangent line, we may wind up anywhere.
The more challenging case arises when there is no answer, but we get close.
We can ask Goal Seek to find an x with 1/x4 = 0. Clearly this problem has
no answer. However, if we start with a guess of x = 1, we get an answer
of x = 6.14798. That is because 1/6.147984 is within our tolerance of 0. In
both of these cases, we see that when we use Goal Seek we should also look at
the graph of the function in question to make sure we are asking a reasonable
question.
a continuous function, this means finding a value of x where f (x) is too low
and another value where f (x) is too high.
While Excel is a powerful tool, we should always ask if there is an easier
way to do a problem. Most of the examples we looked at in this section boil
down to finding a solution to f (x) = 0 where f (x) is a simple equation. We
can solve such problems more quickly with Wolfram Alpha.
As noted above, Goal Seek is most useful for problems with lots of steps
where we would have difficulty reducing the problem to a single equation.
B Goal Seek lets you determine the input of a function that gives a
desired output.
C Goal Seek is found by choosing what if analysis.
D Goal Seek only works with if the function can be put in a single cell.
E Goal Seek always finds the answer closest to the starting value.
F Goal seek gets confused by functions that asymptotically approach
zero.
G Goal Seek stops when it finds an answer whose output is within
0.001 of the desired output.
H None of the above
Exercise Group. Use Goal Seek to find where the given equation has the
desired value.
1. Let f (x) = −2x2 + 20x + 7. Find an x so that f (x) = 50.
Solution. Wolfram detects two solutions.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 69
Note that we can get more digits if we want or return to the exact
answer
6. Let f (x) = 1000 ∗ (1/2)(x/7) . Find an x so that f (x) = 50.
Exercise Group. Use Goal Seek to find the indicated number of points
where the curves intersect.
7. Find an intersection point of f (x) = 5x + 7 and g(x) = 40 − 2x.
Solution. Finding the intersection point means we are setting the
two equations equal to one another. Wolfram will include a plot of
the solution as well as the numerical answer.
33
Wolfram tells us that x = 7 . We can plug that into one of the
equations and get
66 280 66 214
y = 40 − = − = .
7 7 7 7
So the intersection point is (x, y) = ( 33 214
7 , 7 ).
8. Find an intersection point of f (x) = 5x and g(x) = 9x/7.
9. Find an intersection point of f (t) = exp(−0.05t) ∗ (3t + 5) and g(t) =
t/10.
Solution.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 71
Solution.
(a) Using Excel we find the best fitting polynomial of order 2:
(b) Using Wolfram we then find where the profit is 0. Using the approx-
imate form of the solution is preferable in this case because we want
to know at what Sales we have 0 profit (the break-even points).
(c) What is the payout from the two opportunities for a 30-year invest-
ment?
(d) What is the second period of time when the two opportunities offer
the same return?
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 73
(b) What happens when Goal Seek tries to find a solution starting at
x = 2?
(c) Explain why, from the graph of f (x), we should expect this problem.
Solution.
(a) The entry in cell B2 is =(10*A2-1)*EXP(-A2)+2.
In the screen grab the values of f for x = 1 and x = 2 are given,
and below it the result for the GoalSeek procedure are given.
Looking at the graph we see that there is clearly only one solution
to the equation (10x − 1) ∗ exp(−x) + 2 = 0.
If we start Goalseek at x = 2, the graph is sloping down to the right,
which is why Goalseek approximates the zero to be at about = 53.
The graph looks to be asymptotically approaching the x-axis. In
this case Wolfram would have given the correct answer a bit more
easily.
16. Let f (x) = x2 ∗ exp(−(x2 )).
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 74
(a) Find a solution with Goal Seek, starting with x = .5. Does this
represent an actual solution?
(b) Find a solution with Goal Seek, starting with x = 2. Does this
represent an actual solution?
Chapter 2
Business Applications
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/
Section-2-1-Examples-unworked.xlsx
2 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/
Section-2-1-Examples.xlsx
75
CHAPTER 2. BUSINESS APPLICATIONS 76
change in price ∆p
slope of supply curve = = > 0.
change in quantity supplied ∆q
The law of demand looks at the economy from the consumer’s point
of view. Price and quantity available for sale always move in the opposite
direction. If the price goes down, we can assume that all the old consumers
are still willing to buy at the lower price, but some more consumers may enter
the market. If the price goes up, no new consumers will enter the market, and
some old consumers may leave the market. For a linear model:
change in price ∆p
slope of demand curve = = < 0.
change in quantity demanded ∆q
When we look at a graph of the supply price graph and the demand price
graph on the same graph, we know the supply curve goes up as we go left
to right, while the demand curve goes down. From the properties of lines we
know there is a single point where such a pair of lines can intersect. It is at
the point where the amount of goods offered for a price equals the amount of
goods desired for the same price.
Standalone
When cell D2 is zero, the supply price will be the same as the demand price.
We now invoke Goal Seek.
Standalone
Next we add linear trendlines for both the supply and demand. We select
the option to show the equations.
□
There is one more detail worth noting from this last example. Depending
on the units used, the slope can be very close to zero. If we are selling tens of
millions of units for a price under a dollar, the change in price of a penny may
correspond to a change in quantity of several thousand. Make sure to include
enough digits for your equation to be meaningful.
Example 2.1.5 Computing Sales.
Standalone
Assume the supply and demand curves are linear for quantities between 600
and 1300. Find the best fitting lines for the supply and demand functions.
Find the equilibrium point. Make a chart listing how many we can sell for
$6.40 and $6.60. Remember that sales will be the minimum of the supply and
the demand.
Solution. We start by putting the data into a spreadsheet and finding the
best fitting lines. We select the option to show the equations in the chart.
CHAPTER 2. BUSINESS APPLICATIONS 80
We add columns for the projected supply and demand prices, using the
equations obtained from the best fitting lines. We also add a column, and
compute the difference of the supply and demand functions. We can now use
goal seek to solve the problem.
At equilibrium we sell 956 gizmos at $6.50. To find sales at $6.40 and $6.60,
we use Goal Seek to get those values at both supply and demand prices.
CHAPTER 2. BUSINESS APPLICATIONS 81
We see that we can sell 1055 gizmos at $6.40, but can only obtain 925. Thus
our sales at $6.40 will be 925. At $6.60 we can obtain 987 gizmos, but can only
sell 855. Thus our sales at $6.60 will be 855. We can eliminate a step in this
process if we recall that below equilibrium price the constraint is supply, while
above equilibrium price the constraint will be demand. □
Exercise Group. Given the equations of the supply and demand curves:
(a) Evaluate the curves at q0 .
(b) Find the market equilibrium.
1. Given SupplyPrice = 3Quantity + 10 and DemandPrice =
−2Quantity + 30, with q0 = 6.
Solution.
(a)
CHAPTER 2. BUSINESS APPLICATIONS 82
From the table we see that at q0 = 6 the supply price is $28 and
the demand price is $18.
(b) The market equilibrium happened to show up without requiring
any more work. The equilibrium occurs when q = 4 and the
price is $22.
If we had not seen the equilibrium in the table, we should graph
the table and determine what values of q we should look at.
After adjusting the table we can use Goal Seek to find the equi-
librium point: Solvesupply − demand = 0.
2. Given ps = 2q + 20 and pd = −q + 200, with q0 = 40.
3. Given SupplyPrice = .2q +157.3 and DemandPrice = −0.01q +3468.9,
with q0 = 6000.
Solution.
(a) The initial entries:
Initial attempt at the data includes the quantity 6000 (to answer
part a)
quantity 50 100
Supply price 4 10
Demand price 9 5
7. Given supply and demand data:
quantity 60 70 90 100
Supply price 14 20
Demand price 19 16
Solution.
(a) We start by using trendlines to find the linear model functions.
Once we have the function we create a second table using the
functions instead of the initial data. The equations were edited
to indicate which one is the supply and which one is the demand
function.
CHAPTER 2. BUSINESS APPLICATIONS 84
(b) The second table will be set up to give us the supply, demand
and the supply − demand so we can use Goal Seek to find the
market equilibrium.
Solution.
(a)
Exercise Group. For Exercise 2.1.3.10–2.1.3.12, given the supply and de-
mand data:
(a) Find equations of the supply and demand curves, assuming they are both
linear.
(b) Find the market equilibrium.
(c) Find the projected supply and demand prices for the extra quantities
given.
10. Given the supply and demand data:
Solution.
(a) For this problem the trendlines are truly models and will find
the best fit curve.
However, in the previous section we worked with two price functions, the
supply price and the demand price. Since we can only make a sale if the
consumer is willing to buy, we typically use the demand price in computing
revenue. Our model is now
Section-2-2-Examples-unworked.xlsx
2 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/
Section-2-2-Examples.xlsx
CHAPTER 2. BUSINESS APPLICATIONS 87
Obviously, we don’t expect to find the limiting cases in the real world. In
real world cases the revenue function has a negative coefficient for the quadratic
term and is a downward facing parabola.
Standalone
DemandPrice(q) = 10 − q/1000,
if the quantity is between 2000 and 8000. Find the revenue function and graph
it over the region where it is defined.
Solution. We set up a chart in Excel with revenue defined as
SupplyPrice ∗Quantity.
CHAPTER 2. BUSINESS APPLICATIONS 88
When we graph we note that the scales are quite different for price and
revenue. Thus we want to use secondary axes to capture the scale of both
price and revenue. We can also put different labels on the two vertical axes.
2.2.2 Cost
Once again we will start with a simplified model for cost.
• For our (simplified) model we will break costs into fixed costs
and variable costs.
• Fixed costs include the costs of being in business. They might
include license fees, rent for a store or plant, and the cost of
furnishings and equipment.
• Variable costs are tied to the amount you produce or sell. For a
manufacturer they might include raw material or labor costs. For
someone in sales they might include the cost of goods.
• For our simplified model, we assume that variable costs are pro-
portional to quantity. This makes our cost function linear.
Example 2.2.3 Finding Linear Cost. We can set up a small gizmo manu-
facturing shop for $6,000. The raw materials for producing gizmos cost $14 per
unit. Find the cost function for gizmo production. Find the cost of producing
2500 gizmos.
Solution. The fixed costs are the y value of the y-intercept of the cost func-
tion. The per unit material cost is the slope of the function. We have
2.2.3 Profit
For the third piece of the model, we look at profit. We have the simple formula
For our simple examples where cost is linear and revenue is quadratic, we
expect the profit function to also be quadratic, and facing down. We will
obviously be interested in the spots where the profit function either crosses the
axis or reaches a maximum.
CHAPTER 2. BUSINESS APPLICATIONS 90
Standalone
□
CHAPTER 2. BUSINESS APPLICATIONS 91
We can find break-even points by using Goal Seek and setting profit to 0
while changing quantity. In this case, we see that we have break-even points
when the quantity is 2000 or 5000, since those numbers were already on our
chart.
The first break even point tells us that, if our price is more than $13.00,
we will not attract enough customers to be able to turn a profit. The second
break even point says that is we bring our price down below $10, we will bring
in enough customers, but our revenue will not cover expenses. □
Example 2.2.7 Repeat, Starting With Data.
Standalone
Assuming that price and cost are well modeled by linear equations, find the
break-even points and explain what they mean with units included in the ex-
planation.
To find the break-even point when we are given data instead of an equation,
we usually follow this procedure: Find the best fitting equations for price and
cost. From those equations, produce formulas for revenue and profit. Use the
formulas to find the break-even points using either algebra or Excel.
Solution. We put the data into Excel and ask for best fitting lines.
We enter these functions in new columns in the spreadsheet and then com-
pute projective revenues and profit. We then use Goal Seek to find places where
the projected profit is 0. The first break-even point tells us that we expect to
break even if we sell 1.83 million units. We can do that by setting the price at
$16.05. The second break-even point is at 14.15 million units. We reach that
sales volume by lowering the price to $6.45. While we will have gained market
share, we will no longer be making a profit.
Standalone
These equations have only one digit of accuracy. In general, that will not
be accurate enough.
We enter these functions in new columns in the spreadsheet and then com-
pute projective revenues and profit. We then use Goal Seek to find places where
the projected profit is 0. The first break-even point goes from 1.83 million at
CHAPTER 2. BUSINESS APPLICATIONS 94
price of $16.05 to 1.82 million at a price of $1602. The second break even point
goes from 14.15 million units at a price to $6.45 to 13.75 million at a price of
$6.48.
The solution is to right click (Command click on a mac) on the label and se-
lect “Format Trendline Label”. Then change category from general to number,
and choose 10 decimal places. This gives us the equations:
We then go through the same process at get our original answers back.
H Fixed costs include the costs of being in business. They might in-
clude license fees, rent for a store or plant, and the cost of furnishings
and equipment.
I For our simplified model, costs= fixed costs + unit costs∗quantity.
J The point at which revenues equal expenses (cost) is called the break-
even point.
K None of the above
C The point at which revenues equal expenses (cost) is called the break-
even point.
D Fixed costs include the costs of being in business. They might in-
clude license fees, rent for a store or plant, and the cost of furnishings
and equipment.
Answer. C, D, F, G, H, J
Exercise Group. For Exercise 2.2.7.2–2.2.7.9, given the equations of the
cost and demand price function:
(a) Identify the fixed and variable costs.
(b) Find the revenue and profit functions.
(c) Evaluate cost, demand price, revenue, and profit at q0 .
CHAPTER 2. BUSINESS APPLICATIONS 96
Cost(6) = 3(6) + 10 = 28
DemandPrice(6) = −2(6) + 20 = 8
Revenue(6) = −262 + 20(6) = −72 + 120 = 48
Profit = Revenue − Cost = 48 − 28 = 20.
(e) Graph the profit function over a domain that includes both
break-even points. Add a textbox and label to identify the first
break-even point.
If we had done the whole problem in Excel it would look like
this:
CHAPTER 2. BUSINESS APPLICATIONS 97
Quantity 50 100
Demand price 10 8
Cost 300 450
Solution.
(a) If the table only has 2 data points, Excel can get confused wether
the data is in rows or columns. We duplicated one column to
get the data plotted correctly.
Quantity 60 70 90 100
Demand Price 19 16
Cost 460 540
8. Given demand price and cost are the linear functions that best fit the
data below and that q0 = 75.
CHAPTER 2. BUSINESS APPLICATIONS 100
Solution. We plot the data, and find the linear models for demand
and cost.
Cost = 0.3121x − 169.35
DemandPrice = 5 ∗ (10)−5 x + 1.356
Given the demand price and the cost we create a table us-
ing the formulas and we also include a row for the Revenue =
(DemandPrice ∗Quantity) and Profit = (Revenue − Cost)
Goal Seek using the quantity of 20000 as the basis gives a break-
even point at q = 21, 039. The other place where the profit is 0
occurs for q = −161.
(e) Graph the profit function over a domain that includes both
break-even points. Add a textbox and label to identify the first
break-even point.
CHAPTER 2. BUSINESS APPLICATIONS 101
The optimal demand price is $6.48, which allows them to sell 676
tickets and break even.
CHAPTER 2. BUSINESS APPLICATIONS 102
Exercise Group. For Exercise 2.2.7.11–2.2.7.13, given the cost and demand
data:
(a) Find best fitting equations of the cost and demand curves, assuming they
are both linear.
(b) Find the revenue and profit functions and evaluate them at the extra
given value.
(c) Find the break-even points.
11. Given the cost and demand data:
Quantity 100 120 140 160 180 155
Cost 1015 1152 1327 1467 1651
Demand price 21.3 18.1 14.7 12.3 8.6
12. Given the cost and demand data:
Solution.
(a) Find best fitting equations of the cost and demand curves, as-
suming they are both linear.
Using trendlines we get
(b) Find the revenue and profit functions and evaluate them at the
extra given value.
Creating a table with the cost and demand functions we get
Section-2-3-Examples.xlsx
CHAPTER 2. BUSINESS APPLICATIONS 104
Standalone
We see that the equilibrium price is at $554.64. At that price the supply
and demand will both be 559.45. □
Example 2.3.3 Nonlinear Functions From Data.
Standalone
Thus we have:
Next, we follow our models to get equations for revenue and profit.
Finally, we load these equations back into Excel and use Goal Seek to find
the break-even points. Looking at projected profit on the chart we see a sign
change near 1000, so we suspect a break-even point there. We also note that
profit seems to be going up until q is about 300, so I test for a break-even point
for small values of q.
The functions ROUND, ROUNDUP, and ROUNDDOWN are all used for
rounding. They have a second argument that specifies the number of dig-
its to which we are rounding. It should be noted that Excel understands up
and down as away from zero for negative numbers. Thus it will round −1.5
up to −2. The CEILING and FLOOR functions also do rounding, but with
some different features. Instead of specifying the number of digits in the an-
swer, these functions round to a multiple of the second argument. As expected,
CEILING rounds to the next higher multiple, and FLOOR rounds to the next
lower multiple.
Standalone
Standalone
When we look at the numbers we see that the total cost of producing 998
widgets is $26,986 and the cost of producing 1009 widgets is $28,063. When we
look at the unit costs, we expect the cost per unit to generally go down as we
produce more, since the fixed costs are distributed over more units. However
the per unit cost is $27.04 when we produce 998 widgets, but that goes up to
$28.81 when we make 1009 widgets, since we had to buy another block of raw
material.
□
The IF command is used when we use different formulas for different cases.
Some easy examples are overtime pay, benefits costs, and volume discount. In
many work situations employees are paid one rate up to a certain amount of
work and a second rate for additional work. It is also common for full time
employees to receive certain benefits, like retirement, that are not offered to
part time employees. It is also common for certain industries to offer different
rates for their biggest and best customers. The basic syntax of the IF command
is:
CHAPTER 2. BUSINESS APPLICATIONS 108
The values for true and false can be numbers, string, or formulas to evaluate.
Example 2.3.8 Computing Overtime Pay.
Standalone
Looking at the computed values, the employees are owed $280, $387, $445,
$418, and $525, respectively.
□
If our functions are discontinuous, we need to exercise a bit of care with our
economic models and the points of interest we have been finding. The market
equilibrium and break-even points are both places where two functions are
equal. When the mathematics does not give us a clear answer, we should think
about the problem and consider what answer makes the most sense. Consider
a simplified example to illustrate the point.
CHAPTER 2. BUSINESS APPLICATIONS 109
Standalone
It is clear from the graph that the market should reach equilibrium at a
quantity of 2, but it is not clear what the equilibrium price should be. We need
to do some reasoning about the behavior described by the equations. From our
formula, the supply price for 2 widgets is $2. However if we look at the supply
prices of 2 + h for small values of h, we see that the limit of the supply price
from above is $4. In practical terms the suppliers will produce 2 widgets for
any price from $2 to $4. If we offer $2, they are also willing to produce 2
widgets. If we offer a price of $3.95, they are still only willing to produce 2
widgets. The suppliers will be thus willing to produce 2 widgets at a price of
$3. The equilibrium price is 3.
If we want to look at the graph in Excel, it is useful to plot points very
close to the discontinuity on both sides. For this problem, we might look at
both 2 and 2.0001.
CHAPTER 2. BUSINESS APPLICATIONS 110
□
A lesson to remember is that we need to pay attention to places where our
functions are discontinuous and that we need to understand what our economic
model should do when the curves do not cross. For example, we will understand
the break-even point to be the first point where revenue is greater than or equal
to costs. In the continuous case, this reduces to our old definition.
Table
Table
Goal Seek
near q =
40
Exercise Group. For Exercise 2.3.4.6–2.3.4.8, given the supply and demand
data:
(a) Find best fitting equations of the supply and demand curves, using the
assumptions given in the problem.
(b) Find the market equilibrium.
(c) Find the projected supply and demand prices for the extra quantities
given.
6. Given the data
Quantity 100 120 140 160 180 155
Supply price 32 35.5 39 42.6 47
Demand price 47.2 42.5 38.3 34.5 31
and the assumption that supply price and demand price are both
exponential.
7. Given the data
Quantity 5017 5937 7003 8070 9017 9943 7500
Supply price 17.5 19 20.4 23.7 25.1
Demand price 29.6 26.7 21.3 19.2 17.6
and the assumption that supply price is linear and demand price is
exponential.
Solution.
Finding all
valuers with
these for-
mulas. The
yellow ones
are the ones
we are look-
ing for.
Using Goal
Seek to find
the equilib-
rium values
in column E
and the assumption that supply price is linear and demand price is
exponential.
(b) Give a chart of the values of the function evaluated as x goes from 0 to
100 in steps of 5.
(c) A graph of the function.
(d) A list of x-values where the function is discontinuous. (Where the graph
jumps.)
9. Let (
ln(2x) x ≤ 50
f (x) = .
200 exp(−x/10) x > 50
Solution.
(a) The Excel command is =IF(A2 < =50,
LN(2*A2),200*EXP(-A2/10))
(c) The graph will look as follows. Note that the function is not
defined at 0.
CHAPTER 2. BUSINESS APPLICATIONS 114
(d) The function is not continuous at x = 50. Note that the function
drops from near 4.5 to about 1 rather suddenly.
10. Let (√
2x + 21 x ≤ 50
f (x) = .
10 sin(x/5) x > 50
11. The cost of shipping an item is $2 per pound, or fraction thereof, with
a minimal cost of $5.
Solution.
(a) The function is =MAX(2*A2,5)
(b)
(c) See the graph above. This function will return y = 2x, unless
the output drops below 5. It is thus also useful to look at this
function between 0 and 20 in steps of 1.
(d) The graph has a slight bend on the lower left, but there is no
discontinuity.
12. Widgets cost $10 each when purchased individually. They cost $9 each
when purchased in packages of 10. They cost $8 each when purchased
in cases of 50.
13. Gizmos cost $10 each for the first 9 on an order. The 10th through
49th gizmo cost $9 each. Additional gizmos beyond that each cost $8.
Solution. Writing this in math terms:
10x x≤9
Cost = 90 + 9(x − 9) 10 ≤ x ≤ 49
450 + 8(x49) x ≥ 50
CHAPTER 2. BUSINESS APPLICATIONS 115
or
10x x≤9
Cost = 9 + 9x 10 ≤ x ≤ 49 .
58 + 8x x ≥ 50
(a) The Excel command is =IF(A2 < 10, 10*A2, IF(A2 < 50,
90+9*(A2-9),450+8*(A2-49)))
(b)
(d) Note that this function is only defined for integers so technically
it is not a continuous function at all. If we use the same defini-
tion for all reals as long as the pieces change at 9 and 49. Note
however that the slopes change at 9 and 49.
14. Let f (x) be the minimum of (x − 50)2 /25 and 50.
15. The cost of parking is $5 per hour rounded to the nearest half hour.
For the chart of the values let x goes from 0 to 4 in steps of 0.2.
Solution.
(a)
Revenue = q ∗ 40(0.90)q/10
Profit = q ∗ 40(0.90)q/10 − 10q − 200.
(b)
DemandPrice(10) = 40 ∗ (0.90)10/10 = 36
Cost(10) = 10 ∗ 10 + 200 = 300
Revenue(10) = q ∗ 40(0.90)10/10 = 36
Profit = 400(0.90)10/10 − 300 = 60
(c) The first break-even point was found using Goal Seek and occurs
when q = 7.4.
(d)
q 2
Profit = q ∗ 47(0.96)q/11 + 2( ) − 17q − 1234
1000
(c) Using q = 60 as the basis, using Goal Seek gives the value of our
first break-even point as being 59.75.
(d)
(b) Recreate the table, but now with the functions we found:
CHAPTER 2. BUSINESS APPLICATIONS 118
(c) The initial table does not include the break-even points.
So we redo the table starting with q=0 and taking steps of 400.
Goal Seek on the quantity q =0 reveals the first break even point
to be at q = 107.27.
(d)
22. Given demand price is a linear function and cost is a quadratic func-
tion fitting the data below and that q0 = 800.
(c) The table shows that the breakeven point is close to q = 70.
Goal Seek shows it’s at q = 72.5.
(d)
24. Given (
200 − 0.05q q ≤ 50
DemandPrice(q) =
200 − 0.07q q > 50
and (
4000 + 40q q ≤ 100
Cost(q) =
4000 + 37q q > 100
with q0 = 300.
Chapter 3
Calculus looks at two main ideas, the rate of change of a function and the
accumulation of a function, along with applications of those two ideas. In this
course, since we are interested in functions in the financial world, we look at
those ideas in both the discrete and continuous case.
Marginal f (x + 1) = f (x + 1) − f (x).
♢
It is worthwhile to point out a detail that may cause a bit of confusion.
Note that we are defining marginal functions of x + 1 rather than the marginal
functions of x. This is the standard convention in finance where the question
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/
Section-3-1-Examples.xlsx
120
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 121
It is noteworthy that the three examples mentioned are all cases where the
cost of producing the goods has already been set, the goods cannot be saved
and sold later, and any change in revenue adds to the profit.
Example 3.1.2 Marginal functions for widgets.
Standalone
Cost(q) = 40 + 3q + q 2 /10
DemandPrice(q) = 30 − q/2.
I want to compute the marginal cost, revenue, and profit to produce the
11th and 26th widget. I also want to understand the marginal cost of producing
the 1st widget.
To set up the problem, I recall that we assume we are selling at the demand
price, the highest price consumers will pay and still have us sell all we produce.
Thus the formulas for revenue and profit are:
Revenue(q) = (DemandPrice(q)) ∗ q
Profit(q) = Revenue(q) − Cost(q).
Figure 3.1.4
I then create additional columns for the marginal functions.
Figure 3.1.5
Now we simply go back to values and see the values.
□
The last equation illustrates the use of marginal functions. While producing
and selling the 26th widget did increase total revenue, the marginal profit was
negative, so I would have been better off if I had made fewer widgets. Notice
that the marginal value of producing the 1st widget is not on the spreadsheet
and needs to be dealt with as a special case. Given our functions we have
two reasonable ways to understand the value Cost(0). Either we can assume
that there is no cost to not being in a business, so Cost(0) = 0, and our cost
function was only valid for positive numbers, or that the Cost(0) is understood
as the fixed costs, which we have already undertaken, like a tax or license
fee, so Cost(0) = 40 for this problem. Both are reasonable interpretations.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 123
We will need to look at the context of our problem to decide on the correct
interpretation.
Many questions in business can be translated into making some function
as big or small as possible, depending on whether we think the value is good
or bad. It is thus often useful to see a graph of both the function of interest
and the related marginal function on the same graph.
Example 3.1.6 Profit and Marginal Profit Together.
Standalone
We see that profit reaches a maximum where marginal profit is zero. This
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 124
□
The more realistic situation for us to face is one where we are given a
collection of data points. In that situation, we need to first find a best fitting
curve and use it to make predicted values. Then, we can find the marginal
function of interest and do our comparison.
Example 3.1.8 Marginal Profit from Data.
Standalone
Widgets produced 40 50 78 87 95
Profit $7,486.40 $14,505.60 $23,431.60 $23,014.30 $21,258.50
Use Marginal Profit to find the level of production that maximizes profit.
Solution. I put the data into a spreadsheet and find a best fitting curve to
produce a formula. Looking at the data, I will assume that profit is a quadratic
function of the amount produced.
With the formula from the trendline, I can add a column for
PredictedProfit(x). The obvious adjustment produces PredictedProfit(x + 1).
It is then easy to compute the value of MarginalProfit(x + 1).
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 125
Looking at the graph, the maximum is close to x = 80. I simply add some
rows with appropriate values of x to get the desired answer.
When x = 80, the Marginal Profit turns negative. The maximum profit is
$23,492.96, obtained by producing 80 widgets. □
Standalone
I can see that sales are trending upwards, but there is a seasonal variation
added in. Excel will not do a good job of modeling this function with a trendline.
Thus, I want to find a rate of change over a period of 12 months to eliminate
the seasonal variation. To find the most recent trend I use the most recent
data with a time period of 12 months.
Sales(25) − Sales(13)
Monthly Rate of Change =
25 − 13
1298 − 1176 122
= = ≈ 10.
25 − 13 12
□
It is worth noting that the need to adjust for the right time period for
comparisons is probably the reason that company revenue reports typically
show the previous quarter as well as the quarter from a year earlier.
Standalone
columns and the use of quick fill will make our life easier.
Suppose my revenue function is Revenue(q) = −0.2q 2 +20q−5 and I want to
compute marginal revenue. Then Revenue(q + 1) = −0.2(q + 1)2 + 20(q + 1) − 5.
Experience shows that students will often make a typing mistake in the second
formula, often forgetting parentheses somewhere or forgetting to change one of
the copies of q to q + 1.
Figure 3.1.13
One solution is to add an extra column for q + 1 next to the column for
q. Then the formula for Revenue(q + 1) is obtained by quick filling form the
formula for Revenue(q).
Figure 3.1.14
This trick will be even more useful in the next section when we want to com-
pute the values of Revenue(q), Revenue(q + 0.001), and Revenue(q − 0.001).
(c) From the shape of the graph of the marginal function, decide what kind
of graph it appears to be.
(d) Find the formula for a best fitting curve for the marginal function.
(e) List the regions where the original function is increasing and the regions
where it is decreasing.
(f) List the regions where the marginal function is positive and where the
marginal function is negative.
7. Let Cost(q) = 5000 + 23q.
Solution.
(c) The table and the graph indicate that the marginal function is
a constant (23 to be precise)
(d) MarginalCost(q) = 23
(e) The cost function is always increasing.
(f) The marginal function is always positive.
8. Let Revenue(q) = 16q.
9. Let Revenue(q) = −0.3q 2 + 10q − 15.
Solution.
(c) The table and the graph indicate that the marginal function is
a line.
(d) MarginalRevenue(q + 1) = −0.6q + 9.7
(e) The Revenue function is increasing until q is about 17.
(f) The marginal function is positive until q is about 17.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 130
(c) The table and the graph indicate that the marginal function is
a quadratic function.
Exercise Group. For problems 13-16 you are given data for a function.
(a) Assuming the function is of the kind specified; find a best fitting curve
for the function and a formula.
(b) Plot the function and the marginal function on the same graph.
(c) From the shape of the graph of the marginal function, decide what kind
of graph it appears to be.
(d) In a textbox, describe your conclusions about the sign of the marginal
function and the rising or falling of the original function.
13. Assume Profit(q) is a polynomial function of degree 2 and that you
have the following data:
Solution.
(a) The best fitting curve is: y = −0.0297x2 + 8.26x + 227.96
(b) If MarginalProfit(x + 1) = Profit(x + 1) − Profit(x), then you
can set this up in Excel by finding: q, Profit(q), Profit(q − 1) and
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 131
MarginalProfit(q).
The chart was created and the marginal profit was plotted using
the secondary axis.
Year 2 4 6 8 10
Resale Value $8,607 $7,593 $6,423 $5,684 $5,051
Solution.
(a)
ResaleValue(x) = 9836e−0.068x .
Year 10 20 30 35 40
Amount $54,713 $143,909 $289,476 $395,709 $533,071
17. The monthly revenue, in thousands of dollars for your company is found
to follow:
Revenue(t) = 300 + 5t + 30 sin(t/6 ∗ π()).
Plot the revenue and marginal revenue. Explain why marginal revenue
is not a good indicator of growth. Plot average rate of change over a 12-
month span and explain why it is a better measure of growth.
Solution.
(a) Explain why looking at marginal change of revenue from one quarter
to the next is misleading.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 133
where limx→a f (x) is understood to be value that f (x) gets arbitrarily close to
by making x arbitrarily close to a. ♢
The symbol ∆ is the captial Greek letter Delta, which is commonly used to
signify change in the sciences. Since we can’t easily enter Greek letters into an
Excel worksheet, we will use del x to represent ∆x in Excel.
Our task in this section is to turn our intuitive notion and definition and
into a process that lets us find the value, and to find it efficiently.
Example 3.2.2 A simple derivative at a point. Let f (x) = x2 . We
would like to find f ′ (1).
Standalone
default.aspx
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/
Section-3-2-Examples.xlsx
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 134
f (x) = x2 near x0 = 1. Since I want to be able to zoom in, I set up the graph
so that it plots points that are multiples of ∆x from x = x0 . I also want to
plot the line connecting the points (x0 , f (x0 )) and (x0 , f (x0 + ∆x)) and notice
that the slope of the line connecting these points, the secant line, is
Figure 3.2.4
The worksheet is designed to make it easy to change the value of ∆x.
Figure 3.2.5
As we can see, if we let ∆x = 1, the slope is 3, but we have not zoomed in
far enough for the graph of f (x) to look like a straight line. Letting ∆x = 0.01,
the slope is 2.01, and the graphs of the function and secant line seem to be the
same.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 135
Figure 3.2.6
With some experimentation, taking both positive and negative values of
∆x, we get the following table of values:
∆x slope ∆x slope
1 3 -1 1
0.1 2.1 -0.1 1.9
0.01 2.01 -0.01 1.99
0.001 2.001 -0.001 1.999
It is clear that as ∆x gets very small, the slope of the secant line gets closer
and closer to 2. Thus f ′ (1) = 2.
Solution 2 (Solution B - Numerical Limit). The method of the first solution
takes too much work and requires us to reset a worksheet and keep track of the
slope as we try a number of values for ∆x. We would like to create a worksheet
that simply shows the values of the slope of the secant line for values of ∆x
and takes the value that this approaches. We can set up a worksheet where
each line takes ∆x from the previous line and divides by 10.
Figure 3.2.7
We get the same value whether we start ∆x at 1 or -1. Once again, we find
f ′ (1) = 2.
Solution 3 (Solution C - Calculator Definition). This method of finding the
derivative still has a number of difficulties. In the example above, the exact
answer we want (in this case 2) did not show up in any of our computations.
We also find that if we make ∆x too small, we run into a problem called round
off error. If the next chapter we will look at methods that compute derivatives
symbolically, but for this chapter we want an easy method of approximation.
We will use the approximation technique that is used by most graphing cal-
culators when they compute the derivative. They use a “balanced difference
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 136
quotient” where we find the slope of the secant line between points ∆x before
and after the point we are interested in. As the picture below shows, compared
to either the right secant or the left secant, for most functions the balanced
secant is closer to being parallel to the tangent line.
For our example this gives our familiar result that f ′ (1) = 2. □
We formalize this last approach.
Definition 3.2.8 Calculator Approximation of the Derivative.
f (x + .001) − f (x − 0.001)
f ′ (x) ≈ .
.002
♢
For the rest of this text, when we need to compute a numerical approx-
imation to the derivative, we will use the calculator approximation of the
derivative.
We should note that the calculator rule is an approximation technique,
rather than a definition. It will give a misleading answer for functions that do
not approximate a straight line in a window that is 0.002 wide. In this course,
the approximation will only cause a problem with functions that have corners
or cusps, like the functions f (x) = |x| and f (x) = x(2/3) at x = 0. The main
advantage of the using the calculator rule is that it is straightforward enough
to compute to allow us to plot a function and its derivative on a single graph.
This allows us to compare the graph of the function with the graph of the
derivative.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 137
Standalone
Figure 3.2.11
The picture above gives the minimal amount we need to type in. The rest
will be done with quick filling. The entry of cell B1 gives the formula for the
function. In cell D5 we evaluate the function using the first value of x from cell
A5. We have two values of x in cells A5 and A6 so that we can quick fill to get
a list of x values. We use absolute references for ∆x, so it will not change on
quick fills. We then fill cells E5 and F5 from cell D5, then fill row 6 from row 5,
then fill the rest of the chart from rows 5 and 6.
It is then a straightforward task to plot the two curves. We notice that the
graph of the function is a parabola. If the derivative is negative, the graph of
f (x) is decreasing. If the derivative is positive, the graph of the function f (x)
is increasing. The graph of f (x) reaches its minimum at the vertex, which is
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 138
also where f ′ (x) = 0. We also notice that the derivative of this parabola seems
to be a straight line. □
Several of our observations from this example work in general.
• Looking at a single point, the derivative of a function is the slope of the
line tangent to the graph at that point.
• The tangent line is a best linear approximation to the graph at a point.
• Looking at the derivative at lots of points, the graph of a function is
increasing when the derivative is positive, and the graph of a function is
decreasing when the derivative is negative.
• For the graph to have a point that is locally a maximum or minimum, the
derivative cannot be positive or negative, so the derivative must either
be zero or undefined for the graph of the function to have a maximum
or minimum.
Finding places where functions reach their highest and lowest values is an
important activity in mathematics. We will look at these applications in more
depth in upcoming sections. The reader is warned that we can have places
where the derivative is zero but the function is still increasing or decreasing.
Example 3.2.12 The derivative of a more complicated function. Com-
pare the graph of f (x) = x3 (x2 − 36) and the graph of its derivative, using
separate axes for the two graphs. What features of the graph of f (x) can be
located by using the graph of f ′ (x)?
Solution. The setup for this example is very similar to the last problem.
Since the values of f (x) range between -500 and 1500, we note that f (x) is
the blue graph and uses the axis in the center of the graph. Similarly the values
of f ′ (x) range between -500 and 2500, we note that f ′ (x) is the red graph and
uses the axis on the side of the graph.
This time we notice three places where the derivative seems to be zero,
when x is near −5, 0, and 5. We use goal seek on the derivative and find that
the derivative is zero when x = −4.648, 0, or 4.648. Looking at the graph of
f(x) at those points, we see that f (x) has a maximum when x = −4.648, and
a minimum when x = −4.648. When x = 0, f (x) is neither a maximum nor a
minimum. □
In the next chapter, we will look at ways to find the derivative of a func-
tion symbolically. We can already reason our way to symbolically finding the
derivative of simple functions. If our function f (x) is constant or linear, then
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 139
the graph of the function is its own tangent line, so the derivative is simply
the slope of the graph. For quadratic functions we noticed that the graph of
the derivative seems to be linear. If we can guess the form of the derivative,
we can use trendlines to produce a formula.
Example 3.2.13 Using trendlines to get the formula of a derivative.
Standalone
Once we have points for the derivative, we add a trendline using a linear
model. We set the options to show both the formula for the trendline and the
value of R2 . The fact that R2 = 1, indicates the trendline we found exactly
fits the data. In the workbook connected to this section there is a page for
Example 6B. It uses parameters for the coefficients on a quadratic formula, so
that you can explore the derivative of a general quadratic function. □
than the related marginal function, which is why the derivative is used for the
marginal function. However, in this text, we will stick to the correct definition
of marginal functions.
Reading Check
1. Reading check, 3.2, Numeric Derivatives and Limits,.This ques-
tion checks your reading comprehension of the material is section 3.2,
Numeric Derivatives and Limits, of Business Calculus with Excel. Based
on your reading, select all statements that are correct. There may be more
than one correct answer. The statements may appear in what seems to
be a random order.
Exercise Group. For each specified function and x-value, do the following:
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 141
(a) Find a value of ∆x small enough that graph of the function looks like a
straight line on the region from 5 ∗ ∆x before the x-value to 5 ∗ ∆x after
the x-value. Graph the function in this region and find the slope of the
corresponding secant line
(b) Estimate the derivative by finding the slope of the secant when ∆x takes
the values 0.1, 0.01, 0.001, 0.0001, -0.1, -0.01, -0.001, and -0.0001. Give
a value of the limit of the slope.
(c) Use the calculator estimate to estimate the slope of the tangent.
(d) Compare the value of the derivative f ′ (x) with the corresponding value
of the marginal function marginal f (x + 1).
Comment: For problems 1-10 it makes sense to set up the table once with
parameters that can be easily changed between problems.
The limit is 4.
(c)
f (x + 0.001) − f (x − 0.001)
f ′ (x) ≈
0.002
(a)
(c) From Row 21 we see that the slope of the tangent line is esti-
mated to be 7
(d)
Marginal f (4) = f (4) − f (3) = 7.
So the derivative is 7 and the marginal function is 7 at this point.
6. Use f (x) = x3 − 5 at x = 2.
7. Use f (x) = e2x at x = 1.
Solution.
(a)
(a)
(d)
Marginal f (6) = f (6) − f (5) = ln(6) − ln(5) ≈ 0.18.
10. Use f (x) = x3 − 5 at x = 2.
(a)
(a)
Solution.
(a)
(a) On a single graph, but using separate axes, graph the function and its
derivative.
(b) Looking at the graph of the derivative, decide what kind of function is
an appropriate model for the derivative.
(c) The trendline indicates the formula for the derivative can be
approximated by
y = 3e3x .
22. Let f (x) = ln(x).
Section-3-3-Examples.xlsx
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 148
The last two sections examined rate of change in both the discrete and
continuous case. The first application for rate of change at a point is to make
projections for values of the function close to that point. We want to find the
equation of a linear function that can be used to approximate our function.
This is straightforward using the point-slope version of a linear equation.
For the discrete case, given a function y = f (x), where we know value of,
mf (a + 1), the marginal change in f (x) to get to x = a + 1, then our discrete
linear approximation has the form:
Note the use of mf to denote the marginal change in f . This notation will be
used throughout this section. We will use linear fa (x) for the linear function
that intersects f (x) at x = a and x = a + 1.
The two formulas are almost the same. The discrete case uses the slope of a
secant line obtained by looking at points where the x values differ by 1. In the
differentiable case we look at the slope of the tangent line. One of the reasons
for looking at the linear approximation of a function is that linear functions
are easy to evaluate.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 149
Example 3.3.1 Estimating profit. The profit from selling 10,000 gizmos is
$487,253. We also know that marginal profit(10001)=$45. Estimate the profit
from selling 10,013 gizmos.
Solution. We use the formula from above:
Standalone
Standalone
Standalone
That brings us back to the last part of the question, which asks for a domain
where the approximation is good enough to use. The phrase “good enough to
use” will depend on the setting, but we will be happy with an estimate that is
within 1%. Since we are going to use this for interest rates, we are interested
in positive rates.
We modify the worksheet to allow a step size, ∆x, to be used. Then we
experiment with step sized till we get a domain where the error is under 1%.
We see that exp(r) ≈ 1+r for 0 ≤ r < 0.15. This gives us an approximation
we can use for rates of up to 15%. □
The last example illustrates that linear approximations should only be used
for a limited domain. The size of the domain where the linear approximation is
“good enough” will depend on the definition of “good enough” or the acceptable
error in our approximation. The good domain will also depend on how far the
graph is from linear, or how fast it is bending.
Reading Check
1. Reading check, Local Linearitys.This question checks your reading
comprehension of the material is section 3.3, Local Linearity, of Business
Calculus with Excel. Based on your reading, select all statements that
are correct. There may be more than one correct answer. The statements
may appear in what seems to be a random order.
Exercise Group. For Exercise 3.3.6–3.3.10, for the given function and value
for x0 :
(a) Calculate the numeric approximation of the derivative at x0 .
(b) Give the formula for the linear approximation at that point.
(c) Evaluate the approximation at x1 .
(d) Evaluate the function at x1 and compute the accuracy of the approxima-
tion.
6. f (x) = ln(x), x0 = 100, and x1 = 105.
√
7. g(x) = x, x0 = 81 and x1 = 85.
Solution.
(a)
g(x) ≈ g(81) + g ′ (81) ∗ (x − 81).
√
Note that g(81) = 81 = 9 and
√ √
′ g(81 + .001) − g(81 − .001) 81.001 − 80.999
g (81) ≈ = = .056.
0.002 0.002
(b)
g(x) ≈ 9 + 0.056 ∗ (x − 81).
(b)
Revenue(x) ≈ 24019 + 9.00636 ∗ (x − 3000).
(a) Find the linear approximation of f (x) at x0 for r = 1/3, 1/2, −1 and
2.
(b) Give a rule for the linear approximation for a general value of r.
(c) How accurate is the linear approximation for square and cube roots
of 1.1, obtained at x1 = 0.1?
Solution.
(b)
f (x) ≈ 1 + r ∗ x
(c) As the table shows, the error for using these approximations for the
square root and cube root of 1.1 is approximately 0.001.
3.4 Optimization
Link to worksheets used in this section1
In Section 3.2 we noticed that the high and low points of the graph of a
function often coincided with a point where the derivative of the function was
0. In a business setting, we are often concerned with finding the maximum
and minimum values of a function, because one or the other will be a best, or
optimum value. We typically want to maximize functions like profit, utility,
revenue, and market share. We typically want to minimize functions like cost
and liability. We will use the same basic process to optimize, whether the
extremum we are finding is a maximum and minimum.
Recall, we said that the derivative can be thought of as the slope of the
apparent line, obtained by zooming in on the graph of a function. Clearly, we
cannot have an extremum at an interior point of the domain if the derivative
is nonzero, because we could go either higher or lower by moving a little to the
right or left. Thus we can only have extrema at a critical point, a place when
the derivative is zero or undefined, or at an endpoint where we cannot go both
left and right. This gives us a small list of candidate points for the optimum
value.
Our process for optimization will be to find all the candidate points, then
to see which gives the highest and lowest values. When our curve has a point
that is a maximum or minimum in some interval around the point, we call it
a relative maximum or minimum. If it is the highest or lowest point for the
whole domain of the function it is called a global maximum or minimum.
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/
Section-3-4-Examples.xlsx
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 156
Standalone
with the function valid on the interval 0 ≤ Quantity ≤ 500. Find the minimum
and maximum profit in the given interval.
Solution 1 (Solution A: without calculus). The first example was chosen
because it can be done without using any calculus, so we solve it with easier
methods first. The profit function is a quadratic function in quantity, so it is a
downward pointing parabola. The location of the vertex is at Quantity = 200,
which we obtain from the coefficients of the quadratic and linear terms. Thus
we need to check this point and the two endpoints. Plugging in values, we get
(0, −5000), (200, 35000) and (500, −55000). The maximum occurs when we sell
200 widgets and our profit is $35,000, the minimum occurs when we sell 500
widgets and our loss is $55,000. A relative minimum occurs when we sell 0
widgets and our loss is $5,000.
Solution 2 (Solution B: with calculus). We want to set up the problem to
be able to graph the profit function and its derivative on the same graph. We
will us the calculator approximation of the derivative. As we did in the last
section, we set up a worksheet with columns for q, q + .001, q − 0.001, p(q),
p(q + .001), p(q − 0.001), and p′ (q). This allows most of the worksheet to be
filled in with quick fill.
We then look at the values, and compare the table to a graph. We find the
same three candidate points and the same maximum and minimum values.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 157
□
For a second example we want to look at a function where we can’t find
the maximum by algebraic means.
Example 3.4.3 Cumquat oil.
Standalone
Looking at the graph and the chart we expect to find local minima at the
endpoints, and the maximum when q is close to 50. We use goal seek to find
where the derivative is zero. As we see below, Goal Seek does not find a point
where the derivative is zero. Instead it finds a point where the derivative is
“close enough” to zero. By default, “close enough” is understood by Excel as
being within 0.001.
If the default definition of “close enough” is good enough for our purposes,
then the maximum profit of $166,727 occurs when we sell 51,998 pints of oil.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 158
(In fact, selling 2 more pints of oil will yield an extra 0.01 cents.) The minimum
profit occurs when we sell no product, in which case we have a loss of $30,000.
□
One of the things to notice about the last example is the robustness of the
method. From an algebraic point of view, the function was rather ugly. All we
needed to know to use the method was that the function was smooth enough,
that when we zoomed in to a scale of x changing by 0.001 the graph looked
like a straight line.
Throughout the section we have looked for places where the derivative is
zero when looking for extrema. We have not paid any attention to how we
decide if the point we find is a local maximum or a local minimum. There
are several approaches we could use. Since we are computing the derivative
we could note that a local maximum is a place where the function goes from
increasing to decreasing, so the derivative goes from positive to negative. (Sim-
ilarly, a local minimum is at a place where the derivative goes from positive
to negative.) There is also a test that looks at the derivative of the deriva-
tive. Those tests will be more useful in the next chapter when we are finding
a formula for the derivative by symbolic means. However, with the numeric
technique we are using, the easiest test is that a local maximum is greater than
or equal to points a little bit to both the left and right. We simply plug in
points a little bit to each side to test. Since a change in q of 0.001 makes the
graph look like a flat straight line, we change q by 0.01.
As expected, profit goes down as we move away from our expected maxi-
mum.
Example 3.4.5 Gizmo profit.
Standalone
We have three candidates for the extrema, the two endpoints and the critical
point at 162.5. However, by looking at the points to the side of the critical
point, we see it is a local minimum. We also see, that of our 3 candidate points,
the one that gives the maximum profit is the right endpoint, when quantity is
300.
For our first three examples we have been trying to find the minimum or
maximum of one-variable functions. Sometimes we need to do a bit of work to
get the function in that format. □
Example 3.4.7 Minimizing material costs.
Standalone
Solution. Using basic geometry we recall the formulas for the volume and
surface area of a cylinder.
reduce the problem to a single function of a single variable. We are told that
the volume is 1, so we can solve for height as a function of radius, then plug it
into the equation for area. Then, area is a function of a single variable, radius,
and we can find the critical points and check for a minimum.
height = 1/(πradius2 )
2
area = 2πradius2 + .
radius
Since we now have area as a function of the single variable radius we can
take a derivative to find the critical point, then find the optimal shape.
Solving for where the derivative of area is zero, we find the radius of the
can should be 0.5419 deciliters. We plug that value back into the formula for
height in terms of radius and see that the height should be 1.083854 deciliters.
To understand the shape of the can we see that the height is twice the radius,
or the same thing as the diameter of the can. The can is optimally shaped
when it is the shape of a large paint can. □
There are three technical details worth mentioning from the last example.
First, in Excel, the best way to put π in a formula is with the constant PI().
Second, the function for area is defined on an open interval where the radius
is positive. There is no maximum area for a can of fixed volume. (However
inefficient our can is, we can always make it worse, by moving farther from
the optimum.) Third, one should also note that for this problem, we wanted
several numbers as part of our answer. The worksheet for the problem puts
the best height and radius at the top, where the reader can easily find it.
In this last example we had to reduce two equations in two unknowns to a
single equation in one unknown to be able to optimize. We may also need to
produce an equation from data.
Example 3.4.9 Maximized profits and break-even points.
Standalone
For widget production and sales, we have the following data on profit based
on sales.
Quantity 10 100 200 250 300 400
Profit -$2,083 $31,040 $48,587 $49,845 $46,146 $23,670
Find the break even points and the quantity that maximizes profit.
Solution. From looking at a quick plot of the data, I am going to assume
that the profit function is a downward facing parabola, so I find the best fitting
quadratic polynomial for the data. Using trendlines, my profit function is
I now set up the table for special values with goal seek. I use starting points
of 20 and 450 for the break even points and 250 for the maximum. To find
break even points, I goal seek on the profit function. To find the maximum
point, I goal seek on the derivative of the profit function.
Rounding to the nearest whole number in each case, my break even points
are for selling 15 and 460 widgets. My maximum profit of $50,032 occurs when
I sell 238 widgets. □
Example 3.4.11 Minimizing expenses.
Standalone
widget press costs $10,000 to buy, and the operating expenses are $500 a year,
and the total repair costs are 300t2 over the first t years. What is the optimal
length of time to use a widget press before replacing it?
Solution. My annual cost equation is total cost divided by t. This annual
cost is:
AnnualCost(t) = 10000/t + 500 + 300t.
I create a spreadsheet that calculates the cost and its derivative over the
first 10 years.
Looking at the data, the minimal annual cost is obtained by keeping the
press between 5.5 and 6.0 years. Using Goal seek on the derivative, I find the
minimal annual cost of $3,964.10 is obtained by keeping the press for 5.77 years.
□
Reading Check
1. Reading check, Optimization.This question checks your reading com-
prehension of the material is section 3.4, Optimization, of Business Cal-
culus with Excel. Based on your reading, select all statements that are
correct. There may be more than one correct answer. The statements
may appear in what seems to be a random order.
Exercises: Optimization
(a) Plot the function and its derivative on the same graph.
(b) Identify the regions where the function is increasing and the regions where
the function is decreasing.
(c) Identify the local maximum and minimum for the given domain.
(d) Identify the global maximum and minimum for the given domain
1. f (x) = −2x2 + 17x + 23 on the interval 0 ≤ x ≤ 50.
Solution. Setting up these problems in Excel follows the same
process.
• We create columns for x, x+.001, x−.001, f (x), f (x+.001), f (x−
.001),and f ′ (x)
• Once you enter f (x), doing a right quick fill easily finds f (x +
.001) and f (x − .001), and then f ′ (x) is easy to compute.
• Once you graph f and f ′ , it is usually a good idea to graph the
derivative using the secondary axis: double click on the deriva-
tive function and choose the appropriate button in the dialogue
box.
(a)
The table is truncated at x = 25, but the rest was used to create
the graph.
(b) We can do a Goalseek to find the critical point: set f ′ (x) = 0.
In this example f ′ (x) = 0 when x = 4.25
The function f is increasing for 0 < x < 4.25.
The function f is decreasing for x > 4.25
(c) The function has a local max at x = 4.25 and the maximum
value is 59.13
The only local minimums are the endpoints, (0, 23) and
(50, −4127).
(d) To find the global maximum and minimum we check the end-
points and the critical points
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 164
x f (x) status
0 23
4.25 59.13 maximum
50 -4127 minimum
x f (x) status
0 12
1.73 1.61 minimum
10 922 maximum
x f (x) status
0 -3 minimum
52.95 17.32 maximum
100 13.13
(c) The function has a local min at x = 4.47 and the minimum value
is 44.72
The function has a local maximums at (1, 105) and (50, 252).
(d) To find the global maximum and minimum we check the end-
points and the critical points
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 166
x h(x) status
1 105
4.47 44.73 minimum
50 252 maximum
(a) Give a profit function for widgets. Specify the domain on which the
function makes sense.
Solution. Preliminary work: find the formulas for price (given) and cost
(described).
(a)
One assumption that makes sense is that the price should be posi-
tive.
(b) We find profit and the derivative of the profit function to determine
where the derivative is 0. Below is the graph of Profit, Profit′ and
we did GoalSeek to find the critical point (x=290). We should also
consider endpoints, but the vertex is clearly above 0.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 167
(c) The profit is maximized at 290 and the maximum profit is $34,550
12. The cost equation for gizmos is Cost(q) = 1000 + 3q and the demand
function is Price(q) = 500 − 3q. Find the maximum profit.
13. The cost equation for gadgets is Cost(q) = 1000 + 2q + .0001q 2 and the
demand function is Price(q) = 100/(1 + .01q). Find the maximum profit.
Solution.
Assuming that the price should be a positive number does not help us
in this problem. We can check, but all we get is that q > −100, but q
should be positive.
If domain restrictions are not obvious or the algebra is challenging we
can resort to trial and error. The small coefficients (.0001 for instance) do
suggest we have fairly large values for q.
Using 0 < q < 1000, we see that there is a maximum near q = 600.
Goal Seek shows that the critical point is at q = 588 gadgets. The maxi-
mum profit is $6336.
15. Suppose the cost function for your operation is Cost(q) = 10000 + 10q +
20000/(1 + .1q). Find the quantity that minimizes price.
Solution. The function is interesting in that the minimum cost is not
easily see on the graph.
The function is graphed for 0 ≤ q ≤ 150 in steps of 10. The cost func-
tion almost looks as though it is leveling out and reaching an asymptote.
An inspection of the table shows that this is not true. The derivative goes
from negative to positive right around 130. GoalSeek shows that the de-
rivative is zero at approximately 131.42. The recorded Cost is $12,728.40,
which is the minimal cost for this function.
16. Suppose your cost function is Cost(q) = 10000(0.8).1q + .1q 2 . Find the
quantity that minimizes price.
17. With rental property, a simplified model of costs spreads the purchase
cost over the time that the property is held and assume that repair costs
will rise the longer the property is held. This gives a formula for annual
expenses as
Note that the function is not defined when t = 0. So we will graph the
function and the derivative for 1 ≤ t ≤ 10. The property should be held
for 3.5 years.
18. With rental property, a better model factors in the depreciation of the
property and how much can be recovered by selling the property used. If
we use a 5 year straight line depreciation the formula becomes
AnnualExpense(t) = (PurchasePrice ∗(1 − 0.2t))/t + RepairFactor ∗ tr .
Repeat the assumptions from the problem above. Assume for carpet clean-
ers that the replacement cost is $600, that the repair costs in the first year
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 169
are $50, and r = 1. Find the length of time the property should be held
to minimize the annual expense.
19. The annual sales rate for a new toy is found to be Sales(t) =
10000t2 exp(−t2 /16). Find the month that maximizes sales.
Solution. If we are minimizing according to month, we will graph the
function for 1 ≤ t ≤ 12.
GoalSeek does not improve our estimate, and we see that the maximum
sales must occur when t = 4. The derivative is (close to) 0 there and this
means our sales are maximized in April (assuming 1 represents January).
20. Consider the following sales data for your business.
(a) Plot the data and find a reasonable best fitting curve for the data.
Section-3-5-Examples.xlsx
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 170
Standalone
Looking at the chart and the picture we see that the vertex is close to
x = 4.5. We also see that the x-intercepts are close to x = −0.5 and x = 9.5.
Next, we want to make sure that Solver is installed. It should be on the
Analysis section of the Data tab.
Figure 3.5.3
If you don’t find it there, you should go to the online help for Excel, and
look for help on Solver. Under the topic “Define and solve a problem by using
Solver”, select first “Define and solve a problem”, then “If you don’t see Solver
under Analysis on the Data tab”.
We first want to use Solver to find a root. Using the same approach we
used with Goal Seek, we would like cell B5 to be set equal to 0 by changing the
value of cell A5. (As we have set up the problem, we could use solver starting
with any of the cells that give a value for f (x). I chose the one that has f (x)
closest to the desired result.)
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 171
Figure 3.5.4
Solver finds a solution with x = −0.72015. We are given a dialog box that
asks if we want to keep the solver solution or restore our original value.
Figure 3.5.5
We also would like to be able to find a minimum. From the picture, we
know that a downward pointing parabola has no absolute minimum. However,
in business, we are typically concerned with functions defined on a finite domain.
For this problem, consider only the interval 0 ≤ x ≤ 15. We want the minimum
to appear in cell B7, so we want to constrain cell A7. If we start Solver, then hit
the add button, we get a dialog box to enter the first constraint, that A7≥ 0.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 172
Figure 3.5.6
In a similar manner, we add the constraint that A7 ≥ 15 and ask solver for
a minimum.
Figure 3.5.7
Since we started the search for the minimum at x = 0.5, Solver finds the
minimum at x = 0. This is a “local minimum”. Any x value in the interval
that is close by gives a higher value for the function.
We would also like to find the minimum at the other end of the interval.
To do that it is useful to know a bit of the mathematics behind what solver is
doing. Solver uses derivatives from the starting point to decide on the direction
it should look and how far it should go to find the next guess for its answer.
This is a modification of a technique called Newton’s method. In terms of
our picture, depending on whether we tell it to find a maximum, minimum, or
specified value, Solver tries to slide up or down the graph until it finds a good
candidate, which it gives us as a solution. It is actually looking for the first
local maximum or minimum it gets to. It does not look for other candidates.
So if we started at x = 0.5, it will slide to the left to find an answer. To find
the minimum at the other end of the interval, we need a starting point where
the graph is already sloping down to the right. Starting at x = 8 should work.
We set up Solver.
Solver finds that the curve had a minimum at x = 15 with f (x) = −83. □
To recap, using Solver on the interval 0 ≤ x ≤ 15, we found has a root at
x = 9.72015, a maximum at x = 4.5, and local minimums at x = 0 and x = 15.
We also found the values of f (x) at all of those points.
It is worth pointing out that the default setting has ”Make unconstrained
variables non-negative. You generally want to turn that option off.
However, this example was chosen because we could get the same results
with work by simply using the properties of parabolas. Thus, we now want to
ask the same questions about a problem we cannot solve algebraically.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 173
Standalone
From the graph I expect the function has no roots on the interval. It has
local minimums near 0, 2.5, and 10. It has local maximums near 0.5, and 8.
I will need to add constraints to find the local minimums at the boundaries.
To make my worksheet easy to read I add two extra columns for the x and y
values of interesting point, and fill in guesses.
After I use Solver, I find the local minimums occur at 0, 2.326, and 10, and
the local maximums occur at 0.29115 and 7.3827. The maximum value for the
function in the interval is 5.409 and the minimum is 1.0149. We verify that
the endpoints, x = 0 and x = 10, are both local minimums.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 174
In that case, we miss the local maximum at 0.29 and confuse the left end-
point as a local maximum. Since Solver does not use the picture, it will not
be misled by it. This example points out that while the graph is useful for
guidance, we need to verify that we have not been misled by not graphing with
enough resolution. □
Warning: In Example 3.5.8 we saw that relying on the graph could deceive
us. The flip side is an example where relying on Solver can deceive us. We
mentioned earlier that Solver uses a variant of Newton’s method to find values.
In rough terms, it repeatedly finds the linear approximation and slides up or
down that line to the desired answer. If we start close to the answer, this is
a very effective method of finding a numerical solution. However, it is easy to
construct problems where this leads to a blind alley or to the wrong answer. In
particular, the method has great difficulty with problems where the function
is not differentiable or where it has several bends. Consider the following
example.
Example 3.5.10 Deceiving Solver.
Standalone
□
The lesson to learn is that solver will help us find our candidate points, but
we still need to understand the functions behavior well enough to give a good
starting point.
on one of the “black boxes” we used earlier in this course, the ability of Excel
to find a trendline, or best fitting curve to a set of data.
Example 3.5.12 Use solver to find a best fitting line to a data set.
Standalone
x 1 2 3 4 5
y 35 46 78 84 114
Reading Check
1. Reading check, Optimization.This question checks your reading com-
prehension of the material is section 3.5, An Introduction to Solver, of
Business Calculus with Excel. Based on your reading, select all state-
ments that are correct. There may be more than one correct answer. The
statements may appear in what seems to be a random order.
(b) We can read off the roots from the table f (x) = 0 at x = 1 and
at x = 9
(c) Use Solver to find the minimum.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 178
(b) This function does not have any roots on the interval 0 ≤ x ≤
100.
(a)
(b) There are 2 roots: one near q = 0, and the other near q = 160.
Using Solver we find the roots are at q = 1.24 and q = 161.43.
(c) The local maximum looks to be near q = 80. Using solver we
get a local maximum of $19,245.33 at q = 81.33.
We have local minimums at the endpoints (0, −600) and
(200, −23000.).
(d) Compare the local extrema to the endpoints. We need
to consider three points, (0, −600), (81.33, 19245.33), and
(200, −23000).
The global maximum is 19245.33 (at x = 81.33).
The global minimum of -23000 (at x = 200).
6. The profit function obtained as the best fitting quadratic curve for
the following data.
Exercise Group. In Exercise 3.5.8–3.5.10 you are given a function that and
an interval it is defined over.
(a) Make a chart of values and plot a graph of the function.
(b) Visually identify approximate local maxima and minima.
(c) Find a reasonable range of starting points from which Solver will find
each local maximum or minimum.
8. f (x) = −0.25x4 + 5.3x3 − 36x2 + 90x − 15, on the interval 0 ≤ x ≤ 15.
9. (
4x − 10 x<5
g(x) =
2(x − 7) x > 5
2
Symbolic Differentiation
f (x + h) − f (x)
f ′ (x) = lim .
h→0 h
♢
We also want to recall some alternate notations we may use.
As is typical in mathematics, when there are several forms, we use the one
that makes the most sense in the case on which we are working.
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/
Section-4-1-Examples.xlsx
182
CHAPTER 4. SYMBOLIC DIFFERENTIATION 183
f (x + h) − f (x)
f ′ (x) = lim
h→0 h
(a(x + h) + b) − (ax + b)
= lim
h→0 h
CHAPTER 4. SYMBOLIC DIFFERENTIATION 184
(ax + ah + b) − (ax + b)
= lim
h→0 h
ah a h
= lim = lim lim
h→0 h h→0 1 h→0 h
= lim a = a.
h→0
The last step is justified by noting that as h gets very small the value of a
simply stays a. □
We want to look at a quadratic function, since we will need to take a limit
in that case.
Example 4.1.5 A quadratic derivative. From the formal definition of
derivative, if f (x) = ax2 , then show f ′ (x) = 2ax.
Solution. Using our definition:
f (x + h) − f (x)
f ′ (x) = limh→0
h
(a(x + h)2 ) − (ax2 )
= lim
h→0 h
(ax2 + 2ahx + ah2 ) − (ax2 )
= lim
h→0 h
2ahx + ah2 h(2ax + ah)
= lim = lim
h→0 h h→0 h
= lim (2ax + ah) = 2ax.
h→0
The last step is justified by noting that as h gets very small the value of ah
also gets very small. □
We can modify this last example to find a formula for the derivative of
f (x) = xn for any positive integer n. We recall that
f (x + h) − f (x)
f ′ (x) = lim
h→0 h
(a(x + h)n ) − (axn )
= lim
h→0 h
(a(xn + nxn−1 h + terms involving h2 ) − (axn )
= lim
h→0 h
n−1
a(nx h + terms involving h2 )
= lim
h→0 h
= lim a(nxn−1 + terms involving h)
h→0
= anxn−1 .
The last step is justified by noting that as h gets very small, the value of h
times a polynomial in h also gets very small. □
CHAPTER 4. SYMBOLIC DIFFERENTIATION 185
f (x + h) − f (x)
f ′ (x) = lim
h→0 h
e(x+h) − ex
= lim
h→0 h
ex (eh − 1)
= lim
h→0 h
eh − 1
= ex lim .
h→0 h
CHAPTER 4. SYMBOLIC DIFFERENTIATION 186
It suffices to show that limh→0 e h−1 = 1. This can be done by starting with
h
a formal definition of e. For this class it can also be done by using Excel to
evaluate the expression for smaller and smaller values of h.
eh −1
It seems clear that limh→0 h = 1. □
Example 4.1.11 Justification of second exponential rule. From the
formal definition of derivative, if f (x) = ax , then show f ′ (x) = ln(a) ∗ ax .
Solution. We start by mimicking the last problem. At a key step we will
recall that by
x replacing h with h ln(a) in our previous justification, we obtain
ax = eln(a) = eln(a)x = ex ln(a) . We also want to note that
eh ln(a) − 1 eh − 1
lim = lim = 1.
h ln(a)→0 h ln(a) h→0 h
f (x + h) − f (x)
f ′ (x) = lim
h→0 h
a (x+h)
− ax
= lim
h→0 h
a (a − 1)
x h
= lim
h→0 h
x ah − 1
= (a ) lim
h→0 h
eh ln(a) − 1
= (ax ) lim (ln(a))
h→0 h ln(a)
eh ln(a) − 1
= (ax ln(a)) lim
h ln(a)→0 h ln(a)
x e −1
h
= (a ln(a)) lim
h→0 h
= ax ln(a).
□
We are most likely to see exponential functions in the context of continu-
ously compounding interest.
Example 4.1.12 Computing future rate of change. If I have a dollar in
the bank at an effective annual interest rate of 6%, compounded continuously,
at what rate is the principal increasing after ten years?
Solution. We know f (x) = (1.06)x . Thus f ′ (x) = ln(1.06)(1.06)x . We
evaluate this at 10 years and get f ′ (10) = ln(1.06)(1.06)10 = .10435074. Thus
after 10 years, I am earning a little more than 10 cents a year. □
CHAPTER 4. SYMBOLIC DIFFERENTIATION 187
The slope of the tangent line at (a, ea ) is ea by the exponential rule. Sym-
metry tells us the slope of the line tangent to y = ln(x) at (ea , a) is 1/ea .
Letting b = ea , the slope of the line tangent to y = ln(x) at (b, ln(b)) is 1/b.
d
Thus dx (ln(x)) = 1/x. □
CHAPTER 4. SYMBOLIC DIFFERENTIATION 188
Example 4.1.16 Slope of a tangent line. Find the slope of the line tangent
to y = ln(x) at x = 10. Compare your answer to the estimate given by the
approximation techniques of the last chapter.
Solution. Since f (x) = ln(x), f ′ (10) = 1/10 = 0.1. When I use Excel to
compute (f (10.001) − f (9.999))/.002 I get 0.1000000003. □
Exercise Group. In the following exercises, use the symbolic rules to find
the derivative of the function.
1. f (x) = x5
Answer.
f (x) = 5x4
2. g(x) = 7/x3
p
3. h(x) = 3 (x7 )
Solution. Rewrite h(x) = 3x7/2 . Then,
21 5/2 21 √ 5
h′ (x) = (x ) = x .
2 2
4. f (x) = 2xπ
5. k(x) = 17
Answer. k ′ (x) = 0
6. m(x) = 9x−5
√
7. f (x) = x2 x
Solution. Rewrite f (x) = x5/2 . Then
5 3/2 5√ 3
f ′ (x) = x = x .
2 2
CHAPTER 4. SYMBOLIC DIFFERENTIATION 189
8. g(x) = ln(x)
9. h(x) = ex
Answer. h′ (x) = ex
10. k(x) = 5x
11. m(x) = 1.03x
Answer. m′ (x) = 1.03x ln(1.03)
12. n(x) = (0.9)x
Exercise Group. For the following exercises, use the symbolic rules to find
the derivative at the specified point. Use Excel to find the numeric approxima-
tion using the “calculator formula.” To how many digits do the two methods
agree?
13. f (x) = x2 . Evaluate at x = 2.
Solution. f ′ (x) = 2x, so f ′ (2) = 4. The numeric derivative agrees
to 12 decimal digits.
14. g(x) = 5x. Evaluate at x = 7.
15. h(x) = 1.06x . Evaluate at x = 10.
Solution. h′ (x) = ln(1.06)(1.06)x . So h′ (10) = ln(1.06)(1.06)10 (≈
0.104). The numeric derivative agrees to 10 decimal digits.
16. f (x) = ex . Evaluate at x = 5.
17. k(x) = ln(x). Evaluate at x = 100.
Solution. k ′ (x) = 1/x. So k ′ (100) = 0.01. The numeric derivative
agrees to 13 decimal digits.
18. m(x) = 3/x. Evaluate at x = π.
Exercise Group. Find tangent lines to the given curves at the indicated
points.
19. f (x) = 3x4 . At x = 1.
Solution. We need a point: if x = 1 then y = f (1) = 3.
We need a slope: f ′ (x) = 12x3 . Hence m = f ′ (1) = 12.
Find the line: y − y0 = m(x − x0 ), so y − 3 = 12(x − 1).
Comments
• We can rewrite the tangent line as y = 12x − 9
• We could have used the slope intercept version of the line to
solve the problem as well. Then y = mx + b. We know m = 12,
and we can solve for b by letting x = 1 and y = 3.
20. g(x) = ax. At x = b.
21. h(x) = 1.05x . At x = 20.
Solution. We need a point: if x = 20 then y = h(20) = (1.05)20 ≈
2.6533.
We need a slope: h′ (x) = ln(1.05)(1.05)x .
Hence m = ln(1.05)(1.05)20 = 0.12945
Find the line: y − y0 = m(x − x0 ), so y − 2.6533 = 0.12945(x − 20).
22. f (x) = ex . At x = 1.
CHAPTER 4. SYMBOLIC DIFFERENTIATION 190
Elementary Formulas.
However, we do not yet have a rule for taking the derivative of a func-
tion as simple as f (x) = x + 2. Rather than producing rules for each kind
of function, we wish to discover how to differentiate functions obtained by
arithmetic on functions we already know how to differentiate. This would let
us differentiate functions like f (x) = 5x3 + 3x2 + 1, or g(x) = (x + 2)1.03x ,
or F (x) = ln(x)/(x + 3), which are built up from our elementary functions.
We want rules for multiplying a known function by a constant, for adding or
subtracting two known functions, and for multiplying or dividing two known
functions.
Claim 4.2.3 Sum and difference rule. The derivative of f (x) ± g(x) is
f ′ (x) ± g ′ (x). In other words,
(c)
Theory and justification. The basic argument for all of our rules starts
with local linearity. Recall that if f (x) is differentiable at x0 , then in a region
around x0 , we can approximate f (x) by a linear function, f (x) ≈ f ′ (x0 )(x −
x0 )+f (x0 ). To find the derivative of a scalar product, sum, difference, product,
or quotient of known functions, we perform the appropriate actions on the
linear approximations of those functions. We then take the coefficient of the
linear term of the result.
For our first rule we are differentiating a constant times a function. Follow-
ing the general method we look at how we multiply a constant times the linear
approximation.
Taking the coefficient of the linear term gives the scalar multiple rule, the
derivative of a constant times a functions is the constant times the derivative
of the function.
Next, we want to look at the sum or difference of two functions. Following
the general method we look at the sum or difference of the linear approxima-
tions.
Taking the coefficient of the linear term gives the sum or difference rule,
the derivative of a sum or difference of two functions is the sum or difference
of the derivatives of the functions.
CHAPTER 4. SYMBOLIC DIFFERENTIATION 192
□
Both methods give the same answer. Note that the product of the deriva-
tives is 2x which is NOT the derivative of the product.
Example 4.2.7 General derivatives of products. Find the derivatives of
the following functions:
(a) f (x) = (6x + 100) ∗ (1.06)x .
√
(b) g(x) = x ln(x).
Solution.
(a)
Theory and justification. Following the general rule we look at the linear
term of the product of the linear approximations. Consider the product of two
linear expressions.
The coefficient of the linear term is (ad + bc). Thus, when we take the
product
(f ′ (x0 )(x − x0 ) + f (x0 )) ∗ (g ′ (x0 )(x − x0 ) + g(x0 )),
the coefficient of the linear term is
Solution.
′
6x2 + 100 (12x)(x3 + x) − (6x2 + 100)(3x2 + 1)
(a) f ′ (x) = 3
=
x +x (x3 + x)2
′
′ 1.07x (ln(1.07)1.07x )(3x + 5) − (1.07x )(3)
(b) g (x) = =
3x + 5 (3x + 5)2
□
Exercise Group. Use the rules from the last two sections to find the
derivatives of the following functions.
1. f (x) = 3x5 + 7x4 + 5x + 9.
Answer. f ′ (x) = 15x4 + 28x3 + 5.
2. g(x) = 10x123 + 19x50 − 5x4 − 2x−7 .
√ √
3. h(x) = 2x + 3 x − 5 3 x.
Solution. Rewrite using exponential notation: h(x) = 2x + 3x1/2 −
5x1/3 Then take the derivative:
3 5 3 5
h′ (x) = 2 + x−1/2 − x−2/3 = 2 + √ − √
3
.
2 3 2 x 3 x2
4. k(x) = ex + 8x + π x − 1.07x .
5. m(x) = (x3 + 5x2 − 7)(x2 − 3).
CHAPTER 4. SYMBOLIC DIFFERENTIATION 195
(x3 +2x+9)
14. g(x) = 1.07x .
(ax+b)
15. h(x) = (cx+d) .
Solution. Quotient Rule:
Exercise Group. For the following problems, use the following data to find
the indicated derivative.
x 0 1 2 3 4 5 6 7 8 9
f(x) 3 5 7 1 9 8 4 2 0 6
f’(x) 7 6 5 4 3 2 1 0 9 8
g(x) 8 4 0 6 2 9 5 1 7 3
g’(x) 6 8 4 2 0 7 9 3 5 1
19. h′ (2), where h(x) = f (x) ∗ g(x).
Solution.
23. The profit function at the widget factory is Profit(q) = −q 2 + 300q − 2500.
Find the maximum profit.
Solution. Profit(q) is a downward opening parabola, so the maximum
occurs where the derivative (slope of the tangent line) is 0.
Find the critical point: Profit′ (q) = −2q + 300 = 0, So q = 150.
The maximum profit is
Slope: dcost
dq = 10 − .04q, so at q = 200 we have dcost
dq = 10 − .04(200) =
2.
The line: C − C0 = m(q − q0 ).
So we have C − 4200 = 2(q − 200), or in slope intercept form: C =
2q + 3800.
26. The formula for the current value of a particular revenue stream is
Value(t) = .95−t (3000 + 25t). Find the equation of the line tangent to the
cost function at t = 10.
Solution.
(a) We could do this problem by expanding it to a polynomial and using
rules from the previous section, but that is much too hard. We can write
f (p) as g(h(p)) where h(p) = p3 + 2p + 5 and g(p) = p7 . We use the rules
from the previous section to compute h′ (p) = 3p2 + 2 and g ′ (p) = 7p6 .
Composing we get g ′ (h(p)) = 7(p3 + 2p + 5)6 . Thus
p
g ′ (q) = f ′ (h(q))h′ (q) = (2q)/(2 (q 2 + 6))
(c) We can write h(t) as f (g(t)) where g(x) = 2t + 5 and f (x) = et . We use
the rules from the previous section to compute g ′ (t) = 2 and f ′ (t) = et .
Composing we get f ′ (h(t)) = e( 2t + 5). Thus
The coefficient of the linear term is the product of the coefficients of the two
linear terms we began with. Hence we find that [f (g(x0 ))]′ = ab = f ′ (g(x0 )) ∗
g ′ (x0 ).
The Chain rule in other notation. For the problems above, we used the
prime notation, f ′ (x), f ′ (q), f ′ (t), etc, for derivatives. There is also a fractional
df df df dy dp dq
notation for derivatives, dx , dq , dt or dx , dq , dt , etc. that is commonly used.
Intuitively, when we have zoomed in far enough for the graph of f (x) to look
like a straight line, then the derivative is the small unit of rise over the small
unit of run. With that notation the chain rule has a nice formulation where it
reduces to the usual rules for multiplying fractions.
dy dy dz df df dg
= or = .
dx dz dx dx dg dx
Solution.
dh dh dg
(a) = = 2 ∗ 3 = 6.
dx dz dx
(b) dh
dx = dh dg
dz dx = 3z 2 ∗ 2x = 3(x2 + 7)2 ∗ 2x.
CHAPTER 4. SYMBOLIC DIFFERENTIATION 200
The general [(f (x))n ]′ = n(f (x))n−1 f ′ (x). This is simply the chain
power rule rule when the second function is a power.
The chain rule [(f (ax + b))]′ = (f ′ (ax + b)) ∗ a
with a linear
function
Reading Check
1. Reading check, The Chain Rule.This question checks your reading
comprehension of the material is section 4.3, The Chain Rule, of Business
Calculus with Excel. Based on your reading, select all statements that
are correct. There may be more than one correct answer. The statements
may appear in what seems to be a random order.
dy dy dz
A If z = g(x), and y = f (z), so y = f (g(x)), then dz = dz dx .
Another way to think of the chain rule is that we need to take deriv-
atives of the different functions that make up the composite function:
p
h(x) = 5x7 + 3x − 2 = (5x7 + 3x − 2)1/2
h′ (x) = ”derivative outside function” ∗ ”derivative inside function”
= [1/2(5x7 + 3x − 2)−1/2 ][(35x6 + 3)].
4. k(x) = ln(ex + 5).
5. m(x) = ln(ln(ln(x2 + 3))).
Solution.
1 d
m′ (x) = ln(ln(x2 + 3))
ln(ln(x + 3)) dx
2
1 1 d
= ∗ ∗ ln(x2 + 3)
ln(ln(x + 3)) ln(x + 3) dx
2 2
1 1 1 d 2
= ∗ ∗ ∗ (x + 3)
ln(ln(x2 + 3)) ln(x2 + 3) x2 + 3 dx
1 1 1
= ∗ ∗ ∗ 2x.
ln(ln(x2 + 3)) ln(x2 + 3) x2 + 3
6. n(x) = (((x2 + 2)2 + 3)2 + 4)2 + 5.
7. f (x) = e2x+3 .
Answer. f ′ (x) = e( 2x + 3)(2)
8. g(x) = (ln(10x − 15))2 .
9. h(x) = ln((10x − 15)2 ).
Solution.
1 20
h′ (x) = [2(10x − 15)] ∗ 10 = .
(10x − 15) 2 10x − 15
3
ln(x) (ln(x))′ (2x + 7) − (ln(x))(2x + 7)′
=4 ∗
2x + 7 (2x + 7)2
3
ln(x) 1
x (2x + 7) − (ln(x))(2)
=4 ∗
2x + 7 (2x + 7)2
3
ln(x) (2x + 7) − (x ln(x))(2)
=4 ∗ .
2x + 7 x(2x + 7)2
3
14. g(x) = ln x 1.07
+2x+9
x .
Exercise Group. For the following problems, use the following data to find
the indicated derivative.
x 0 1 2 3 4 5 6 7 8 9
f(x) 3 5 7 1 9 8 4 2 0 6
f’(x) 7 6 5 4 3 2 1 0 9 8
g(x) 8 4 0 6 2 9 5 1 7 3
g’(x) 6 8 4 2 0 7 9 3 5 1
15. h′ (2), where h(x) = f (g(x)).
Solution.
• derivative of (x^3+5x+7)
• differentiate (x^3+5x+7) with respect to x
• differentiate (x^3+5x+7)
• D (x^3+5x+7)
• d/dx (x^3+5x+7)
• (x^3+5x+7)’
For all of these, the website provides the same answer.
□
Note that the response tells us the question that Wolfram|Alpha is answer-
ing. This helps us check that we have been properly understood.
It is worthwhile to note that Wolfram|Alpha has an option to show step-by-
step solutions with a paid subscription. Alternatives can be found by searching
for ”symbolic derivative calculator”.
Wolfram|Alpha understands the convention that the variable for math prob-
lems is typically x. If we don’t specify the variable with respect to which we
are differentiating, it will guess that x is our variable. Other letters are treated
as constants unless we use function notation with parentheses. Thus we can
CHAPTER 4. SYMBOLIC DIFFERENTIATION 205
□
It should be noted that Wolfram|Alpha will not work with long variable
names like Principal or MonthlyPayment. We simply need to change variables
to work with Wolfram|Alpha.
Example 4.4.3 Working with long variable names. The cost of widgets
is given by:
Find the rate of change of cost with respect to quantity when Quantity =
1000. (We are using the derivative to estimate the marginal cost.)
Solution. Since we will use Wolfram|Alpha, we want to convert the equation
to use single letter variables:
c = 2000 + 10 ∗ q + .001 ∗ q 2 .
From the graph, it is clear that we have a single maximum for the profit
function and it occurs near q = 200. To find this point, we want to take the
derivative and set it equal to zero, or we want to use the solve command on
the derivative. We enter the command
solve(derivative 100q/(1+.01q)-(2000+10q+.001q^2 ) with respect to q)
.
CHAPTER 4. SYMBOLIC DIFFERENTIATION 207
2 https://www.symbolab.com/solver
CHAPTER 4. SYMBOLIC DIFFERENTIATION 208
It also has a section that lets you do drill and practice with the techniques
we have learned. Like Wolfram|Alpha, it gives the option of step-by-step solu-
tions. I find the site a bit more user friendly for math students.
For individual problems we may want to use other software. For finding
derivatives, a quick web search found http://www.derivative-calculator.net/3
which is nicer if you are simply checking your work. As with Wolfram|Alpha,
the derivative calculator shows you the problem in math form so you can check
your syntax.
However, the show steps formatting is nicer since hovering over one step
shows the change for that step in the next line.
Reading Check
1. Reading check, Differentiation Using Computer Algebra.This
question checks your reading comprehension of the material is section 4.4,
Differentiation Using Computer Algebra, of Business Calculus with Excel.
Based on your reading, select all statements that are correct. There may
be more than one correct answer. The statements may appear in what
seems to be a random order.
B Some free tools give step by step work for symbolic differentiation.
C Desmos is a free tool available on the web that does symbolic differ-
entiation.
D The free tools for differentiation all use the same syntax.
So f ′ (x) = ln(x) + 1.
2. g(t) = e.07t (−t2 + 3t + 5)
3. h(t) = t2 e−0.06t
Solution.
CHAPTER 4. SYMBOLIC DIFFERENTIATION 210
Wolfram writes ln as log but still means base e. The common log
of x would be log(10,x). To stick with our notation we would say
2x
m′ (x) = .
(x2 + 3)ln(x2 + 3)ln(ln(x2 + 3))
Note that Wolfram allows us to copy the text. Hover over the
answer and under “A” and you will find plaintext that can be copied.
This can be edited into a word document or an Excel document.
ex
6. n(x) = ln(x2 +3)
Quantity Quantity2
7. Price = 10 − 100 − 10000
Solution. Wolfram does not work well with whole word variables.
Edit the equation (you can do this in Wolfram) and let Price = P (q)
and quantity = q. This gives the following derivative:
CHAPTER 4. SYMBOLIC DIFFERENTIATION 211
8. Revenue = Quantity ∗ 20 ∗ .9(Quantity/200)
9. SupplyPrice = 10 ∗ 1.04(Quantity/100)
Solution.
f ′ (10) = 7.68336.
14. g(x) = x2 + 6x + 10 at x = 5.
15. h(q) = (ln(q + 5)) ∗ (1.07q ) at q = 8.
Solution.
Exercise Group. Find the critical points of the given function. Identify
each as a local minimum, local maximum, or neither.
20. f (x) = x3 − 5x2 + 7x − 2.
21. r(q) = q ∗ 100 ∗ (0.9)q .
Solution. We find the critical point by solving: Solve (derivative
of q*100*(.9)^q)= 0
want to zoom out a bit, so the graph curves up or down from a line.
We say that a graph is concave up if the line between two points is above
the graph, or alternatively if the first derivative is increasing. (In finance, such
a curve is said to be convex.) Similarly, we say that a graph is concave down
if the line between two points is below the graph, or alternatively if the first
derivative is decreasing. (In finance, such a curve is said to be concave.)
♢
We also want to recall some alternate notations we may use.
Notation: Let y = f (x).
d2 d2 y
The second derivative of f (x) is denoted as f ′′ (x) or dx2 f (x) or dx2 .
d2 y
The second derivative at x = x0 is denoted as f ′′ (x0 ) or dx 2 .
x=x0
As we have noted before, when there are several forms, we use the one that
makes the most sense in the case on which we are working.
Example 4.5.2 Finding second derivatives. Find the second derivative
for each of the following functions:
d d d 2x
h′′ (x) = ( (xe2x )) = (e + 2xe2x )
(c) dx dx dx
= 2e2x + 2e2x + 4xe2x = 4e2x + 4xe2x .
d d √ d d
j ′′ (x) = ( (6 x + 3/x)) = ( (6x1/2 + 3x−1 ))
dx dx dx dx
d
(d) = (3x−1/2 − 3x−2 ) = −3/2x−3/2 + 6x−3
dx
3 6
= √ +√ .
2 x 3 x3
d d ln(x) d ( x1 x3 − 3(x2 )ln(x))
k ′′ (x) = =
dx dx x3 dx x6
(e) d (1 − 3 ln(x)) (− x3 x4 − (1 − 3 ln(x))4x3 )
= =
dx x4 x8
−3 − (1 − 3 ln(x))4 −7 + 12 ln(x)
= = .
x5 x5
□
As the last problem shows, it is often useful to simplify between taking the
first and second derivatives.
If our function is the position of x, then the first derivative is the rate of
change or the velocity of f (x). The second derivative is acceleration or how
fast velocity changes.
Graphically, the first derivative gives the slope of the graph at a point. The
second derivative tells whether the curve is concave up or concave down at
that point. If the second derivative is positive at a point, the graph is bending
upwards at that point. Similarly, if the second derivative is negative, the
graph is concave down. This is of particular interest at a critical point where
the tangent line is flat and concavity tells us if we have a relative minimum or
maximum.
Insight 4.5.3 Second derivative test of extrema. Let f (x) be a function
with f ′ (x0 ) = 0. Then if f ′′ (x0 ) > 0, the function has a local minimum at
x = x0 . If f ′′ (x0 ) < 0, the function has a local maximum at x = x0 . If
f ′′ (x0 ) = 0, the second derivative test fails and we cannot tell if we have a
local maximum, local minimum, or neither.
Example 4.5.4 Second derivative tests. For the designated function
and point, determine if the graph has a local minimum, local maximum, or
non-extreme point, or if the second derivative test fails.
(d) g(x) = x4 , x0 = 0
(e) h(x) = x5 , x0 = 0
Second derivative with CAS. We can find second derivatives with our
favorite CAS programs.
With Symbolab
With WolframAlpha
CHAPTER 4. SYMBOLIC DIFFERENTIATION 218
Reading Check
1. Reading check, The Second Derivative and Concavity.This ques-
tion checks your reading comprehension of the material is section 4.5, The
Second Derivative and Concavity, of Business Calculus with Excel. Based
on your reading, select all statements that are correct. There may be more
than one correct answer. The statements may appear in what seems to
be a random order.
A We say that a graph is concave down if the line between any two
points is below the graph.
B We say that a graph is concave up if the first derivative is increasing.
C We say that a graph is concave up if the line between any two points
is above the graph.
Exercise Group.
(a) Find the first and second derivatives of the given function.
(b) Determine where the function is concave up and where it is concave down.
CHAPTER 4. SYMBOLIC DIFFERENTIATION 219
(c) Find the critical points of the function. Classify each as a local minimum,
a local maximum, neither, or not a local extremum.
1. f (x) = (x − 3)2 − 4
Solution.
(a)
f ′ (x) = 2(x − 3)
f ′′ (x) = 2
Quantity Quantity2
7. Price = 10 − 100 − 10000
Solution.
CHAPTER 4. SYMBOLIC DIFFERENTIATION 220
(a)
−1 quantity
price′ = −
100 5000
−1
price′′ =
5000
(b) The second derivative is always negative, to the function is al-
ways concave down.
(c) There is one critical point at quantity = −50. It is a local
maximum.
Quantity
8. Revenue = Quantity ∗ 20 ∗ .9( 200 )
Quantity
9. SupplyPrice = 10 ∗ 1.04( 100 )
Solution.
(a)
ln(104)
SupplyPrice′ = ∗ 1.04(Quantity/100)
10
ln(104)2
SupplyPrice′′ = ∗ 1.04(quantity/100)
1000
(b) The second derivative is always positive, to the function is al-
ways concave up.
(c) The first derivative is always positive. There are no critical
points.
11.
12.
13.
Exercise Group. For the next set of problems, you need to know the formula
for the price of a zero coupon bond given the face value, the interest rate, and
the time to maturity. For such instruments we use the formula
FaceValue
Cost = .
(1 + rate)years
(Be aware that a rate of 4% is a rate of 0.04.)
For each problem give:
(a) The cost of the bond as described.
(b) The first derivative of cost as a function of rate. (This measures risk of
interest rate change.)
(c) The second derivative of cost as a function of rate. (This measures the
value of an option on the bond.)
14. The face value of the bond is $1000. The interest rate is currently 4%.
The bond matures in 10 years.
15. The face value of the bond is $1000. The interest rate is currently 4%.
The bond matures in 30 years.
Solution.
(a)
1000
Cost = = 308.32
(1.04)30
(b)
Cost(rate) = FaceValue(1 + rate)(−years)
Cost(rate) = −years ∗ FaceValue(1 + rate)(−years−1)
Cost′ (.04) = −30 ∗ 1000(1.04)−31 = −8993
CHAPTER 4. SYMBOLIC DIFFERENTIATION 222
(c)
(a)
1000
Cost = = 553.68
(1.03)20
(b)
Cost(rate) = FaceValue(1 + rate)(−years)
Cost(rate) = −years ∗ FaceValue(1 + rate)(−years−1)
Cost′ (.03) = −20 ∗ 1000(1.03)−21 = −8000
(c)
In the previous chapter we have see how to symbolically compute the derivative
of functions. In an applied setting we do not always have a simple formula to
work with. We may have several equations, which are dependent on each other,
or we may have equations that relate variables in ways that cannot be simplified
as a simple function. In this chapter we will consider these cases and provide
techniques for computing the rate of change.
223
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS224
p
f2 (x) = − 25 − x2 .
The point is on the first function, which is the top half of the circle, so we
take its derivative and evaluate at x = 4.
Solution 2 (Solution B). To find the equation of a line we need a point and
a slope. We already have the point at (4, 3). To find the slope, we take the
derivative of our equation. Since we do not have y as a function of x, we simply
note that its derivative is the placeholder y ′ . Recall that dx
d
x, the derivative of
x with respect to x, is simply 1.
d 2
(x + y 2 = 25)
dx
d 2 d 2 d
(x ) + (y ) = (25)
dx dx dx
d d
2x (x) + 2y (y) = 0
dx dx
2x + 2yy ′ = 0.
We then solve for y ′ and substitute our point (4, 3) in for (x, y).
2x x
y′ = − =− .
2y y
When we substitute our point (4, 3) in for (x, y) we get the same value,
y ′ = − 43 . Thus the tangent line, in point-slope form, is:
4
y = 3 − (x − 4).
3
□
For the equation of a circle, either method works. We may encounter
relations where solving for an explicit function is hard or impossible.
Example 5.1.2 Differentiation of a price-quantity relationship. The
quantity q and demand price p for widgets satisfy the relation
dp
(10 + 2q) = −2 ∗ (p + q)
dq
dp −2 ∗ (p + q)
= .
dq (10 + 2q)
5p + 3 ∗ (pq)1.5 + 2q = 2000,
Y = 50L0.75 K 0.25 .
The second option from the search takes us to a calculator from Symbolab.
It will easily do the second example from this section.
You should notice that the Symbolab calculator lets you use other variables
and has an easy option for showing step by step solutions.
Reading Check
1. Reading check, Implicit Differentiation.This question checks your
reading comprehension of the material is section 5.1, Implicit Differenti-
ation, of Business Calculus with Excel. Based on your reading, select all
statements that are correct. There may be more than one correct answer.
The statements may appear in what seems to be a random order.
d d
(2x + 3y) = 23
dx dx
dy
Implies that 2 + 3 = 0.
dx
dy
Solve for dx :
dy −2
= .
dx 3
dy
2. 7x + 9y = 23. Find dx . (You can use two different methods.)
dy
3. x2 + 3xy + 5y 2 = 23. Find dx .
Solution.
d 2 d
(x + 3xy + 5y 2 ) = 23
dx dx
d d
Implies that 2x + 3 (xy) + 5 y 2 = 0.
dx dx
d d 2
For the dx (xy) term we need to use the product rule and for dx y
we need the chain rule. We then get
dy dy
2x + 3[(1)y + x ] + 5(2y) = 0.
dx dx
dy
Solve for dx :
dy dy
2x + 3y + 3x + 10y =0
dx dx
dy
Hence (3x + 10y) = −(2x + 3y)
dx
dy
And = −((2x + 3y))/((3x + 10y)).
dx
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS229
dy
4. (x3 + x2 + 1)(y 3 + 2y + 3) = 5. Find dx .
d Price
5. 75 ∗ Price +(Quantity2 )/100 = 2000. Find dQuantity .
Solution. Some may find this easier with shorter variable labels:
dP
75P + Q2 /100 = 2000. Find dQ .
d Q2 d
[75P + ]= 2000
dQ 100 dQ
dP Q
75 + = 0.
dQ 50
−Q
Hence dP
dQ = − 50∗75
Q
= 3750 .
d Price −Quantity
So we have that dQuantity / = 3750 .
So if we were to increase the quantity by 1 (dQuantity = 1), then
there would be a decrease in price (= d Price) equal to the quantity
divided by 3750. So a small increase in quantity would result in a
(small) decrease in price.
6. 50 ∗ Price +5 ∗ Price ∗Quantity + (Quantity2 )/10 = 5000. Find
d Price
dQuantity .
√ d Price
7. 40 ∗ Price +7 ∗ Price ∗Quantity + Quantity = 2000. Find dQuantity .
√
Solution. Rewrite as: 40p + 7pq + q = 2000. Find dd pq .
We take the derivative with respect to q of both sides. In other
words we apply ddq to both sides.
d d
[40p + 7pq + q 0.5 ] = 2000
dq dq
dp dp
40 + 7[ q + p] + 0.5q −0.5 = 0
dq dq
dp
(40 + 7q) + 7p + 0.5q −0.5 = 0
dq
dp −7p − 0.5q −0.5
= .
dq 40 + 7q
d Price
8. 50 ∗ Price2 +5 ∗ Price ∗Quantity = 3000. Find dQuantity .
dK
9. 1000 = 5L0.6 K 0.4 . Find dL .
Solution. Take the derivative with respect to L to both sides:
d d
1000 = 5 [L0.6 K 0.4 ]
dL dL
d d
0 = 5[ (L)0.6 )K 0.4 + L0.6 (K 0.4 )] (product rule)
dL dL
dK
0 = 5[0.6L−0.4 K 0.4 + L0.6 0.4K −0.6 ].
dL
dK
Divide both sides by 5 and solve for dL .
dL
11. 3000 = 2L0.25 K 0.75 . Find dK .
Solution.
d d
3000 = 2 [L0.25 K 0.75 ]
dK dK
d d
0 = 2[ (L0.25 )K 0.75 + L0.25 (K 0.75 )] (product rule)
dK dK
dL 0.75
0 = 2[0.25L−0.75 K + L0.25 0.75K −0.25 ]
dK
dL L0.25 0.75K −0.25
=−
dK 0.25L−0.75 K 0.75
L
= −3 .
K
dL
12. 7000 = 11L0.8 K 0.2 . Find dK .
13. The production function for a widget factory is 1000 = 15L0.7 K 0.3 .
Find dK dL
dL and dK . Interpret what they mean.
dK
Solution. Part 1: Find dL .
d d
1000 = 15 [L0.7 K 0.3 ]
dL dL
d d
0 = 15[ (L0.7 )K 0.3 + L0.7 (K 0.3 )]
dL dL
dK
0 = [0.7L−0.3 K 0.3 + L0.7 0.3K −0.7 ]
dL
dK −0.7L−0.3 K 0.3 7K
L = 0.7 −0.7
=− .
dL L 0.3K 3L
dL
Part 2: Find dK .
d d
1000 = 15 [L0.7 K 0.3 ]
dK dK
d d
0 = 15[ (L0.7 )K 0.3 + L0.7 (K 0.3 )]
dK dK
dL 0.3
0 = [0.7L−0.3 K + L0.7 0.3K −0.7 ]
dK
dL −0.3L0.7 K −0.7 −3L
= = .
dK 0.7L−0.3 K 0.3 7K
Part 3: Interpret. dK dL
dL and dK are both negative and are reciprocals
of one another. In other words: dK 1
dL .
dL = dK
Since they are negative, if we increase L, then K will decrease
and vice versa. dK
dL measures the slope of K ans a function of L. dK
dL
d dy
exy (xy) + 2 + 3 = 0,
dx dx
which gives:
dy dy
exy [y + x ]+2+3 = 0.
dx dx
dy
Next we solve for dx :
dy dy
exy y + xexy +2+3 =0
dx dx
dy
(xexy + 3) = −(exy y + 2)
dx
dy (yexy + 2)
=− .
dx (xexy + 3)
We can solve the second equation for quantity and substitute back into the
first equation. This now gives us the revenue function in terms of cost (c).
Quantity = 0.1 ∗ c
Revenue = 2c − 0.001c2 .
d Revenue
= 2 − 0.002 ∗ Cost .
d Cost
Note that the derivative is positive for cost between $0 and $1000. This
implies that the revenue is rising until the cost is $1000. After we hit a cost
of $1000, the derivative becomes negative. This indicates that the revenue will
actually decrease.
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS232
We now differentiate:
dr
= 20 − 0.2q
dq
dc
= 10
dq
We divide these derivatives to get the desired derivative.
change in revenue dr dr dc
: = / = (20 − 0.2q)/10.
change in cost dc dq dq
Substituting q = 0.1c gives the same solution we had from the first method.
□
When using the method of related rates, we act as if the derivatives are
fractions that we can multiply or divide to obtain the appropriate fraction. We
want to use a bit of caution with that approach, because it does not work with
higher order derivatives, or with derivatives of functions of several variables.
However, for derivatives of one variable the intuition works. Once again, if we
zoom in far enough, the curve will look like a straight line and the derivative
is the quotient of rise over run.
For the first example we could use both methods. We either use algebra to
eliminate the extra variable, or find two rates of change and combine them to
find the rate we are interested in. For some problems we will only have one
choice, either because the algebra is too hard, or because we have been given
partial information and the algebraic method is impossible.
Example 5.2.2 Change in revenue with respect to expense, q elim-
ination hard. The cost (c(q)) and revenue (r(q)) equations for gizmos are
both given in terms of quantity (q)
dc
= 10 − 0.02 ∗ 50 = 9.
dq
We divide these derivatives to get the desired derivative.
dr dr dc 12.5
= / = ≈ 1.389.
dc dq dq 9
This means that when Quantity = 50, there is an increase of $1.39 for every
dollar increase in cost of investment. □
Example 5.2.3 Change in revenue with respect to expense, long
variable names. We have the following cost and revenue information for
whatchamacallits:
Find the derivative of revenue with respect to cost when Quantity = 100.
Solution. In this example we do not have a formula that lets us solve for
revenue as a function of cost, so we must use the method of related rates. The
other derivatives is:
d Revenue
= 50 − 0.02 ∗ Quantity.
dQuantity
d Revenue
When Quantity = 100, we have dQuantity = 50 − 0.02 ∗ 100 = 48. Thus
When g = 10, dw
ds = (4 − 0.02 ∗ 40) = 3.2, and ds
dg = 3 + 0.2 ∗ 10 = 5. We
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS234
Y = ALα K β ,
dL
0 = 50 ∗ (0.75 ∗ 16−0.25 ∗ ∗ 810.25 + 160.75 ∗ .25 ∗ 81−0.75 ∗ 2)
dt
dL
0 = 3/4 ∗ 1/2 ∗ ∗ 3 + 8 ∗ 1/4 ∗ 1/27 ∗ 2
dt
dL
= −32/243 ≈ −0.1317.
dt
If capital is increasing at a rate of 2 per unit of time, then labor is decreasing
at a rate of −0.1317 per unit of time. □
Reading Check
1. Reading check, Related Rates.This question checks your reading com-
prehension of the material is section 5.2, Related Rates, of Business Cal-
culus with Excel. Based on your reading, select all statements that are
correct. There may be more than one correct answer. The statements
may appear in what seems to be a random order.
z = 4y + 7 = 4(3x + 5) + 7 = 12x + 27
dz
= 12
dx
•
z = 4y + 7 y = 3x + 5
dz dy
=4 =3
dy dx
dz dz dy
= = 4 ∗ 3 = 12
dx dy dx
2. Let y = x2 − 3x + 5 and z = y 2 − y + 6. Find dz/dx when x = 1 by solving
dz
for z as a function of x and taking the derivative, and also by finding dy
dy
and dx and using related rates to apply the chain rule.
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS236
dz
When x = 5, = 200, 000 ln(1.06)1.065 .
dx
4. Let y = 200 ∗ 1.08x + 500x and z = y 2 + y. Find dx
dz
when x = 3.
dz
5. Let y = 3x + 5 and z = 4x + 7. Find dy when x = 2 by solving for z as a
dz dy
function of y and taking the derivative, and also by finding dx and dx and
using related rates to apply the chain rule.
Solution.
y−5
• If y = 3x+5 then x = 3 . Hence z = 4x+7 = 43 (y−5)+7 = 43 y+ 13 ,
dz
so dy = 43 .
dz dy dz dz/dx 4
• = 4, = 3, = =
dx dx dy dy/dx 3
6. Let y = x2 − 3x + 5 and z = x2 + 4x + 5. Find dz
dy when x = 3.
7. Let y = 1000 ∗ 1.05x and z = 100 ∗ (1 + .5x). Find dz
dy when x = 10.
Solution. First find the derivative:
dz dz/dx 50
= = .
dy dy/dx 1000 ∗ 1.05x ∗ ln(1.05)
dz 50
When x = 10, = .
dy 1000 ∗ 1.0510 ∗ ln(1.05)
8. Let y = 100 ∗ 1.08x and z = 100 ∗ 1.02x . Find dz
dy when x=10.
9. Let y = x2 − 3x + 5 and dz
dy = 3. Find dz
dx when x = 7.
dz dz dy
Solution. We want to find dx . We know dy and we can compute dx ,
hence we compute:
dy dy
= 2x − 3, hence at x = 7 we have = 11
dx dx
dz dz dy
= = (3)(11) = 33
dx dy dx
10. Let y = 500 ∗ .96x and dz
dy = 5. Find dz
dx when x = 4.
11. Let y = x2 − 5x + 7 and dz
dx = 8. Find dz
dy when x = 7.
dz dz dy
Solution. We want to find dy . We know dx and we can compute dx ,
hence we compute:
dy dy
= 2x − 5, hence at x = 7 we have =9
dx dx
dz dz/dx 8
= =
dy dy/dx 9
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS237
dR dR/dq 30 − 0.2q
= = .
dE dE/dq 10
dR 30 − 0.2(100) 10
= = = 1.
dE 10 10
14. The revenue and expense equations for widgets are
We want to find dg
dr when p = 20.
What do we have?
dp
= 50 + 0.02r
dr
dg
= 4 − 0.0002p
dp
dg dg dp
Then = = (4 − 0.0002p)(50 + 0.02r).
dr dp dr
We know p = 20 (given), but we need r to plug into the second part of
the equation. The only function that tells us anything about r is p = 50r +
√ 0.01r + 50r − 20 = 0.
0.01r2 . If p = 20 this means 20 = 50r + 0.01r2 . So 2
−50± 2500−4(0.01)(−20)
By the quadratic equation we have r = 0.02 .
Using Wolfram Alpha we have that r = 0.4. Then
dg gadgets
= (4 − 0.004)(50 + 0.008) ≈ 199.83 .
dr raw material
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS238
productA = 10 ∗ RawMaterial − 7
productB = 15 ∗ productA − 20
whatchamacallits = 6 ∗ productB − 5.
dL 0.75 dK
0.25L−0.75 K = −L0.25 0.75K −0.25
dt dt
−0.25
dL −L 0.75K
0.25
dK L dK
= = −3 .
dt 0.25L−0.75 K 0.75 dt K dt
If L = 81, K = 256, dK
dt = 5, then we have dL
dt = −3 ∗ 81
256 ∗5 ≈
−4.75.
dK
18. Our production function is 4000 = 4L. 25K . 75. Find dt if L = 1000,
K = 1000, dL
dt = 10.
5.3 Elasticity
Elasticity of demand is a concept from economics that looks at relative rate of
change rather than rate of change. We want to look at how we express this as
a variant of the derivative.
The law of demand states we increase demand by lowering price and lower
demand by raising price. The naive rate of change in that case would be the
change in quantity with respect to price. However that rate of change is not
particularly useful. If I am told that I can sell 100 more units if I lower the
price by $1 a unit, I don’t know if I should lower the price. I would definitely
want to lower the price if I sell cars for an average price of $20,000 and typically
sell 200 cars a year. I would not want to lower the price if I sell gasoline at
$4.00 a gallon and sell 5,000,000 gallons a year.
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS239
If (Q0 , P (Q0 )) is a point for a given price P (Q0 ) and quantity Q0 , then
revenue is Q0 ∗ P (Q0 ), the price times the quantity at that point, or the area
of the rectangle above. We want to know if we should pick a different point on
the demand curve to increase the area of the rectangle.
If the special case where the price and quantity are both 1, the revenue
rectangle is a square and we can simply look at the slope of the demand
function. In that case, when the demand curve is flatter than a slope of minus
1, increasing the quantity increases the area because quantity increases faster
than price decreases. Similarly, when the demand curve is steeper than a slope
of minus 1, increasing the quantity causes the price to decrease even faster, so
the area of the rectangle decreases.
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS240
We note that the slope of the demand curve is almost always negative. We
also note that we are reversing the normal roles, with price being the input and
quantity the output. We will It is thus convenient to talk about the negative
reciprocal of the slope of the normalized demand price curve.
If the elasticity is greater than 1, a small relative change in the price goes
with a large relative change in the quantity. We would expect high elasticity
in products that can easily be substituted. The demand for gasoline at one gas
station, when there are 2 other gas stations at the same intersection, would be
highly elastic.
We would expect low elasticity in products that are essential for which there
is no reasonable substitute. Wedding rings and lifesaving medicine would have
highly inelastic demand.
P (q) = 20 − q/100.
(A) Find the elasticity when q = 800. Interpret what that means for the
strategy to raise revenue.
(B) Compare to the situation when q = 1500.
Solution.
(A) The formula for elasticity is:
−dQ P (Q0 )
E= ∗ .
dP Q0
dQ dQ dP
To find dP , I recall from related rates, that dP = 1/ dQ .
dQ dP −1
= 1/ = 1/ = −100.
dP dQ 100
Thus
−dQ P (Q0 ) 12
Elasticity = ∗ = −(−100) ∗ = 1.5.
dP Q0 800
Since the demand is elastic when the quantity is 800, we should lower the
price, causing a relatively large increase in quantity, to raise revenue.
(B) When the quantity is 1500, the demand price is 5 and the derivative of
quantity with respect to price is still −100.
−dQuantity P (Q0 ) 5
Elasticity = ∗ = −(−100) ∗ = 1/3.
d Price Q0 1500
Since the demand is inelastic when the quantity is 1500, we should raise
the price, causing a relatively small decrease in quantity, to raise revenue.
In this example, the revenue function is
Arc Elasticity.
Example 5.3.2 Elasticity from two points. Two quantity-price points for
gizmos are (5000, 20) and (5200, 18). What is the arc elasticity between the
two points? Which price produces higher revenue?
Solution. The formula for arc elasticity is:
%change in quantity
E=− .
%change in price
−1 P (q)
1=E=
dP /dQ q
30 − q/50 1500 − q
1 = 50 =
q q
−1 P (q)
1=E=
dP /dQ q
1 20 ∗ (.95)q/50 50
1=− =−
20 ∗ (.95)q/50 ln(0.95) 50
1 q qln(0.95)
•
(q2 − q1 ) (p1 + p2 )
E=− ∗
(p2 − p1 ) (q1 + q2 )
(2500 − 2385) (1.99 + 2.01) 460
=− ∗ =
(1.99 − 2.01) (2500 + 2385) 57.7
when prices go down. Examples are a particular cut of meat and for
instance a brand of clothes. If there is a sale we would choose the
cheaper item. What else falls into this category?
Inelastic (E < 1) This is something where an increase in price
would not decrease revenue. One situation would be items that are
not easily substituted. For example wedding rings or life saving med-
ication. What else falls into this category?
12. Give reasons why a vendor might set a price that does not maximize
revenues.
13. If the short-term elasticity for widgets is 2.5 and the price is raised by
10%, find the percent change in quantity and revenue.
Solution.
percent change in quantity
E=−
percent change in price
−percent change in quantity
So we have 2.5 = 10 percent , and thus
change in quantity = −25%.
And new revenue = (1.10 old price)(0.75 old quantity) =
.8250 old price.
Hence we have a −17.5% change in revenue.
14. If the short-term elasticity for thingamabobs is 0.8 and the price is
raised by 10%, find the percent change in quantity and revenue.
Chapter 6
From a formal point of view, the first 5 chapters of this text have been con-
cerned with functions of one variable. More realistically, we have been looking
at functions of several variables all along. If we consider the formula for finding
how much is in a bank account in the future, we have the formula:
years∗ppy
rate
FutureAmount = InitialDeposit ∗ 1 + ,
ppy
where ppy is the number of periods per year, indicating how often we compound
the interest. From a simple point of view, the future amount is a function of
4 variables, the initial deposit, annual rate, periods per year, and number of
years. To consider this as a function of a single variable, we fixed 3 of the 4
variables as constants for a particular problem. In this chapter we want to
address the more realistic situation where we treat more than one quantity as
a variable at a time. This approach has the added advantage that most real
world functions of interest have more than one variable.
Before we look at functions of several variables, we want to create a list of
tasks we have learned to accomplish with functions of one variable:
247
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 248
Standalone
Rather than typing the numbers into the formula, we place them in separate
cells, so we can easily change the values for any of the 4 variables.
Section-6-1-Examples.xlsx
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 249
Standalone
Standalone
FutureAmount
PresentAmount = .
(1 + rate)years
Figure 6.1.9
This lets us build the table we desire. From the complete table, we see that
we can have $100,000 in the bank in 40 years by making a deposit of $9,722.22
at 6% interest. In contrast if we only earn 5% interest and can only keep the
money in the bank for 15 years, we need to start with $48,101.71.
□
Similarly, we might want to produce a table that shows the monthly pay-
ment on a mortgage where both the annual interest rate and the number of
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 251
years are treated as variables. Such a chart would be useful in deciding how
big a mortgage a person can afford with different kinds of mortgages.
Example 6.1.10 Mortgage payments.
Standalone
We can see that the monthly payment is $421.60 for a 30-year fixed rate
mortgage at 3% compounded monthly. For a 10-year mortgage at 6% the
payment increases to $1,110.21.
□
After we build a table for a function we would also like to see a graph of
the function. Excel’s abilities to graph surfaces in not one of the program’s
strong points. Nevertheless, it is useful to be “able to see the big picture” by
looking at a graph. We will also note how to draw a graph of a surface with
Wolfram Alpha.
When we looked at models of price, quantity, cost, revenue, and profit, we
made the simplifying assumption that a company only produces one product.
We want to consider what happens with two products.
Example 6.1.12 Table and graph.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 252
Standalone
PriceGizmo = 10 − QuantityGizmo/50
PriceWidget = 20 − QuantityWidget/40.
QG2 QW2
Revenue = RevG + RevW = 10QG − + 20QW − .
50 40
Next we build a build a table for the function as we have done above.
□
The techniques of this section let us look at functions of two variables. In
the next section we explore techniques for understanding functions of several
variables by treating some of the variables as constants.
Reading Check
1. Reading check, Evaluating and Graphing Functions of Several
Variables.This question checks your reading comprehension of the mater-
ial is section 6.1, Evaluating and Graphing Functions of Several Variables,
of Business Calculus with Excel. Based on your reading, select all state-
ments that are correct. There may be more than one correct answer. The
statements may appear in what seems to be a random order.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 255
P = 20e(−0.001q) .
Solution.
−years∗ppy
rate
InitialDeposit = FutureAmount ∗ 1 + .
ppy
Note that this will check if you are calling on the right x, y and z. To
check that the formula is correct we recommend the Show Formula
feature.
12. Create a table that expresses cost as a function of quantity, and per-
unit cost, with initial cost as a parameter, when the initial cost is
$3,000, the per-unit cost ranges from $20 to $40 by $2, and the quan-
tity ranges from 50 to 100 by 5.
13. Create a table that expresses the future value of a deposit as a function
of the annual interest rate and the number of years the deposit is held,
with the amount of the initial deposit and the number of times per
year that the interest is compounded being treated as parameters,
where the interest on a deposit of $10,000 is compounded quarterly,
and the deposit is held for 20 to 40 years at interest rates ranging
from 3% to 5%.
Solution. We will enter the deposit and the times the interest is
compounded (ppy) as fixed parameters. The years run from 20 to
40, and the interest rate from 3% to 5%. We have enough space on
one sheet to do the years in increments of 1. The interest is done in
increments of 0.25%. This is something not uncommon in the banking
world.
QuantityGizmos QuantityWidgets
PriceWidgets = 40 − − .
400 50
17. Create a table that expresses revenue as a function of the quantity
of widgets and gizmos sold as both quantities range from 0 to 1000,
where the demand price functions are:
QuantityWidgets
PriceGizmos = 60(0.9)QuantityGizmos/100 −
200
QuantityWidgets/100 QuantityGizmos
PriceWidgets = 40(0.85) − .
100
Section-6-2-Examples.xlsx
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 262
Standalone
QG2 QW2
Revenue(QG, QW) = 10QG − + 20QW − .
50 40
Look at the functions of one variable obtained by treating either QG or
QW as a constant. Use this information to find where we maximize revenue.
Solution. In terms of the last example, we want to start with a table and a
wire frame chart.
The wires are obtained by intersecting the graph of the function with a
plane where QW or QG is held constant.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 263
QW2
Revenue(300, QW) = 3000 − 1800 + 20QW −
40
QW2
= 1200 + 20QW − .
40
Thus, the wire corresponding to QG = 300 is a parabola that bends down.
The interactive below shows how the wireframe is built from cuves defined
by slice curves defined by cut planes.
To find the vertex of the parabola, we take the derivative of our function
of QW and set it equal to zero.
d QW
Revenue(300, QW) = 20 − .
dQW 20
This derivative is zero when QW = 400. That is the only possible place on this
wire where we can have a maximum.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 264
QG2
Revenue(QG, 400) = 10QG − + 4000
50
d QG
Revenue(QG, 400) = 10 − .
dQG 25
This derivative is zero when QG = 250. That is the only possible place on this
wire where we can have a maximum.
Putting the information together, the maximum must occur at (250, 400).
Putting these values back in the original equation gives a maximum of $5250
for the revenue function. □
The yellow curve is obtained by fixing y and letting x vary. The blue curve
is obtained by fixing y and letting x vary. We now take the partial derivatives
with respect to both variables.
∂
f (x, y) = 2x + 2y + 0 − 4 − 0 = 2x + 2y − 4
∂x
∂
f (3.5, −0.5) = 7 − 1 − 4 = 2
∂x
∂
f (x, y) = 0 + 2x + 6y + 0 − 3 = 2x + 6y − 3
∂y
∂
f (3.5, −0.5) = 7 − 3 − 3 = 1.
∂y
The partial derivatives give the slopes of the purple and red lines above. At
the point (3.5, −0.5), the (yellow) curves obtained by treating y as a constant
and letting x vary has a (magenta) tangent line with a slope of 2, the value
∂x f (3.5, −0.5). At the point (3.5, −0.5), the (blue) curves obtained by treating
∂
x as a constant and letting y vary has a (red) tangent line with a slope of 1,
the value ∂y∂
f (3.5, −0.5). □
Tangent line.
For a function, f (x, y), of two variables, we simply use partials for the
slopes.
Tangent Plane.
P (L, C) = cLα C β ,
where c, α, and β are constants. For our widget factory, this becomes
To produce the tangent plane we take the partial derivatives and evaluate
them at our base point.
□
In the case of the last example, evaluating the linear approximation was
nicer than evaluating the function directly because the 4th roots of 16 and 81
are whole numbers, while the 4th roots of 85 and 14 are harder to compute. For
real world functions, evaluating functions may involve a substantial investment
of time and money, depending on the nature of the function.
fy (4, 2) = 12 + 16 = 28.
f (3, y) = 9(3 + 2y )
1
f (x, −1) = (x2 )(x + 2−1 ) = x3 + x2 .
2
4. The function is the revenue function for selling widgets and gizmos
with demand price functions
QuantityGizmos QuantityWidgets
PriceGizmos = 30 − −
50 300
QuantityWidgets QuantityGizmos
PriceWidgets = 20 − − ,
40 500
and P1 = (QuantityGizmos, QuantityWidgets) = (1000, 500), and
P2 = (1050, 575).
5. The function is the revenue function for selling widgets and gizmos
with demand price functions
QuantityWidgets
PriceGizmos = 30(0.95)(QuantityGizmos/100) −
300
QuantityGizmos
PriceWidgets = 20(0.9) (QuantityWidgets/150)
− ,
250
and P1 = (QuantityGizmos, QuantityWidgets) = (800, 400), and
P2 = (750, 425).
Solution. For the sake of notation we will use the following abbre-
viations:
QG QW
PG = 30(0.95)( 100 ) −
300
QW QG
PW = 20(0.9)( 150 ) − ,
250
and P1 = (QG, QW) = (800, 400), and P2 = (750, 425).
We need to find the Revenue function to solve the problem:
Revenue(QG, QW) = QG ∗ PG + QW ∗ PW
( QG
) QW ( QW
) QG
= QG 30(0.95) 100 − + QW 20(0.9) 150 −
300 250
QG QG ∗ QW QW QG ∗ QW
Revenue(QG, QW) = 30QG(0.95)( 100 ) − + 20QW(0.9)( 150 ) −
5×6×10 5×5×10
( QG
) ( QW
) 11QG ∗ QW
= 30QG(0.95) 100 + 20QW(0.9) 150 − .
1500
(a) Give the 2 functions of one variable through P1 obtained by
holding each variable constant.
QW 88QW
Revenue(800, QW) = 24, 000(0.95)8 +20QW(0.9)( 150 ) − .
15
∂ QG
RevenueQG (QG, QW) = 30QG(0.95)( 100 )
∂QG
∂ QW ∂ 11 ∗ QG ∗ QW
+ 20QW(0.9)( 150 ) −
∂QG ∂QG 1500
h QG
(
= 30(0.95) 100 )
QG ln(0.95) 11 ∗ QW
+30QG(0.95)( 100 ) +0− .
100 1500
Note that the first part requires a product rule and then a chain
rule to deal with the exponential part of the formula.
∂ QG
RevenueQW (QG, QW) = 30QG(0.95)( 100 )
∂QW
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 271
∂ QW ∂ 11 ∗ QG ∗ QW
+ 20QW(0.9)( 150 ) −
∂QW ∂QW 1500
QW QW ln(0.9) 11 ∗ QG
= 0 + 20(0.9)( 150 ) + 20QW(0.9)( 150 ) − .
150 1500
Solution.
∂
ProductionL (L, C) = 10L0.74 C 0.26
∂L
(Take the partial derivative wrt L; Treat C as a constant.)
= 10(0.74)L−0.26 C 0.26 .
Then we have
7.4C 0.26
ProductionL (L, C) =
L0.26
∂
ProductionC (L, C) = 10L0.74 C 0.26
∂C
(Take the partial derivative wrt C; Treat L as a constant.)
= 10L0.74 (0.26)C −0.74 .
7.4300.26
ProductionL (300, 30) = ≈ 4.07
3000.26
3000.74
ProductionC (300, 30) = 2.6 0.74 ≈ 14.29.
30
(a) Give the 3 functions of one variable through P1 obtained by holding each
variable constant.
(b) Find the partial derivatives of the original function.
(c) Evaluate the partial derivatives at P1 .
(d) Give the equation of the linear approximating function through P1 .
(e) The approximation at P2 obtained from the function in d.
8. The function is f (x, y, z) = x2 + 3xy + 4y 2 + 2z 2 + 5xz, P1 = (4, 2, 1),
and P2 = (3, 2.5, 2).
9. The function is f (x, y, z) = (x+3y−2z)/(x2 +y 2 +z 2 ), P1 = (2, 3, −1),
and P2 = (3, 2.5, 0).
Solution.
(a) Give the 3 functions of one variable through P1 obtained by
holding each variable constant.
x+9+2 x + 11
f (x, 3, −1) = = 2
x2 + 9 + 1 x + 10
2 + 3y + 2 3y + 4
f (2, y, −1) = 2
= 2
4+y +1 y +5
2 + 9 − 2z 11 − 2z
f (2, 3, z) = = .
4 + 9 + z2 13 + z 2
(b) Find the partial derivatives of the original function.
(1)(x2 + y 2 + z 2 ) − (x + 3y − 2z)(2x)
fx (x, y, z) =
(x2 + y 2 + z 2 )2
(x2 + y 2 + z 2 ) − (2x2 + 6xy − 4xz)
=
(x2 + y 2 + z 2 )2
(−x2 + y 2 + z 2 − 6xy + 4xz)
=
(x2 + y 2 + z 2 )2
(3)(x2 + y 2 + z 2 ) − (x + 3y − 2z)(2y)
fy (x, y, z) =
(x2 + y 2 + z 2 )2
(3x2 + 3y 2 + 3z 2 ) − (2xy + 6y 2 − 4yz)
=
(x2 + y 2 + z 2 )2
3x − 3y + 3z 2 − 2xy + 4yz
2 2
=
(x2 + y 2 + z 2 )2
(−2)(x2 + y 2 + z 2 ) − (x + 3y − 2z)(2z)
fz (x, y, z) =
(x2 + y 2 + z 2 )2
(−2x − 2y − 2z 2 ) − (2xz + 6yz − 4z 2 )
2 2
=
(x2 + y 2 + z 2 )2
−2x − 2y + 2z 2 − 2xz − 6yz
2 2
= .
(x2 + y 2 + z 2 )2
Linear f (x, y, z) = f (2, 3, −1) + fx (2, 3, −1)(x − 2) + fy (2, 3, −1)(y − 3) + fz (2, 3, −1)(z + 1)
13 19 9 1
= − (x − 2) − (y − 3) − (z + 1).
14 98 49 98
Section-6-3-Examples.xlsx
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 276
Standalone
Solution.
0 = 2x + 2y − 4
0 = 2x + 6y − 3.
0 = 0 − 4y − 1.
Solve for y:
4y = −1
y = −1/4.
0 = 2x + 2(−1/4) − 4
2x = 9/2
x = 9/4.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 278
Critical Point If the partials are more complicated, I will want to find
by Solver the critical points another way. I can find the point with
Solver.
Standalone
minimum at 0.
f (x, 0) = x2
f (0, y) = y 2 .
Looking at the graph, we see that this graph does not have a minimum.
Second partials.
∂ ∂
fab = (fa )b = ( f ).
∂b ∂a
Note that fxx is simply the old second derivative of the curve f (x, y0 ) and
fyy is simply the old second derivative of the curve f (x0 , y). For functions with
continuous second partial derivatives, the mixed partials, fyx and fxy are the
same.
Example 6.3.7 Finding Second Partial Derivatives. Find the second
partial derivatives of
∂
fx = f (x, y) = 2x + 3y − 7
∂x
∂
fy = f (x, y) = 3x + 15y 2 − 11.
∂y
Then we compute the second partial derivatives.
∂
fxx = fx = 2
∂x
∂
fxy = fx = 3
∂y
∂
fyx = fy = 3
∂x
∂
fyy = fy = 30y.
∂y
D = (2)(30y) − 32 = 60y − 9.
□
Discriminant test.
Let (a, b) be a critical point of f (x, y).
If D(a, b) > 0 and fxx (a, b) > 0 then (a, b) is a local minimum of
f (x, y).
If D(a, b) > 0 and fxx (a, b) < 0 then (a, b) is a local maximum of
f (x, y).
If D(a, b) < 0 then (a, b) is a saddle point of f (x, y).
If D(a, b) = 0 we do not have enough information to classify the
point.
maximum, local minimum, saddle point, not a critical point, or not enough
information to classify.
We have critical points when both first partials are 0, so at (1, 2), (−1, 2),
(1, 0), and (−1, 0).
At (1, 2), both D and fxx are positive, so we have a local minimum.
At (−1, 2) and (1, 0), D is negative, so we have a saddle point.
At (−1, 0), D is positive and fxx is negative, so we have a local maximum.
□
fxx (x, y) = 2
fxy (x, y) = 2
fyy (x, y) = 8
D = fxx (x, y)fyy (x, y) − fxy (x, y)2 = 2 ∗ 8 − 22 = 12 > 0.
fx (x, y) = −2x + 2y + 8
fy (x, y) = 2x − 8y − 11.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 285
fx (x, y) = −2x + 2y + 8 = 0
fy (x, y) = 2x − 8y − 11 = 0.
fxx (x, y) = −2
fxy (x, y) = 2
fyy (x, y) = −8
D = fxx (x, y)fyy (x, y) − fxy (x, y)2 = 2 ∗ 8 − 22 = 12 > 0.
6. The function is the revenue function for selling widgets and gizmos
with demand price functions
QuantityWidgets
PriceGizmos = 30(0.9)(QuantityGizmos/150) −
250
QuantityGizmos
PriceWidgets = 20(0.97) (QuantityWidgets/50)
−
350
for the region 0 ≤ QuantityWidgets ≤ 1500, and 0 ≤
QuantityGizmos ≤ 1500. (Warning: There are several critical points.)
7. Based on the information given, classify each of the following points as a
local maximum, local minimum, saddle point, not a critical point, or not
enough information to classify.
(4) A saddle point where the function f(x,0) and f(0,y) both have inflec-
tion points.
(3) A saddle point where the function f (x, 0) has a local maximum and
f (0, y) has a local minimum: (x, y) = −x4 + y 4 .
(4) A saddle point where the function f (x, 0) and f (0, y) both have
inflection points: f (x, y) = x3 + y 3
Before we can find the curve that is best fitting to a set of data,
we need to understand how “best fitting” is defined. We start with
the simplest nontrivial example. We consider a data set of 3 points,
(1, 0), (3, 5), (6, 5) and a line that we will use to predict the y-value
given the x-value, predicted(x) = x/2 + 1. We want to determine how
well the line matches that data. For each point, (xi , yi ), in the set we
start by finding the corresponding point, (xi , predicted(xi )), on the line.
This gives us a set of predicted points, (1, 1.5), (3, 2.5), (6, 4).
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/
Section-6-4-Examples.xlsx
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 289
For each point we now compute the difference between the actual
y-values and the predicted y-values. Our errors are the lengths of the
brown segments in the picture, in this case 3/2, 3/2, 1. Finally we add
the squares of the errors, 9/4 + 9/4 + 1 = 11/2.
The best fitting line is defined to be the line that that minimizes the
sum of the squares of the error. If we are trying to fit the data with a
different model, we want to choose the equation from that model that
minimizes the sum of the squares of the error.
Standalone
visible. The trendline command tells us the slope should be 2 and the intercept
should be 1.
□
Example 6.4.3 Finding a Best-Fit Curve with the Definition and
Solver. Use solver and the definition of best fitting to find the best fitting line
for the data:
x 2 4 8
y 1 15 15
y = 2x + 1.
□
Example 6.4.4 Finding a Best-Fit Curve with the Definition and
Calculus. Use calculus, partial derivatives, and the definition of best fitting
to find the best fitting line for the data:
x 2 4 8
y 1 15 15
Solution. Before we can use partial derivatives to find a best fitting line, we
need a function whose derivatives we are taking. We start with the chart we
produced when we were using solver. This gives a formula for the squared error
at each point in terms of the slope and intercept of the line.
We can expand the error squared term and add up those values. After a
straightforward but tedious computation, we see that we are trying to minimize
We take the partial derivative of this function with respect to the slope m
and the intercept b.
Setting the two partials to zero and solving we see the partials are both
zero when m = 2 and b = 1. One again, this method produces the same best
fitting line. □
We can use the same methods with a larger problem.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 292
Standalone
□
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 293
The advantage of using the sum of squares definition is that we can find a
best fitting curve using a model not supported by Excel. For example, if we
have money invested with interest, but a portion of the capital kept available
as cash without earning interest, we are looking for a curve of the form:
The trendline command does not let us choose such a model to find a best
fitting curve. It is straightforward using the best fit construction.
Example 6.4.7 Finding a Best-Fit Curve for a Nonstandard Model
Equation.
Standalone
Year Amount
0 $10,000
2 $10,920
5 $12,490
8 $14,300
9 $14,960
12 $17,169
14 $18,820
17 $21,630
19 $23,740
20 $24,880
We think the investor put some money in a secure account that does not give
interest (a coffee can) and the rest of the money in an account that bore interest
(an investment account). Find the amount deposited in each account and the
interest rate of the investment account.
Solution. We set this up much like we did for the linear model, except of
model equation is now
We then use Solver to minimize cell E26, by changing cells B20:B22. Our
solution indicates that CashAmount = $997.76, DepositAmount = $9, 005.51,
and rate = 1.05. □
When we use this technique with other mathematical models, the only
change is in the formula used for the predicted y value.
Example 6.4.9 Finding a Best-Fit Logistic Curve.
Standalone
Time Trees
0 150
5 400
10 1030
20 5300
30 12020
40 14510
Solution. We set this up much like we did for the linear model, but using
the logistic model.
We then use Solver to minimize cell E12, by changing cells B1:B3. Our
solution indicates that Capacity = 14996, C = 99.93, and rate = 0.200.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 295
Reading Check
1. Reading check, Optimization and Best Fitting Curves.This ques-
tion checks your reading comprehension of the material is section 6.4,
Optimization and Best Fitting Curves, of Business Calculus with Excel.
Based on your reading, select all statements that are correct. There may
be more than one correct answer. The statements may appear in what
seems to be a random order.
C The best fitting line is defined to be the line that that minimizes the
sum of the squares of the error.
D The minimize sum of squared errors method works with a broader
array of functions.
E the trendline command only works with a limited number of kinds
of functions.
F To find the best fitting curve we try to use the trendline command,
even if the curve is not a line.
G The method of using partial derivatives has the advantage of easiest
to use.
(3) Add error to your spreadsheet. Find the best fitting line, using Solver.
(4) Explicitly find the sum of squared errors function as a quadratic function
of the slope m, and the intercept b.
(5) Find the values of m and b that minimize the error function by taking
partial derivatives and setting them equal to 0.
1. The given points are:
x -2 0 6
y -7 5 15
x -2 0 6
y 24 10 20
3. The given points are:
x -3 -1 1 3
y -2 6 10 10
Solution.
predicted y = mx + b.
If we had not done the trendline, the question would be: what should
the initial values for m and b?
The data ranges from (−3, −2) to (3, 10) which suggests a slope
of m ≈ (10 − (−2))/(3 − (−3)) = 12/6 = 2. Looking at the data near
the y-axis suggests an initial guess of b ≈ 7.5. So we would start with
an Excel sheet like this:
x -2 0 2 4
y -7 5 11 11
Exercise Group. Find the curve of the indicated type that gives the best
fit for the data.
5. Sally has money invested in a single account that compounds the
return back into the account. Thus, the model we want to use for the
amount is:
After using Solver we determine that the best model function for
our data is as follows:
Time 0 2 5 10 15 20 30 40
Amount $10000 $11300 $13500 $18300 $24700 $33500 $62600 $118800
It is worth graphing both the actual data and the predicted data
to see if we are setting the problem up correctly.
The general shape of the predicted values graph seems fine. The
values are off, but Solver will be able to reduce the error.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 302
In Excel the data and the predicted values now line up very nicely.
8. John has divided his money between two accounts. They both com-
pound their returns, but they pay different rates. Thus, the formula
that models the investment is:
Time 0 2 5 10 15 20 30 40
Amount $10000 $11500 $14000 $20000 $29000 $41500 $87000 $183500
Integration
Suppose that for a given company the marginal cost has been determined to
be
MarginalCost(x) = x3 + 3x2 .
We would like to re-construct the cost function from this data. Suppose we
also know that the fixed cost is equal to $100. How do we find out the cost for
producing x items?
• Start with the fixed cost.
• Add the marginal cost for each consecutive item.
• Create a running cost column to keep track of the cost as we accumulate
the data.
For this example we would get:
We would like to relate this data to the original graph of the marginal cost.
When we consider this graph we see that the estimated cost actually corre-
sponds to the area underneath the Marginal Cost function MarginalCost(x).
303
CHAPTER 7. INTEGRATION 304
we find the area of the rectangle by taking base times height and noting
60 ∗ (3 − 0.5) = 150. Note that we do the same computation if I ask how much
I earn over a period of 2.5 years if I make $60K a year, or how much oil is
produced in 2 and a half hours form an oil well that produces 60 barrels of oil
an hour. □
In a similar manner, if the function I am accumulating is non-constant and
linear, I can find area by using the area formula of a triangle, one half base
time height.
Example 7.1.2 Approximating Area under a Quadratic Functions.
The question becomes more difficult when I want to find the area under a
curve that is not linear. Suppose for example that we want to find the area
under the curve
y = x ∗ (4 − x)
between x = 0 and x = 4.
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/
Section-7-1-Examples.xlsx
CHAPTER 7. INTEGRATION 305
We no longer have a nice formula from geometry for the area. Thus we
start making approximations. The easiest approximation is to note that the
area has to be less than the area of the 4 by 4 rectangle we can draw around
the region.
We can improve our estimate by dividing the interval [0, 4] into 4 equal
subintervals and then taking the combined area of the 4 rectangles we need to
contain the region. This reduces our upper estimate from 16 to 14.
□
Example 7.1.4 Approximating an Area with a Riemann Sum with
Excel.
Standalone
Figure 7.1.6
Following our standard practice, we set up the question and answer in
labeled areas at the top of the worksheet. The width of a subinterval is the
width of the whole interval divided by the number of subintervals. The column
xn is for the x value at the right side of the n-th subinterval. We calculate
the value of xn by taking the starting point, xo , and adding n times the width
of a subinterval. We then evaluate the function at xn , which we label f (xn ).
The area of the n-th rectangle is the height, or f (xn ), times the width of the
subinterval. The last column is the total area for the first n rectangles. The
area for 100 rectangles is our area estimate. Since we don’t want to have to
look all over for our answer, we bring the area up to cell D2 with the OFFSET
command. The command OFFSET(E6,B3,0) starts in cell E6, goes down B3
(the number of subintervals) rows, and goes over 0 columns. In our case, it
finds the value in cell E106 and puts it in cell E6.
To find the area we quick fill our worksheet.
Figure 7.1.7
For a more accurate estimate we divide into smaller rectangles.
□
While 100 subintervals will be close enough for most of the problems we are
interested in, the ”area”, or definite integral, will be defined as the limit of this
sum as the number of subintervals goes to infinity. In other words, the definite
integral is the area under the curve as the rectangles get infinitely thinner. In
math notation:
Z b X
n
f (x)dx = lim f (xi )∆x
a n→∞
i=1
CHAPTER 7. INTEGRATION 309
with ∆x = b−a
n and xi = a + i ∗ ∆x.
Pn
The sums of the form, i=1 f (xi )∆x with ∆x = b−a
Rb n and xi = a + i ∗ ∆x,
are called Riemann sums. The limit, written a f (x)dx, is called a definite
integral.
As a memory aid, it is worth noting that the symbol used for the sum is
an upper case sigma, or S for sum in the Greek alphabet. When we take the
limit we use an integral sign, which is a stylized S in the Latin alphabet.
It is worth noting that in this definition we are finding “signed area under
a curve.” If the function f (x) is negative over the interval, the integral will
also be negative, in the same we would have a negative change in our bank
statement if we were steadily removing money. Similarly we can get a negative
integral when the ends of the interval are reversed. If I am steadily adding
money to an account, the net change is negative if I measure from 5 years in
the future back to today.
We should note that, for functions nice enough to be considered in this
class, we get to the same limit by using rectangles with the function evaluated
on the right side of the rectangle or the left side of the rectangle, or any point
in the rectangle we choose. Choosing the right hand side for evaluation makes
our formulas a little simpler.
Example 7.1.8 Present Value of a Revenue Stream.
Standalone
With 500 intervals we estimate the present value of the revenue stream to
be worth $2.3222 Billion. If we had only used 100 intervals, the estimate would
have been for $2.318 Billion, while 1000 intervals gives an estimate of $2.3232
Billion. □
Reading Check
1. Reading check, Approximating Definite Integrals as Sums.This
question checks your reading comprehension of the material is section
7.1, Approximating Definite Integrals as Sums, of Business Calculus with
Excel. Based on your reading, select all statements that are correct. There
may be more than one correct answer. The statements may appear in what
seems to be a random order.
C The text mentioned a memory aid that uses the Greek and Latin
alphabets.
D For functions in this class it does not matter is our sum uses right
or left hand points to form the rectangle in a subinterval.
The answer is given as follows. Note that in this screen grab the center
part of the sidebyside was hidden so that the image is a reasonable size.
CHAPTER 7. INTEGRATION 311
2. Let f (x) = 5−3x. Estimate the area under f (x) on the interval 2 ≤ x < 10
using 200 rectangles and a right hand rule.
3. Let f (x) = x2 + 3x + 1. Estimate the area on the interval −10 ≤ x < −2
under f (x) using 200 rectangles and a right hand rule.
Solution. The set-up is very similar to the one in problem 1.
4. Let f (x) = −x2 + 7x − 10. Estimate the area below the curve y = f (x)
and above the x-axis using 100 rectangles and a right hand rule.
5. Let f (x) = 3 ln(x). Estimate the area under f (x) on the interval 1 ≤ x <
10 using 50 rectangles and a right hand rule.
CHAPTER 7. INTEGRATION 312
(b) Find the approximations to the area using Riemann sums with 50,
100, and 200 intervals.
(c) Find the error for each of the three approximations you made.
(d) For this case, make an estimate of the error in terms of the number
of intervals used.
9. Consider the area under the line y = x2 on the interval 0 ≤ x ≤ 3. In
later sections we will show that the exact area is 9.
(a) Find the approximations to the area using Riemann sums with 1,
10, 100, and 1000 intervals.
(b) Find the error for each of the four approximations you made.
(c) For this case, make an estimate of the error in terms of the number
of intervals used.
(d) How many intervals would we need for an error of less that 10−6 ?
CHAPTER 7. INTEGRATION 313
Solution.
N Riemann Sum Error
1 27 18
(a) 10 10.395 1.395
100 9.135 0.135
1000 9.0135 0.0135
(b) The errors are included in the sidebyside above. Subtract 9 from the
approximation found in Excel. Note that there is a bit of a pattern.
13.5
(c) The larger values of N seem to have an error of about N
Solution.
(a) Estimate the total sales in the first year.
The total sales would be the sum of the sales each month. This is
the same as a right hand sum of the function Sales(t) = 500 ∗ 2.08t
on the interval [0, 12] with 12 subdivisions. The Excel commands
are as follows (quick fill down to complete the Excel table):
Results:
CHAPTER 7. INTEGRATION 314
Section-7-2-Examples.xlsx
CHAPTER 7. INTEGRATION 316
□
Example 7.2.3 Area function for linear function by geometry. Let
f (t) = c ∗ t. For a linear function, f (t) = c ∗ t, the area under the curve from
0 to b will be the area of a triangle of height c ∗ b and width b.
The obvious area function is F (x) = c ∗ x2 /2. If a is also nonzero, the area
is the difference of the areas of two triangles.
Z b
c ∗ b2 c ∗ a2 c(b2 − a2 )
c ∗ tdt = F (b) − F (a) = − = .
a 2 2 2
□
Remark 7.2.4 A note on versions of Riemann sum used. As we consider
finding area with Excel and Riemann sums, rather than use a right-hand rule
for the rectangles, we are going to use a midpoint rule where we find the area
of rectangles evaluated at the middle of each interval.
CHAPTER 7. INTEGRATION 317
The right-hand rule uses an easier formula, so we used it first. For the ith
rectangle we evaluate at xi = a + i∆x. For the midpoint formula, we evaluate
at the midpoint of the interval, at midi = a + i∆x − ∆x/2. As the picture
suggests, the midpoint formula gives a better approximation. The right-hand
rule always overestimates an increasing function. The midpoint rule is exact
for linear functions where the midpoint is the average value.
In both of the examples we have examined the area function has the original
function as its derivative. We would like to use Excel to test a few more cases.
In the worksheets we set up in the last section, SumArea is the area function
we are looking for. We will plot the area function and use a best-fit curve to
find the equation of the area function.
Example 7.2.5 Best fitting area function for a linear function.
Standalone
Figure 7.2.7
Column C has our list of t values in the center of each interval. Column
D has the value of f (t) evaluated at those points. The area of the rectangle
is the height f (midn ) times the width, Interval width. SumArea is our run-
ning area function. When we plot the area function, we have something that
seems to be quadratic with leading coefficient c/2 and very small linear and
constant coefficients. In fact, the linear and constant coefficients are zero up
to a rounding factor for numbers of the size we are using.
□
This matches the result we had solving the problem with geometry. How-
ever, we can repeat the process with Excel and use functions of higher order.
Example 7.2.8 Best fitting area function for a quadratic function.
Standalone
When we plot the area function we get a very good fit with a cubic function.
Once again, allowing for the way best-fit curves may return small random values
for coefficients that should be zero, we see that if f (t) = c ∗ t2 , then the related
area function is
F (x) = c ∗ t3 /3.
□
Example 7.2.10 Best fitting area function for a cubic function.
Standalone
□
In all the examples above, we note that the area function, F (x), has f (x),
the curve we are finding the area under, as its derivative. Thus, in these
cases, the area is an anti-derivative of f (x). This observation generalizes to
the Fundamental Theorem of Calculus, which has two versions:
Theorem 7.2.12 Fundamental Theorem of Calculus (first version).
Let f (x) be a continuous function
Rx on the interval [a, b]. On that interval define
d
an area function by F (x) = a f (t)dt. Then dx F (x) = f (x).
Theorem 7.2.13 Fundamental Theorem of Calculus (second version).
Let f (x) be a continuous function on the interval [a, b]. Suppose F (x) is any
d
Rb
continuous, differentiable function with dx F (x) = f (x). Then a f (t)dt =
F (b) − F (a).
In practice, we use the second version of the fundamental theorem to eval-
Rb
uate definite integrals. Starting with a definite integral a f (t) dt, we find
a function F (x) whose derivative is f (x), the integrand or function we are
integrating, and then evaluate F (x) at the endpoints.
It is easier to prove or justify the first Rversion of the fundamental theorem.
x
The basic argument notes that is F (x) = a f (t) dt, then formally
d (F (x + h) − F (x))
F (x) = lim .
dx h→0 h
CHAPTER 7. INTEGRATION 321
□
To get the same answer to 4 decimal places, we needed to use 1000 intervals
with Riemann sums. Clearly, it is easier to solve this problem with the fun-
damental theorem of calculus than to make an approximation with that many
intervals.
Example 7.2.15 Verifying an antiderivative to find area. Let f (x) =
x2 e−x . We are told F (x) = (x2 + 2x + 2)(−e−x ) is an anti-derivative of f (x).
Verify the anti-derivative and find the area under the curve with x between 0
and 2.
Solution. Using the product rule,
The area is
□
We also want to revisit our first three examples in light of the fundamental
theorem if calculus. In all of those examples, we used Excel to find a best
fitting curve for an area function. We can now check our work by taking the
derivative, adjusting parameters as needed, to find an anti-derivative. For
constant and linear functions we have already done the adjusting because we
could find the area function from geometry.
Example 7.2.16 Using the FTC to guess and check area under a
quadratic. Find the area function when f (t) = 6t2 .
Solution. We have already used Excel to find a best fitting curve.
CHAPTER 7. INTEGRATION 322
Reading Check
1. Reading check, The Fundamental Theorem of Calculus.This ques-
tion checks your reading comprehension of the material is section 7.2,
The Fundamental Theorem of Calculus, of Business Calculus with Excel.
Based on your reading, select all statements that are correct. There may
be more than one correct answer. The statements may appear in what
seems to be a random order.
Solution.
(a)
d
F ′ (x) = (2x2 + 5x + 7) = 4x + 5
dx
(b)
Z 5
f (x)dx = F (5) − F (1) = 82 − 14 = 68
1
Solution.
CHAPTER 7. INTEGRATION 324
(a)
d 1 5
F ′ (x) = [ln(x5 ) + 9] = 5 (5x4 ) + 0 =
dx x x
or
d d 1 5
F ′ (x) = [ln(x5 ) + 9] = [5 ln(x) + 9] = 5 + 0 = .
dx dx x x
Z 20
5
(b) dx = F (20)−F (1) = ln(205 )+9−(ln(1)+9) = ln(205 ) = 14.98
1 x
(c) The midpoint sum with N = 200 gives an approximation of 14.978
4. Let f (x) = (2x + 3)4 . We are told that F (x) = 0.1(2x + 3)5 is an anti-
derivative.
(a) Verify that f (x) is a derivative of F (x).
R1
(b) Use the fundamental theorem of calculus to evaluate −1
f (x) dx.
R1
(c) Approximate −1
f (x) dx, using Riemann sums and 100 intervals.
5. Let f (x) = xexp(−0.05x). We are told that F (x) = −20(x +
20) exp(−0.05x) + 3 is an anti-derivative.
Solution.
(a)
d
F ′ (x) = [−20(x + 20)e−0.05x + 3]
dx
= −20[(1)e−0.05x + (x + 20)e−0.05x (−0.05)]
= [(−20)e−0.05x + (x + 20)e−0.05x ]
= e−0.05x [(−20) + (x + 20)]
= e−0.05x x.
Z 10
(b) xe−0.05x dx = F (10) − F (0) = −360.92 − (−397) = 36.08
0
Solution.
(a) The anti-derivative should be a cubic, so something of the form
8. Using an area function from Riemann sums and best fitting curves we have
guessed that a cubic function will have a fourth degree anti-derivative.
Solution.
(a) A quick computation gives the total area:
Note that this is not a very good approximation. The curve does
not follow the data very well on the right hand side of the graph.
(b) Based on the curve we would say that the anti-derivative should be
an exponential function. The derivative of e2x is 2e2x , so it seems
reasonable to start with the anti-derivative being F (x) = Ae2x + B.
Then the derivative has to be f (x).
Solution.
(a)
F (x) = ln(x).
Z
xn+1
xn dx = + C, assuming n ̸= −1.
n+1
Note that this matches the pattern we found in the last section.
R
Elementary Anti-derivative 2 — Find a formula for 1/x dx.
d
We start with the closest differentiation formula dx ln(x) = 1/x. In this
case, we need to note that natural logarithms are only defined positive numbers
and we would like a formula that is true for positive and negative numbers. We
d
can do this with an appropriate use of absolute value bars. Thus, dx (ln(|x|) +
C) = 1/x, and we have our second formula:
Z
1/x dx = ln |x| + C.
R
Elementary Anti-derivative 3 — Find a formula for ex dx.
d x
Once again, we start with the closest differentiation formula dx e = ex . In
this case we don’t have to do any manipulation, and we have our formula:
Z
ex dx = ex + C.
R
Elementary Anti-derivative 4 — Find a formula for ax dx for a posi-
tive number a.
d x
This formula requires a bit more work. We start with the formula dx a =
x x d x
ln(a)a . Dividing both sides by the constant ln(a) gives a = dx (a / ln(a)+C).
Thus our integral is:
Z
ax
ax dx = + C.
ln(a)
We can use these rules to find the indefinite integrals on a lot of functions.
They cover all polynomials.
Example
R 5 7.3.1 Antiderivative of integral powers. Find the integral
3x + 4x2 + 5 + x7 dx.
Solution.
Z Z Z Z Z
7 7
3x5 + 4x2 + 5 + dx = 3x5 dx + 4x2 dx + 5 dx + dx (sum rule)
x x
Z Z Z Z
1
= 3 x5 dx + 4 x2 dx + 5 dx + 7 dx (constant multiple rule)
x
Z Z Z
= 3 x5 dx + 4 x2 dx + 5 dx + 7 ln |x| + C (natural log rule)
3 6 4 3
= x + x + 5x + 7 ln |x| + C (power rule).
6 3
One might argue that the last line should have been
3 6 4
= x + C1 + x3 + C2 + 5x + C3 + 7 ln |x| + C4
6 3
since each indefinite integral gets a constant C. However all of the constants
used here are arbitrary constants and they can be collapsed together into a
single constant C. □
We can also use these rules to find indefinite integrals for roots.
Example
R√ √7.3.2 Antiderivative of fractional powers. Find the integral
2x + 3 4x dx.
Solution.
Z √ √ Z √ Z √
3 3
2x + 4x dx = 2x dx + 4x dx (sum rule)
√ Z √ Z
√ 3 √
= 2 x dx + 4 3
x dx (constant multiple rule)
√ Z √ Z
= 2 x(1/2) dx + 4 x(1/3) dx (rules of exponents)
3
√ √
= 2x(3/2) (2/3) + 4x(4/3) (3/4) + C (power rule).
3
□
We can also find anti-derivatives of exponential and power functions.
Example 7.3.3 RAntiderivative of power and exponential functions.
Find the integral 2 ∗ 3x + 4ex dx.
Solution.
Z Z Z
2 ∗ 3 + 4e dx = 2 ∗ 3 dx + 4ex dx (sum rule)
x x x
Z Z
= 2 3x dx + 4 ex dx (constant multiple rule)
2 x
= 3 + 4ex + C (exponential rules).
ln(3)
CHAPTER 7. INTEGRATION 331
□
As we mentioned earlier in the section, the normal reason for wanting to
find indefinite integrals is to be able to use them with the fundamental theorem
of calculus to find definite integrals.
Example 7.3.4 Area under a polynomial function. Evaluate the definite
R3
integral 1 6x2 + 2 dx.
Solution. We first evaluate the indefinite integral to find an anti-derivative.
Z
6x2 + 2 dx = 2x3 + 2x + C.
If we choose a different value for C, it cancels out when we subract the values
at the endpoints., □
R 100
Example 7.3.5 Area under x1 . Evaluate the definite integral 1 x1 dx.
Solution. We first evaluate the indefinite integral to find an antiderivative.
Z
1
dx = ln(|x|) + C.
x
Since we can use any antiderivative, we simplify by setting C = 0 and
choosing that anti-derivative F (x) = ln(|x|).
Z 100
1
dx = F (100) − F (1) = ln(100) − ln(1) = ln(100).
1 x
□
Example 7.3.6 Using the FTC when the function is fit from data.
From experience, I know that the output of an oil well follows a model of
exponential decay. I have the following data for the production, in barrels, for
the first 5 months.
Month Jan Feb Mar Apr May
Production 1000 971 925 887 859
and we know that ln(0.9613) = −0.03945. We can now use our exponential
rule, and
(1043 ∗ 0.9613x )
Antideriv P (x) = + C.
(−0.03945)
Since we can use any anti-derivative, we simplify by setting C = 0. We
can do this without creating any problems because we are using the equation
where two values of the anti-derivative will be subtracted from one another,
and hence the C values would cancel anyways. We now evaluate our integral.
Production 0 1 2 3 4
Marginal Profit $3,3967 $3,603 $3,236 $2,795 $2,384
Produce a profit function, find the number of units that maximizes profit, and
find the maximum profit.
Solution. I start by finding a best fitting line to the data.
We have maximum profit when the marginal profit is zero. Using Goal Seek,
the Marginal Profit is zero with a production of 10.0448 millions of units. The
anti-derivative of this function is
Plugging in the initial costs into the production model, recalling that our
function is written in thousands of dollars per millions of widgets, gives
P (0) = −2000 = C.
R
f (x) f (x) dx
xn+1
xn , assuming n ̸= 1 +C
n+1
1
ln |x| + C
x
ex ex + C
ax
ax +C
Z ln(a) Z
(f + g)(x) f (x) dx + g(x)dx
Z Z
(f − g)(x) f (x) dx − g(x)dx
Z
c ∗ f (x) c ∗ f (x) dx
Reading Check
1. Reading check, Basic Antidifferentiation.This question checks your
reading comprehension of the material is section 7.3, Basic Antidifferenti-
ation, of Business Calculus with Excel. Based on your reading, select all
statements that are correct. There may be more than one correct answer.
The statements may appear in what seems to be a random order.
R ax
A ax dx = ln(a) + C.
R x
B a dx = ln(a) ∗ ax + C, assuming n ̸= −1.
R
C ex dx = ex + C.
R x+1
D ex dx = ex+1 + C, assuming n ̸= −1.
R xn+1
E xn dx = n+1+ C, assuming n ̸= +1.
R R R
F (f (x) ∗ g(x))dx = f (x)dx ∗ (g(x)dx.
R n n+1
G x dx = xn+1 + C, assuming n ̸= −1.
R R R
H (f (x) + g(x))dx = f (x)dx + (g(x)dx.
R n
I x dx = nxn−1 + C.
R
J 1/xdx = ln |x| + C.
K None of the above
1.
f (x) = 3x + 5.
Solution.
3x2
F (x) = + 5x + C.
2
2.
f (x) = 5x3 + 4x + 3.
3.
f (x) = x3,124,567 + 2x473 + 327x−2,786,534 .
Solution.
x3,124,568 x474 x−2,786,533
F (x) = +2 + 327 + C.
3, 124, 568 474 −2, 786, 533
4.
5 √
f (x) = . 11x +
x
5. x
x 1
f (x) = e + .
2
Solution.
1 x
2
F (x) = ex + + C.
ln 12
6.
f (x) = π x + π π + xπ .
Z 10
5 300 12
3x + dx = F (10) − F (2) = + 5 ln(10) − + 5 ln(2)
2 x 2 2
= 150 + 5 ln(10) − 6 − 5 ln(2) = 144 + 5(ln(10) − ln(2))
10
= 144 + 5 ln = 144 + 5 ln(5).
2
CHAPTER 7. INTEGRATION 336
10. Z x
100
1
dx.
1 2
11. Z 2
ex + e dx.
−10
Z 2
ex + edx = F (2) − F (−10) = e2 + 2e − (e−10 − 10e)
−10
1
= e2 − + 12e.
e10
12. Z 5
x−2 + x−1 dx.
−2
100(0.955 )
F (5) = +C =9
ln(0.95)
100(0.955 )
C =9− ≈ 9 + 1508.54 = 1517.54.
ln(0.95)
Then
100(0.95x )
F (x) ≈ + 1517.54.
ln(0.95)
16. Let f (x) = 7/x + x2 . The function F (x) is an antiderivative, and
F (1) = 11.
17. An investment provides an income stream of 1000(0.95)t dollars per year.
How much is received in the first 10 years?
Solution.
Z 10 t=10
1000(0.95)t )
Income = 1000(0.95)t dt =
0 ln(0.95) t=0
1000(0.95)10 1000(0.95)0
= −
ln(0.95) ln(0.95)
CHAPTER 7. INTEGRATION 337
Solution.
(a)
Z 1 t=1
400
Production = 400(0.9)t dt = (0.9)t
0 ln(0.9) t=0
400
= (0.9 − 1) ≈ 379.649.
ln(0.9)
(b)
Z 10 t=10
400
Production = 400(0.9)t dt = (0.9)t
9 ln(0.9) t=9
400
= (0.910 − 0.99 ) ≈ 147.08.
ln(0.9)
(c)
0.075 = 400 ∗ (0.9)t
t = ln(0.75/400)/ln(0.9) ≈ 81.451.
22. The expected value received from a particular revenue stream should be
an exponential function. I have the following data for income received
over the past 5-year period.
Year 1 2 3 4 5
Income $1,030 $1,078 $1,110 $1,169 $1,225
d 1 1
( (3x + 5)8 + C) = ∗ 8(3x + 5)8−1 ∗ 3 = 3(3x + 5)7 .
dx 8 8
Thus our guess was off by a factor of 3 and the correct antiderivative is
1 1 1
∗ (3x + 5)8 + C = (3x + 5)8 + C.
3 8 24
□
We can easily use the same trick to produce a rule for powers of a linear
polynomial.
Example
R 7.4.2 Power of a generic linear by guess and check. Find
(ax + b)n dx.
Solution. As we did in the previous example, we first guess the antiderivative
1
to be n+1 (ax + b)n+1 + C. We then take the derivative of that expression and
obtain a(ax + b)n . This misses our integrand by a factor of a. We adjust by
that factor and find the antiderivative is a1 (n+1)
1
(ax + b)n+1 + C. □
We can use the same trick to produce a rule for functions that are the
exponential of a linear function.
Example 7.4.3 Antidifferentiation
R of an exponential function by
guess and check. Find eax+b dx.
Solution. As we did in the last example, our first guess uses the basic rule
without worrying about the linear term, so we guess eax+b + C. We then
take the derivative of that expression and obtain aeax+b . This misses our
integrand by a factor of a. We adjust by that factor and find the antiderivative
is a1 eax+b + C. □
We run into a problem if we try to extend this method with quadratic terms.
If we start with (x2 + 5)3 and guess an antiderivative of 14 (x2 + 5)4 , when we
differentiate we get (x2 + 5)3 2x and are off by a factor of 8x. However, when
2
+5)4
we divide by that factor to get (x 8x as a proposed antiderivative, and then
differentiate again, we get
d
(f (g(x))) = f ′ (g(x))g ′ (x).
dx
We want to use the same rule with a different notation, using implicit
differentiation and a new variable u:
d du
(f (u)) = f ′ (u) .
dx dx
By the fundamental theorem of calculus, we can convert this to an integration
formula: Z
du
f ′ (u) dx = f (u) + C.
dx
du
We will generally simplify dx dx to du, so our substitution rule is
Z
f ′ (u)du = f (u) + C.
CHAPTER 7. INTEGRATION 340
Let us rework some earlier examples with this method and then illustrate
the method with a more difficult problem.
Example 7.4.4
R Power of linear example redone with change of vari-
ables. Find (3x + 5)7 dx.
Solution. The obvious candidate for u is 3x + 5. Then du = 3 dx. Thus
Z Z
7 1
(3x + 5) dx = (3x + 5)7 (3 dx) (Make u and duexplicit.)
3
Z
1
= (u)7 du (Do the substitution.)
3
1
= (u)8 + C (Find the integral in terms of u.)
3∗8
1
= (3x + 5)8 + C (Substitute back.).
24
□
This is easy to generalize for a power of a linear term.
Example 7.4.5 Power
R of generic linear example redone with change
of variables. Find (ax + b)n dx.
Solution. The obvious candidate for u is ax + b. Then du = a dx. Hence
Z Z
1
(ax + b)n dx = (ax + b)n (a dx) (Make u and du explicit.)
a
Z
1
= (u)n du (Do the substitution.)
a
1
= (u)n+1 + C (Find the integral in terms of u.)
a ∗ (n + 1)
1
= (ax + b)n+1 + C (Substitute back.).
a ∗ (n + 1)
□
To use this method with u replacing something more complicated than
a linear term, we need to have du available, with the possible addition of
multiplying by a scalar constant.
Example
R 7.4.6 Power of cubic function with change of variables. Find
(2x3 + 11)7 x2 dx.
Solution. The obvious candidate for u is 2x3 + 11, since it is an expression
taken to a large power. Then du = 6x2 dx. Thus
Z Z
1
(2x3 + 11)7 x2 dx = (2x3 + 11)7 (6x2 dx) (Make u and du explicit.)
6
Z
1
= (u)7 du (Do the substitution.)
6
1
= (u)8 + C (Find the integral in terms of u.)
6∗8
1
= (2x3 + 11)8 + C (Substitute back.).
48
□
By convention, u is often used the new variable used with this change of
variables technique, so the technique is often called u-substitution.
CHAPTER 7. INTEGRATION 341
Answer. A, B, D, E
Exercise Group. Evaluate the following integrals. In each case identify the
term that will be treated as u.
2. Z
(5x + 3)4 dx.
4. Z
(x/5 − 2)2/3 dx.
u5/3
=5 +c
5/3
= 3u5/3 + c
= 3(x/5 − 2)5/3 + c.
5. Z
(143567x + 98736)2578965 dx.
6. Z p
(8x − 3)dx.
1 3/2
= u +c
12
1
= (8x − 3)3/2 + c.
12
7. Z
1
√ dx.
3x + 7
8. Z
100e.06t−5 dt.
10. Z
(2x + 5)(x2 + 5x + 3)5 dx.
u6
= +c
6
CHAPTER 7. INTEGRATION 344
(x2 + 5x + 3)6
= + c.
6
11. Z
50xe−x dx.
2
12. Z
3x2 + 1
dx.
x3 +x+9
Solution. Let u = x3 + x + 9. Then du = (3x2 + 1)dx.
Z Z
3x2 + 1 du
3
dx =
x +x+9 u
= ln |u| + c
= ln |x3 + x + 9| + c.
13. Z p
x x2 − 9dx.
14. Z 3
e3x+1 dx.
0
Solution.
CHAPTER 7. INTEGRATION 346
2
(a) Let u = − t4 . Then du = − 2t dt.
Z 10 Z −25
−t2 /4
Sales = 1000te dt = −2000eu du
0 0
−25
= −2000eu )|0
= 2000((1 − e−25 ) ≈ 2000.
(b)
10 = 1000te−t
2
/4
t ≈ 5.0028.
Note that the response tells us the question the Wolfram|Alpha is answering.
That helps us check that we have been properly understood. We may find it
useful to give a formula without the extra words.
The interface is fairly robust. It understands the convention that the vari-
able for math problems is typically x, so it will generally guess that x is our
variable if we don’t specify the variable with respect to which we are integrat-
ing.
Following that link gives more information on the syntax of the Mathemat-
ica command. We generally don’t need to know the syntax, but it is useful if
we want to use specific options.
The output also has a link for showing steps on complicated problems.
CHAPTER 7. INTEGRATION 349
The show steps link only works on the paid version of Alpha. However we
can find other tools by searching for integral calculator. Such a search reveals
Symbolab, https://www.symbolab.com/solver/definite-integral-calculator, which
we also used in Chapter 4.
scope of this course. Consider for example if we want to find the area under a
portion of a curve that has the shape of a normal curve.
If you are going to use Wolfram|Alpha in doing work, you should realize that
the terms of use of the site require you to appropriately cite Wolfram|Alpha.
(This is standard academic procedure.) Your citation should include that date
that you got your answer from the site. The results above were obtained on
Feb 29, 2012.
In business situations, we are rarely asked to simply find an integral. In-
stead, finding an integral is generally part of a larger problem. Thus we often
use CAS for part of a problem.
3 2
Thus we know P (q) = 1q3 + 5q2 + 50q + C for some constant C. We also
know P (5) = 0.
3 2
53 5∗52
2 + 50 ∗ 5 + C, or − − C = 3 + 2 + 50 ∗ 5.
Thus, 0 = P (5) = 53 + 5∗5
Using Excel, we now plug the function, without the C, into Excel and
evaluate at q = 5.
We make C the negative of our answer and modify our function accordingly.
We now use solver to maximize the function.
What we really want is the Riemann sum with one interval per day. Over
10 years we have 3652 days.
If we assume payments start at the beginning of the first day, we would use
the left endpoint method. □
A In initial value problems, we have to solve for the value of the inte-
gration constant C.
B The computer algebra systems used in this section cannot do Rie-
mann sums.
C The section uses Wolfram|Alpha as a computer algebra system that
will do integration.
CHAPTER 7. INTEGRATION 355
Solution. Z
1 2
x ln(x)dx = x (2 ln(x) − 1) + c.
4
2.
f (t) = e.07t (−t2 + 3t + 5).
3.
f (t) = t2 e( − 0.06t).
Solution.
Z
t2 e−0.06t dt = e−0.06t (−9259.26 − 555.556t − 16.6667t2 ) + c.
4.
f (x) = ln(x).
5.
f (t) = (t + 1)e−0.06t .
Solution.
Z
(t + 1)e−0.06t dt = e( − 0.06t)(−294.444 − 16.6667t) + c.
6.
1
f (x) = .
(1 + 2x)(3 + x)(5 + 6x)
7.
1
f (x) = √ .
1 + x2
Solution. Z
1
√ dx = sinh−1 (x) + c.
1 + x2
8.
1
f (x) = .
(3 + 2x)2
9.
5
f (x) = .
9 + x2
CHAPTER 7. INTEGRATION 356
Solution. Z x
5 5
dx = tan−1 + c.
9 + x2 3 3
10.
1
f (x) = .
(5x + 4)2 (7x + 9)
Solution. Z 10
t2 e−0.06t dt ≈ 214.03.
0
12. Z 10
dt
.
1 t
13. Z 8
(x − 1)(x − 8)dx.
1
Solution. Z 8
(x − 1)(x − 8)dx ≈ −57.167.
1
14. Z 10
t2 e.05(10−t) dt.
0
15. Z 2
e−x dx.
2
Solution. Z 2
e−x dx ≈ 0.882081.
2
0
16. Z 16
1
√ e−(x−10) dx.
2
9 2π
Solution.
1
P (q) = (−2q 3 + 9q 2 + 30q − 87).
6
18.
F ′ (t) = t2 e−0.1t and F (10) = 2. Find F (t).
19. p
P ′ (q) = q 2 + 5q + 7 and P (0) = 7. Find P (q).
Solution.
√ p
P (q) = (56 − 50 157 + (4q + 10) 7 + 5q + q 2
CHAPTER 7. INTEGRATION 357
25 5 + 2q
− 3 sinh−1 √ + 3 sinh−1 √ )/8.
3 3
20.
P ′ (q) = −(q 2 + 2q + 3)2 and P (10) = −7. Find P (q).
21. I have an investment that produces income at a rate of P (t) = 5000+100t.
I assume the present value of an asset decreases continuously at a rate of
2% per year for the length of time I have to wait for the asset. What is
the present value of the first 7 years of return from my investment?
Solution. Z 7
(5000 + 100t)(.98)t dt ≈ 34868.6.
0
22. My oil well is producing revenue at a rate of P (t) = 5000(0.09t ). I assume
the present value of an asset decreases continuously at a rate of 3% per
year for the length of time I have to wait for the asset. What is the present
value of the first 10 years of return from my investment?
23. The rate of marginal profit is M P (q) = 100 − 12 ln(q) and a break-even
point occurs at q = 100. Find the quantity that produces the most profit
and the amount of profit generated at that point.
Solution. We have maximal profit when M P (q) = 0, or when q = e8 =
2981. Using WolframAlpha to solve the initial value problem we get
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/
Section-7-6-Examples.xlsx
CHAPTER 7. INTEGRATION 358
where σ (sigma), and µ (mu), are respectively the standard deviation and mean
of the distribution. For this course the mean is the center of the distribution
and the standard deviation is a measure of how tightly packed the distribution
is. If we set the mean to 0 and the standard deviation to 1 we have the
standardized normal distribution, or the familiar bell curve.
Thus, when I note that the adult men in the United States have a height
distribution that is normal with a mean of 70 inches and a standard deviation
of 3 inches, the distribution is
1 −(x − 70)2
f (x) = √ exp .
3 2π 2 ∗ 32
Thus finding the percentage of men less than 5 feet tall, reduces to evalu-
ating the appropriate integral. Since finding the percentage of the population
that fits in our market reduces to finding the area under a specified portion of
this curve, we are also interested in the anti-derivative of the distribution.
Definition 7.6.2 Given a probability density function, f (x), the related Cu-
mulative Distribution Function, CDFf(x), is a function that measures how
much area is over the interval (−∞, x].
In calculus
Rx terms, CDFf(x), the Cumulative Distribution Function of
f (x), is −∞ f (t)dt. ♢
You will notice the techniques we have for anti-differentiation will not work
with the normal distribution. In fact, the normal distribution has no closed
form anti-derivative using the functions we are familiar with. Thus we need to
use numeric methods.
CHAPTER 7. INTEGRATION 359
7.6.2 Examples
Example 7.6.3 Tall men in an area.
Standalone
becomes
100000*integrate(exp(-(x-70)^2/(2*3^2))/(3*sqrt(2*pi))) from 72 to 84.
□
Example 7.6.5 Finding short women.
CHAPTER 7. INTEGRATION 362
Standalone
We notice that since we are finding the area under the standardized nor-
mal distribution from 0 to a negative number, we get a negative area.
Our potential market is composed of 3,645 women.
• Using Excel Statistics Commands.
When using the statistics commands, the area function is zero at
−∞. Thus we simply have to evaluate NORM.S.DIST(right hand limit,
cumulative).
normal procedure is to divide the population at the middle between the sizes.
Example 7.6.7 Women’s shoes.
Standalone
Solution.
( )
Z 9.25 −(x−9)2
1
(a) pairs size 9 = 10000 √ e 2∗1.52
dx
8.75 1.5 2π
( )
Z 9.25 −(x−9)2
1
(b) 10000 √ e 2∗1.52
dx = 1062.
8.75 1.5 2π
(c) If we only have full sizes the limits of integration go from 8.5 to 9.5.
I then need 2108 pairs of size 9.
2. Men’s shoes in Europe are made if full sizes with a different measuring
system than we use in the United States. They are normally distributed
with a mean of 43 and a standard deviation of 2/3. I plan to buy 1,000
pairs of shoes for my store.
3. Assume that women’s dress sizes are normally distributed with a mean of
14 and a standard deviation of 3. For a particular style, 5000 dresses will
be made, and they are available in even integer sizes. (2, 4,…).
Solution.
( )
Z 11 −(x−14)2
1
(a) size 10 dresses = 5000 √ e 2∗32
dx
9 3 2π
( )
Z 7 −(x−14)2
1
(b) 5000 √ e 2∗32
dx = 43
5 3 2π
( )
Z 11 −(x−14) 2
1
(c) 5000 √ e 2∗32
dx = 555
9 3 2π
4. Assume that men’s suit coat sizes are normally distributed with a mean
of 44 and a standard deviation of 4. For a particular style, 2000 suit coats
will be made, and they are available in even integer sizes. (2, 4 …).
(a) Express, as an integral, the percentage of soldiers for who will fit
the standard sized caps.
(b) Cap sizes come in quarter sizes with a full size corresponding to a
change in headband size of 3 inches, with a size 8 corresponding to
25 inches. Out of 1,000 soldiers, how many need a size 8 cap?
Solution.
( )
Z 25 −(x−22.1)2
1
(a) pecentage fit = 100 √ e 2∗0.852
dx = 99.29
20 0.85 2π
( )
Z 25.375
−(x−22.1) 2
1
√ e 2∗0.85
2
(b) size 8 caps = 1000 dx = 1.42
24.625 0.85 2π
6. A study of the size of male soldiers found the hip breadths were normally
distributed with a mean of 13.45 inches and a standard deviation of 0.64
inches. Seats on one airline measure 17 inches between the armrests. Ex-
press, as an integral, the percentage of soldiers who hips are too wide for
the seats.
7. Assume that women’s shoe sizes are normally distributed with a mean of
8 and a standard deviation of 1.5. A particular style of shoes is available
CHAPTER 7. INTEGRATION 366
in full and half sizes. I plan to make 1,000 pairs of this style. Using the
Excel statistics commands, make a chart telling me many pairs I should
make of each size.
Solution. Since the shoes come in half sizes, we want the area under
the normal distribution function from 0.25 before the given size to 0.25
after the given size.
The desired syntax is
Population size * (NORM.DIST(Size+0.25, Mean, Standard Deviation, TRUE) - NORM.DIST(Size
8. Assume that men’s suit coat sizes are normally distributed with a mean
of 44 and a standard deviation of 4. For a particular style, 2,000 suit
coats will be made, and they are available in even integer sizes. (2, 4, …).
Using the Excel statistics commands, make a chart telling me many suits
I should make of each size.
9. Assume that results on an intelligence test are normally distributed with
a mean of 100 and a standard deviation of 15. Using the Excel statistics
commands, make a chart distributing 1,000,000 people between intervals
of size 10 (90-100, 100-110, etc.). What is the highest IQ score I should
expect to find in my population of 1 million?
Solution. We set the ranges with a high value and a low value.
The desired syntax is
With a million people, the high IQ should be between 170 and 180.
10. I have been informed that the distance from the back of a chair to the
front of the knee of a man sitting is normally distributed with a mean of
24 inches and a standard deviation of 1.3 inches. I want to design airline
chairs to fit 99% of the male passengers with 1 inch between the knee and
the back of the next chair. How much distance do I need between the
front of one chair seat and the back of the next?
11. I have been informed that the breadth at the shoulders of an adult male is
normally distributed with a mean of 17.9 inches and a standard deviation
of 1 inch. The standard coach seat on a plane is 17.2 inches wide. What
percentage of adult males fit in such a seat without overflow?
( )
R 17.2 −(x−17.9)2
2∗12
Solution. pecentage fit = 100 √1 e dx = 24.196
0 1 2π
12. The techniques used in this section can easily be adapted to other distri-
butions. For example, the mean time to failure of a brand of hard drives,
measured in units of 10,000 hours, has been found to follow a Weibull
distribution with shape variable 3 and scale variable 5. The probability
density function of failure is
(b) We offer an extended warrantee that replaces the hard drive if it fails
in under 30,000 hours of use. What percentage of users who buy the
extended warranty will have their hard drive fail in the period of
time between the expiration of the original warrantee and the end
of the extended warranty?
(c) Some credit cards double the manufacturer’s warranty. What per-
centage of the people who use this plan will have their hard drive
replaced by the credit card company?
(d) What percentage of customers see their hard drives last for 100,000
hours of use?
13. Project — Pick a product and find evidence on the kind of function that
describes its failure rate. Based on that data, determine how long we
expect it to take until 10% , 50% , and 90% of the products fail.
Section-7-7-Examples.xlsx
CHAPTER 7. INTEGRATION 369
□
Example 7.7.2 Accumulating marginal cost.
MarginalCost(Quantity) = 50 + Quantity/1000.
□
Example 7.7.3 Oil production. An oil well in Texas initially produces oil
at a rate of 2 million barrels of oil per year. The production rate will typically
fall 15% per year. How much oil is produced over a 5-year period?
Solution. We want to integrate our production rate of 2(0.85)t as t goes from
0 to 5. We can use our antidifferentiation formulas for this problem.
Z 5 5
2(0.85)t 2
t
2(0.85) dt = = (0.855 − 1) = 6.846.
0 ln(0.85) 0 ln(0.85)
Over 5 years, the well will produce 6.846 million barrels of oil.
CHAPTER 7. INTEGRATION 370
□
Example 7.7.4 Discounted revenue stream. Your company is interested
in acquiring a revenue stream that is currently producing are a rate of 50 + 5t
thousand dollars per year, where t is measured in years. To obtain current
value, you are discounting at a rate of 6% per year compounded continuously.
What is the current value of the first 10 years of income from the stream?
Solution. To find the total income we would want to integrate (50 + 5t) as
t goes from 0 to 10. To find the current value we must discount the income
based in when we receive it. Thus we want to integrate (50 + 5t)e−0.06t as t
R 10
goes from 0 to 10. We set up the integral 0 (50 + 5t)e−0.06t dt. Since we do
not know how to find the anti-derivative for this function, we find the area
either with Excel and Riemann sums, or with Wolfram Alpha.
With either method, we find that the present value of the revenue stream
to be $545,298.
or
Principal′ (time)
= .05.
Principal(time)
Integrating both sides with respect to time, we get
Principal(time) = 20000e.05∗time .
7.7.3 Depreciation
When computing costs of a business, we need to evaluate the depreciation cost
of capital equipment. There are a number of reasonable ways of computing
depreciation.
• Straight-line depreciation.
Assumes that a piece of equipment loses the same amount of value each
year until it is worthless.
V ′ (t) = −k(EL − t)
Solution. The easiest way to do this problem is not to use calculus, but to
realize we want the equation of a line and we have two points.
Taking slope as rise over run, the slope is −3, 600 and the intercept is 18,000.
Thus our equation is
Value(time) = −k ∗ time + C.
□
Example 7.7.7 Sum of years method. After buying the same car from the
example above, we assume that the depreciation is proportional to the amount
of useful life that the equipment has left. (A car loses more value in its first
year than in its last year of life.) Produce an equation for the book value of
the same $18,000 car with this method.
Solution. We start with the observation that we are given that V ′ (t) =
−k(EL−t) for some constant k, and we know that V (0) = 18, 000 and V (5) = 0.
With an expected lifetime of 5, integrating the first equation gives
Value(time) = −k ∗ 5 ∗ t + k ∗ t2 /2 + C.
Thus the sum of years method gives a value function which is quadratic.
Once again, we plug in known points to find the constants. We plug in for time
= 0 to see C = 18, 000. We plug in for time = 5 and get
The book value at 3.5 years is $1,620 with this method of depreciation.
□
Example 7.7.8 Declining Balance depreciation. This method of depreci-
ation says an item loses value in proportion to its current value. The standard
method uses a rate that is twice the rate of straight-line depreciation until
we reach scrap value, when depreciation stops. Use this method to find the
book value of our $100,000 piece of equipment at 3.5 years if the scrap value
is $10,000 and the useful life is 5 years.
Solution. In Example 7.7.5 we saw that proportional growth or decay give
an exponential function. The basic value function is
□
CHAPTER 7. INTEGRATION 374
q q2
MarginalProfit(q + 1) = 200 − − .
1000 100, 000, 000
Find the change in profit in going from producing 70,000 units to produc-
ing 90,000 units.
CHAPTER 7. INTEGRATION 375
Find the estimated total sales over the first 100 days.
Solution. We expect sales of about 25000 units.
t2
Daily Sales(t) = 100 + 10t − .
100
Find the estimated total sales over the first 200 days.
5. The production from an oil well starts at a rate of 10,000 barrels per
year and declines exponentially at a rate of 10% per year. How much is
produced in 6 years?
Solution. We expect 44,472 barrels of oil over the 6 years.
6. An oil well is producing 15,000 barrels per year. The rate of production is
continuously declining at a rate of 10% per year. The well will be capped
as unproductive when it produces 3,000 barrels per year. How much will
it produce before being capped?
7. A stream of revenue produces at a rate of $40,000 per year. We assume
that the risk free investment rate is 3% per year. What is the current
value of the revenue stream over 20 years?
Solution. We evaluate the revenue stram to be worth $603,982.
CHAPTER 7. INTEGRATION 376
However, in that model, there were people who were willing to sell for less
than the equilibrium price and people who were willing to buy for more than
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/
Section-7-8-Examples.xlsx
CHAPTER 7. INTEGRATION 377
the equilibrium price. These people got an exceptionally good deal in the
transaction. We would like to measure that benefit, since we can think of it
as the extra profit the suppliers and buyers make on the transaction. We note
that each side will have an incentive to maximize that benefit.
Focus first on the consumer side. The area under the demand function,
from 0 to the quantity sold, measures the consumers’ willingness to spend.
The area in the rectangle with that same base and height equal to the sale
price measures the actual consumer expenditure. The difference between the
two is a quantity we will call consumer surplus.
In calculus terms:
Z qs
Willingness To Spend = demand function(q) dq
0
Z qs
consumer expenditure = ps dq
0
Z qs
consumer surplus = (demand function(q) − ps ) dq
0
As long as the price stays on the demand function curve, a lower price
means a greater quantity sold, and a greater consumer surplus.
In a similar manner, we can focus on the producer side. The area under
the supply function, from 0 to the quantity sold, measures the producers’ need
for revenue. The area in the rectangle with that same base and height equal to
the sale price measures the actual producer revenue. The difference between
the two is a quantity we will call producer surplus.
In calculus terms:
CHAPTER 7. INTEGRATION 378
Z qs
Needed revenue = supply function(q) dq
0
Z qs
producer revenue = ps dq
0
Z qs
producer surplus = (ps − supply function(q)) dq
0
As long as the price stays on the supply function curve, a higher price
means a greater quantity sold, and a greater producer surplus. Consider first
an example where the supply and demand functions are simple enough that
the computations can all be done by hand.
Example 7.8.1 Producer surplus with linear functions. I am trying to
sell widgets and have determined the supply and demand functions to be:
Find the equilibrium price and quantity. Find the producer and consumer
surpluses when the shirts are sold at the equilibrium price. If the producers
form a cartel, find the price that maximizes producer surplus.
Solution. By setting supply price and demand price equal to each other we
find an equilibrium quantity of 34 and an equilibrium price of 38. The formulas
for the consumer and producer surpluses become:
Z 34
consumer surplus = ((106 − 2q) − 38) dq
0
Z 34
producer surplus = (38 − (4 + q)) dq
0
To evaluate the integrals we can notice that each is a triangle of base 34.
One has height of 34 and the other has a height of 68. Using geometry, the
consumer surplus is $1,156 and the producer surplus is $578.
To find the maximum producer surplus, we need to turn the endpoint into
a variable. If the producers act as a cartel,
Z x Z x
producer surplus = ((106 − 2x) − (4 + q)) dq = (102 − 2x − q) dq
0 0
2
x
q x2 5x2
= (102 − 2x)q − = ((102 − 2x)x − = 102x −
2 0 2 2
We can find the maximum of this by taking its derivative and setting it
equal to 0. The maximum occurs when x = 102 5 = 20.4. At that point the
producer surplus is $1,040.40. □
We now try an example where we need other techniques to evaluate the
integrals.
Example 7.8.2 Producer surplus with numeric integration. A store
trying to sell t-shirts on campus has determined the supply and demand func-
CHAPTER 7. INTEGRATION 379
tions to be:
We then substitute these values into the equations for consumer and pro-
ducer surplus.
Z qs
consumer surplus = (demand function(q) − ps ) dq
0
Z 222
consumer surplus = ((10 + 100/(Quantity + 2)) − 10.45) dq
Z0 qs
producer surplus = (ps − supply function(q)) dq
0
Z 222
producer surplus = (10.45 − (5 + ln(Quantity + 10))) dq.
0
□
The sum of the consumer surplus and the producer surplus is referred to as
the total social gain. As we looked at consumers’ surplus, we assumed that
the sales were determined by supply and the price-quantity point was on the
supply curve. Similarly, when looking at producers’ surplus we assume price is
set by demand and the price-quantity point was on the demand curve. If both
sides are made up of many individuals acting independently, the price-quantity
point is the equilibrium point, which is on both curves. Selling at that point
also maximizes the total social gain.
CHAPTER 7. INTEGRATION 380
As we can see from the picture, this always lowers the total social gain.
However for some reduction of quantity the producers’ surplus is increased. In
the equation for producer surplus the price ps is demand function(qs ) rather
than supply function(qs ). If the quantity goes down too far the producer sur-
plus will also go down.
Example 7.8.3 Computing loss of social gain. A store trying to sell
t-shirts on campus has determined the supply and demand functions to be:
If we only want to sell 200 shirts, we can raise the price to from $10.45 to
$10.50. The producer surplus rises from $191 to $199. However the consumer
surplus falls from $372 to $362.
If we only want to sell 50 shirts, we can raise the price from$10.45 to $11.92.
The producer surplus falls from $191 to $174. The consumer surplus falls from
$372 to $230.
We can use solver to maximize the Producer surplus by varying the quantity.
A quantity of 140 maximizes the producer surplus at $210, but is doing that
the total social gain is down to $537 from $563.
□
Similarly, if the consumers form a cartel, they can artificially reduce the
demand. Since they will then pay the supply price the total social gain will
be decreased, but the consumers’ surplus may be increased. In this case the
consumer surplus is the integral of the difference between the demand function
and the supply price of the quantity that will be sold.
CHAPTER 7. INTEGRATION 382
In the example we just looked at, both the supply and demand curves
have a small slope, so the market is quite elastic from both the producers and
consumers point of view. Is such a case there is less incentive to form a cartel.
In other markets, like gas and oil, where the market is more inelastic, there is
more incentive to engage in monopolistic practices.
Computationally,
R1 Z
(x − L(x))dx 1
G= 0
R1 =2 (x − L(x))dx.
0
xdx 0
Thus the bottom 50% of the population earns 20.% of the total income. To
compute the Gini index, we compute:
Z 1
G=2 (x − 0.8x3 − 0.2x)dx = (2)(0.4x2 − 0.2x4 )|10 = .4.
0
So the Gini index in this hypothetical country is 40. To put this number
in context, the reported Gini index for the United States in 2009 was 46.8. □
In practice, the Gini index is an application where a numeric approximation
of an integral is the method most likely to be used. We are unlikely to get a
formula for income distribution. Instead we are likely to find data points. Since
there is no good model for how the income will be distributed, we can simply
connect the points with line segments and find the area using the area formula
for a trapezoid.
Example 7.8.5 Gini index with a chart for income distribution. We
have the following data from the census bureau on income distribution in the
US in 2008. Compute the Gini index.
A This section explained how to use calculus to predict the future value
of the stock market.
B If we can set up the integral of an application, we can use CAS to
evaluate the integral.
C We can accumulate marginal cost over time to find change in cost.
Exercise Group. For the following exercises, assume we have a free market
and that goods are sold at market equilibrium. Find the consumer surplus,
producer surplus, and total social gain.
1. SupplyPrice(q) = 50 + q/2 and DemandPrice(q) = 150 − q/5.
CHAPTER 7. INTEGRATION 385
Z
1000/7
x 850
ProducerSurplus = − 50 + dx = 5102.04
0 2 7
Z 1000/7
x 850
ConsumerSurplus = 150 − − dx = 2040.82
0 5 7
TotalSocialGain = ProducerSurplus + ConsumerSurplus = 7142.86.
2. SupplyPrice(q) = ln(q + 10) and DemandPrice(q) = 100 − q.
3. SupplyPrice(q) = 50(1 − (0.99)q ) and DemandPrice(q) = 100(0.99)q .
Solution. The two curves intersect at the point of market equilib-
rium, (109.31, 33.33).
Z 109.31
ProducerSurplus = (33.33) − (50(1 − (0.99)q )) dx = 1494.79
0
Z 109.31
ConsumerSurplus = (100(0.99)q ) − 33.33) dx = 2989.58
0
TotalSocialGain = ProducerSurplus + ConsumerSurplus = 4484.37.
4. SupplyPrice(q) = 50(1 − (0.95)q/10 and DemandPrice(q) =
150(0.95)q/10 .
5. (
5 q ≤ 10
SupplyPrice(q) =
q 2 /20 q > 10
and (
100 q ≤ 10
DemandPrice(q) = .
110 − q q > 10
Z 37.958
ProducerSurplus = (72.042)−(SupplyPrice(q)) dx = 1789.732.
0
The integral needs to be done in two parts with the break at 10.
Z 37.958
ConsumerSurplus = DemandPrice(q) − 72.042 dx = 670.405.
0
(a) Find the consumer surplus, producer surplus, and total social gain
at market equilibrium.
CHAPTER 7. INTEGRATION 386
(b) If the producers can form a cartel and restrict the available quantity
to 50, selling at the supply price for 50, what are the consumer
surplus, producer surplus, and total social gain?
(c) Find the price where a producer cartel will maximize the producer
surplus. Find the producer surplus at that price.
Solution.
(a) The two curve intersect at the point of market equilibrium, (70, 100).
Z 70
ProducerSurplus = (100) − (30 + q) dx = 2450
0
Z 70
ConsumerSurplus = (170 − q) − 100 dx = 2450
0
TotalSocialGain = ProducerSurplus + ConsumerSurplus = 4900.
(b)
DemandPrice(50) = 120
Z 50
ProducerSurplus = (120) − (30 + q) dx = 3250
0
Z 50
ConsumerSurplus = (170 − q) − 120 dx = 1250
0
TotalSocialGain = ProducerSurplus + ConsumerSurplus = 4500.
(a) Find the consumer surplus, producer surplus, and total social gain
at market equilibrium.
(b) If the producers can form a cartel and restrict the available quantity
to 400, selling at the supply price for 400, what are the consumer
surplus, producer surplus, and total social gain?
(c) Find the price where a producer cartel will maximize the producer
surplus. Find the producer surplus at that price.
CHAPTER 7. INTEGRATION 387
(a) Find the consumer surplus, producer surplus, and total social gain
at market equilibrium.
(b) If the producers can form a cartel and restrict the available quantity
to 5, selling at the demand price for 5 (for a price of 185), what are
the consumer surplus, producer surplus, and total social gain?
(c) Find the price where a producer cartel will maximize the producer
surplus. Find the producer surplus at that price.
Solution.
(a) The two curve intersect at the point of market equilibrium, (10, 110).
Z 10
2000
ProducerSurplus = (110) − (10 + q 2 ) dx =
0 3
Z 10
2000
ConsumerSurplus = (210 − q 2 ) − 110 dx =
0 3
4000
TotalSocialGain = ProducerSurplus + ConsumerSurplus = .
3
(b)
DemandPrice(5) = 185
Z 5
2500
ProducerSurplus = (185) − (10 + q 2 ) dx =
0 3
Z 5
250
ConsumerSurplus = (210 − q 2 ) dx =
0 3
2750
TotalSocialGain = ProducerSurplus + ConsumerSurplus = .
3
11. Consider the Lorenz curve L(x) = .03x + 0.7x4 . Find the Gini index.
Solution.
R1 Z
100 (x − (0.3x + 0.7x4 ))dx 1
G= 0
= 200 (−0.7x + 0.7x4 )dx = 42
.5 0
12. You research a country and find the following information on income share:
Population %tile 20 40 60 80
Income %tile 5 15 30 50
Population %tile 20 40 60 80 90 95 99
Income %tile 5 15 30 50 65 75 90
2 http://www.census.gov/hhes/www/income/data/historical/inequality/index.
html
3 http://www.wealthandwant.com/issues/income/income_distribution.html
Appendix A
389
APPENDIX A. SPREADSHEET SKILLS INTRODUCED IN CHAPTER 1390
we are moving a formula from cell A1 to cell B3. (We are going one column
over and two rows down.) A relative reference changes with the formula
location. =F5 becomes =G7. An absolute reference stays the same and has
dollar signs, $, to fix an index. For the same move, =$F$5 stays =$F$5.
We can also fix either the rows or columns by using dollar signs, $. Mov-
ing from cell A1 to cell B3, the formula =F$5 becomes =G$5 and =$F5
becomes =$F7
See an explanation at Relative and Absolute reference discussion 1.3.2
and a video at Relative and Absolute reference video. 1.3.3
• We can name a cell with a name that describes its contents. 1.3.3 The
name is put in the box in the upper right corned of the worksheet 1.3.4.
This makes The formulas in the cells easier to read and understand 1.3.5.
• Use a secondary axis. If the scales of the graphs are noticably differnt
we want to use a secondary axis for one of the graphs. For example is
we are graphung f (x) = x2 and g(x) = x5 for the interval [−10, 10], the
scale of g(x) is so large that we cannot see what happens fith f (x). To
use a secondary axis, double click a point and then select secondary axis
from the axes tab. An image of two functions and secondary axes. 1.4.9
• Formatting a chart. 1.4.5 Excel gives you the ability to format your
chart. Clciking on a chart brings up the ”Chart Design” tab. There are
menus for ”Add Chart Element”, ”Quick Layout”, and ”Change Chart
Type”.
• Graph functions with parameters in the definition. We can add
parameters to the table we are creating to either look at a variety of
curves or to change the domain of the graph. Parameters and values
that will be used throguhout the table are written as absolute references.
A screencast of producing a graph with parameters. 1.4.4 An image of
the table with selections made. 1.4.5
APPENDIX A. SPREADSHEET SKILLS INTRODUCED IN CHAPTER 1391
◦ Goal Seek thinks two values are equal when they are within 0.001
of each other. It will produce an answer to x14 = 0.
◦ Goal seek works best when given a starting point close to an actual
solution. On a function with several solutions, different starting
points lead to different solutions.
◦ Goal seek is confused by corners and discontinuities.
• Naming a Cell
• Graph multiple functions (Given the differences for graphing a single
function.)
• Graph functions with parameters in the definition.
The only new spreadsheet skill introduced in Chapter 2 is the use of nonlinear
functions.
Spreadsheets let you use Algebraic functions that you have encountered in
previous courses 2.3.1. There are a few details to keep in mind:
• Transactions often have different rules for different sizes. (Overtime hours
pay at a different rate than regualr hours.) IF lets you have a formula
with cases..
For all these functions Excel and Sheets operate the same.
394
Appendix C
395
APPENDIX C. SPREADSHEET SKILLS INTRODUCED IN CHAPTER 3396
As with Goal Seek, we can have Excel find the input value that makes a
function have a desired output value. The setup of Solver 3.5.4 is a bit different
thant the setup of Goal Seek 1.6.2. The function to be set is the ”objective
function”. The objective functions can depend on more than one cells. By
default, it assumes variables should have non-negative values.
While Goal Seek only let you find where a function reached a specified value,
Solver also lets you search for a local maximum 3.5.5 or a local minimum 3.5.7.
There is a screencast of basic solver functionality 3.5.2. As with Goal Seek,
Solver’s algorithm can be thought of as rolling downhill to the hearest answer.
It can be confused if the function has discontinuities or bends too frequently.
Solver allows you to add constraints to the problem 3.5.6. It should be
noted, that by default Solver will assume unconstrained variables are nonneg-
ative.
398
APPENDIX D. SPREADSHEET SKILLS INTRODUCED IN CHAPTER 6399
400