Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Download as pdf or txt
Download as pdf or txt
You are on page 1of 412

Business Calculus with Excel

Business Calculus with Excel


Mike May, S.J.
Saint Louis University

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

• The student has easy access to a spreadsheet and the internet.


• This is probably the last math class the student will take.
• The student is either majoring in business, or will use mathematics in a
business setting.

This text tries to follow the recommendations of the CRAFTY reports.


The MAA curriculum guide (2004) notes that many of our current math
courses were designed in the last century in response to the needs of physics
and engineering. One might caricaturize a standard textbook for business cal-
culus, often called brief calculus as a watered down version of a three-semester
course in calculus that was designed for physics or math majors. Since it is
trying to cover more topics in less time, the main emphasis is skill in symbolic
manipulation. The standard text for a one semester survey of calculus is also
used for both business and the life sciences. To allow for broad marketing the
text is technology agnostic, follows the arrangement of a course for majors, and
uses the notational conventions of mathematics.
In contrast, following the Curriculum Reform Project recommendations, a
course for business calculus should:
• Use spreadsheets as the primary computational engine.
• Have greater emphasis on constructing mathematical models from data.
• Increase the emphasis on numerical methods rather than symbolic ma-
nipulation.
• Whenever possible use the terminology and notational conventions of the
business world.
• Consistently use examples that the students will recognize as relevant to
the courses in their major.

Following the CRAFTY guidelines lead to a number of subtle but pervasive


shifts in a calculus text.

v
vi

• Teaching the technology in a way that makes it portable: Experience


showed, as expected, that the students would have to be taught to use
Excel. Since the intent was to have the students see the material as
usable outside of class, the text does not use any macros or instructor
provided tools. Students are also expected to use “Good Excel Style”
and make worksheets readable with sufficient documentation.
• Use of business terminology and conventions: Economics examples tradi-
tionally use p and q axes with q as the independent variable. In business
disciplines a marginal function is not a derivative, as it is often described
in calculus texts, but a difference quotient with denominator 1.
• Use of business examples: The standard textbook example for related
rates is that of a person on a ladder that is sliding down a wall. One
student commented that he learned to never stand on an unsecured lad-
der. In contrast our text uses the Cobb-Douglas equation and rate of
change of revenue with respect to cost to illustrate related rates, given
that both are functions of quantity. Other examples in the text include
the standard supply and demand problems, marginal cost, revenue and
profit problems, and present and future value of an investment.
• Change of order of topics: Checking with business faculty we have found
that partial derivatives are considered more important than integrals. We
reorder the sequence of topics to do multivariable functions and partial
derivatives before integration.
• Numerical techniques: With a spreadsheet, approximations of the deriva-
tive using the symmetric difference and Riemann sums for integration are
reasonable tasks that work effectively for a wide variety of functions. The
numerical examples shift from simply being theoretical underpinnings to
being a practical approach. With the use of numerical techniques pre-
sented first, the main examples are introduced before the student has
learned symbolic techniques.
• Use of CAS: Finding the current value of a revenue stream is an applica-
tion of integration at the end of the course. The students know enough to
set up the problem, but only have the integration techniques for solving
symbolically if the stream is constant or exponential. Using simple CAS
allows the focus to remain on a conceptual understanding of the problem.
• An increased emphasis on real data and modeling: With a spreadsheet
is becomes reasonable to have students collect data from the web and
to find a variety of best fitting curves. In the review of pre-calculus
topics students are asked to decide which model should be expected to
go with the data in a situation and then to find real data and produce
an appropriate best fitting curve.
• Focus on communication and application: As mentioned above, the con-
ventions of school mathematics use a terse style with one letter names
like x, y, f, and g used as variable and function names to aid in symbol
manipulation. If the goal is to produce work that someone else can read
and understand 6 months later more descriptive variable and function
names are used, and having sufficient documentation is considered part
of answering the question.
The initial reaction from students and teachers to the text have been pos-
itive. In particular, many report leaving the course with an understanding of
how the course connects to the rest of their business curriculum
vii

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

This text continues to be a work in progress, with features being added as we


get requests and have time.
Recent improvements.
• Excel worksheets were attached to sections where Excel was used in the
text. This allows students to examine the worksheet and the underlying
code.
• Unworked versions of the Excel worksheets were attached to sections
where Excel was used in the text. This allows the student to follow
along.
• Screencast videos of the Excel problems are being added.

• A significant number of the problems have been converted to WeBWorK.


This allows individualized problems for the students with automatic grad-
ing. A library of problems is available from the author.
• WeBWorK hosting is available through Edfinity and Runestone.

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

Mike May, S.J.


mike.may@slu.edu
St Louis, MO, 2021

ix
Contents

Acknowledgements iv

Preface v

Notes for Instructors viii

Notes for Students ix

1 Functions Graphs and Excel 1


1.1 Linear Functions and models. . . . . . . . . . . . . . 1
1.2 Functions in the Business setting . . . . . . . . . . . . 8
1.3 Introduction to Excel Spreadsheets . . . . . . . . . . . 16
1.4 Graphing functions with Excel . . . . . . . . . . . . . 30
1.5 Using Excel to find best-fit curves . . . . . . . . . . . . 43
1.6 Finding Numerical Solutions with Goal Seek . . . . . . . . 58

2 Business Applications 75
2.1 Market Equilibrium Problems . . . . . . . . . . . . . 75
2.2 Modeling Revenue, Costs, and Profit . . . . . . . . . . . 86
2.3 Nonlinear Functions . . . . . . . . . . . . . . . . . 103

3 Rate of Change and Derivatives 120


3.1 Marginal Functions and Difference Quotients . . . . . . . . 120
3.2 Numeric Derivatives and Limits . . . . . . . . . . . . 133
3.3 Local Linearity. . . . . . . . . . . . . . . . . . . 147
3.4 Optimization . . . . . . . . . . . . . . . . . . . 155
3.5 An Introduction to Solver . . . . . . . . . . . . . . . 169

4 Symbolic Differentiation 182


4.1 Elementary Derivatives . . . . . . . . . . . . . . . . 182
4.2 Derivative Rules for Combinations of Functions . . . . . . . 190
4.3 The Chain Rule . . . . . . . . . . . . . . . . . . 197
4.4 Differentiation Using Computer Algebra . . . . . . . . . 203
4.5 The Second Derivative and Concavity . . . . . . . . . . 214

x
CONTENTS xi

5 Differentiation Techniques and Applications 223


5.1 Implicit Differentiation . . . . . . . . . . . . . . . . 223
5.2 Related Rates . . . . . . . . . . . . . . . . . . . 231
5.3 Elasticity . . . . . . . . . . . . . . . . . . . . . 238

6 Functions of Several Variables 247


6.1 Evaluating and Graphing Functions of Several Variables . . . . 248
6.2 Wire Frames, Partial Derivatives, and Tangent Planes . . . . 261
6.3 Critical Points and Extrema . . . . . . . . . . . . . . 275
6.4 Optimization and Best Fitting Curves . . . . . . . . . . 288

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

A Spreadsheet Skills introduced in chapter 1 389


A.1 From Section 1-3 - Entering and Copying Formulas . . . . . 389
A.2 From Section 1.4 Graphing Functions in a Spreadsheet . . . . 390
A.3 From Section 1.5 Adding and Using Best Fit Curves (Trendlines) 391
A.4 From Section 1.6 Using Goal Seek . . . . . . . . . . . . 391
A.5 Google Sheets Notes for Chapter 1 skills . . . . . . . . . 392

B Spreadsheet Skills Introduced in Chapter 2 394

C Spreadsheet Skills introduced in chapter 3 395


C.1 From Section 3.1- Comparing Functions and Related Marginal
Functions. . . . . . . . . . . . . . . . . . . . . 395
C.2 From Section 3.2- Comparing Functions and Numeric Deriva-
tives . . . . . . . . . . . . . . . . . . . . . . 396
C.3 From Section 3.3- Building Linear Approximations. . . . . . 396
C.4 From Section 3.5 - An introduction to Solver 3.5 . . . . . . 396
C.5 Google Sheets Notes for Chapter 3 Skills . . . . . . . . . 397

D Spreadsheet Skills introduced in chapter 6 398


D.1 From Section 6.1 - Evaluating and graphing functions of several
varaibles . . . . . . . . . . . . . . . . . . . . . 398
D.2 From Section 6.3 - Critical points and extrema . . . . . . . 399
D.3 Google Sheets Notes for Chapter 6 Skills . . . . . . . . . 399
CONTENTS xii

E Spreadsheet Skills introduced in chapter 7 400


Chapter 1

Functions Graphs and Excel

1.1 Linear Functions and models


We will start this chapter with a review of linear functions, which are common
in business. In business there are quite a few examples of linear equations. We
start by reviewing some standard concepts related to lines, including the slope.
Following the conventions of microeconomics, we will often use the variables
q and p, for quantity and price, rather than x and y. We will also follow
the conventions of economics in treating quantity as the independent variable.
(The q-axis will be the horizontal axis. A fast web search for supply and
demand equilibrium will convince you this standard usage.)

1.1.1 Equations of a line


From prior courses, such as college algebra, you will remember that lines can be
written in several different forms. If we are given the slope and the y-intercept,
the slope intercept form will be the equation of choice. If we are given a point
and a slope, it might be faster if we use the point-slope form of a line.

Kinds of Linear Equations.


y = mx + b the slope-intercept form of a line
y − y0 = m(x − x0 ) the point-slope form of a line

In a business setting we are likely to use q instead of x and p instead of y.


With this notation these standard equations of a line become:

p = mq + b the slope-intercept form of a line


p − p0 = m(q − q0 ) the point-slope form of a line

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

Figure 1.1.2 The intersection of a supply and demand curve


The vertical axis shows the price, the horizontal axis shows quantity. Both
supply (S) and demand (D) are linear functions. In this diagram ‘B’ denotes
a surplus of supply, and ‘A’ denotes a surplus of demand. □
Recall, that the slope of a line through the points P0 = (q0 , p0 ) and P1 =
(q1 , p1 ) is given by:

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.

ax + by + c = 0 The general form of a line


y1 −y0 The 2-point form of a line
y − y0 = x1 −x0 (x − x0 )

As above, in the setting of this course we may be using p (price) and q


(quantity) as our variables. This would result in equations that look as follows:

aq + bp + c = 0 The general form of a line


p1 −p0 The 2-point form of a line
p − p0 = q1 −q0 (q − q0 )
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 3

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.

(a) Find the equation of the line.


(b) Find the cost of making 200 widgets.

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.

In this example m = 11 and b = 400, hence the equation of the line is

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.

(a) Find the equation of the line.

(b) How much is she paid if she works 56 hours in a week?


(c) What is she paid for working 30 hours in a week?

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

Pay = variable pay + Fixed pay.

This gives us

Pay = m(hrs − 40) + 500 = 18 ∗ (hrs − 40) + 500.

(b) The pay for working 56 hours is 18(56-40)+500=$788.


(c) The pay for working 30 hours is $500. This is a trick question part
of the problem. From the text of the problem, the linear model only
works for overtime, with a flat rate applying to less than 40 hours per
week. Comment: The function should be written as a piecewise defined
function.
This question is all about the function f defined by
(
500 hrs ≤ 40
Pay =
18 ∗ (hrs − 40) + 500 hrs > 40


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

1.1.2 Reading Check


1. Reading check, Linear Functions and Models.This question checks
your reading comprehension of the material is section 1.1, Linear functions
and models, 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 In this class we will sometimes use q and p instead of x and y.


B y = mx + b is often referred to as the general form of the line.
C y = mx + b is often referred to as the slope-intercept form of the
line.

D The demand function is a line with a positive slope.


E If they are not labeled, there is no way to tell which is the supply
curve and which is the demand curve.
F y − y1 = m(x − x1 ) is often referred to as the point-slope form of
the line.
G The supply curve has a positive slope.
H The slope can be defined as rise over run.
I None of the above

1.1.3 Exercises 1.1 Linear Functions and models


Exercise Group. Given two points in the (q, p) plane and a value q0 :

(a) Find the slope of the line determined by the points.


(b) Give the equation of the line determined by the points.
(c) Give the value of p predicted for q0 by the line.
1. Points (2, 5) and (6, 17), with q0 = 4.
Hint. Find the slope and use the point-slope form
Solution.
change in p 17−5 12
(a) First find the slope: m = change in q = 6−2 = 4 =3

(b) Next we find the equation of the line. There are several ways to
do this and two methods are outlined below.

• Method 1: use the point-slope equation: p−p0 = m(q −q0 ).


We can choose either one of the points, so in this case we
will find the line using the point (q0 , p0 ) = (2, 5). This gives
the equation p − 5 = 3(q − 2).
Rewrite this as p = 3q − 1
• Method 2: use the slope- intercept equation p = mq + b.
Use (q, p) = (2, 5) and m = 3 and solve for b: 5 = 3(2) + b.
And solving for b we have that b = −1, and hence p = 3q−1

(c) Evaluate at the given point. p(4) = 3 ∗ 4 − 1 = 11


CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 6

2. Points (5, 7) and (10, 7), with q0 = 20.


3. Points (20, 10) and (40, 5), with q0 = 12.
Solution. Just as in problem 1 we find the slope and then find the
equation of the line.
change in p
(a) First find the slope: m = change in q = 5−10
40−20 = − 20
5
= − 14

(b) Using p = m(q − q0 ) + p0 with (q0 , p0 ) = (20, 10) and m = − 14 ,


we get p = − 14 (q − 20) + 10. Solving for p we get p = − 14 q + 15.
(c) Evaluate at the given point. p(12) = − 14 (12) + 15 = 12.
4. Points (5, 62) and (115, 783), with q0 = 415.
5. Points (273, 578) and (412, 6), with q0 = 309.
Solution. Just as in problem 1 we find the slope and then find the
equation of the line.
change in p
(a) First find the slope: m = change in q = 578−6
273−412 = − 572
139

(b) Using p = m(q − q0 ) + p0 with (q0 , p0 ) = (412, 6) and m = − 139


572
,
we get p = − 139 (q − 412) + 6. (We can combine the constant
572

terms — the 6 and the − 572


139 ∗ (−412), but leaving the equation
in this form is acceptable.)
(c) Evaluate at the given point. p(309) = − 572
139 (309 − 412) + 6 =
− 139
572
(−103) + 6 = 429 119
139
6. Points (509, 17) and (211, 132), with q0 = 4.

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.

(b) If q0 = 4, then p = 3q − 15 = 3(4) − 15 = −3


(c) The predicted value of p is 0, when 0 = 3q − 15. Solving for
q we get q = 5. [Comment: in part a) we could have used the
point-slope for as well.]
8. A slope of −2, passing through (2, −5), with q0 = 3.
9. A slope of 12.7, passing through (22, 183), with q0 = 46.
Solution.
(a) Using p = m(q − q0 ) + p0 we get p = 12.7(q − 22) + 183.
(b) When q0 = 46, we get that p = 12.7(46 − 22) + 183 = 12.7(24) +
183. And hence p = 487.8.
(c) The predicted value of p is 0, when 0 = 183+12.7(q−22). Solving
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 7

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

(a) Using p = m(q − q0 ) + p0 we get p = 0(q − 12.3) + 9.8 or p = 9.8.


(b) When q0 = 74, we get that p = 9.8. (This is a constant function,
and the output is going to be 9.8 no matter what value of q we
plug in.)

(c) The predicted value of p is never 0, because the predicted value


of p is always 9.8.
12. A slope that is undefined, passing through (6, 3), explaining why part
b would not make sense.

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

(b) To get the p-intercept we set q = 0, so that 3p = 6, and we get


p = 2. To get the q-intercept we set p = 0, so that 2q = 6, and
we get q = 3.
(c) We can pick any two values for q (except 0 and 3 because those
are intercepts), so arbitrarily pick some values: say q = 1 and
q = −1. If q = 1, then 3p + 2 = 6, and hence p = 4/3 so the
point would be (q, p) = (1, 4/3). If q = −1, then 3p − 2 = 6, and
hence p = 8/3 so the point would be (q, p) = (−1, 8/3).
14. 7p − 4q + 14 = 0.
15. y = 5.
Solution.
(a) The slope is 0
(b) The y-intercept is y = 5. There is no x-intercept

(c) No matter what x we choose the y value will always be 5. So


we can pick any two values of x (not 0 to avoid the intercept).
For instance (x, y) = (−20, 5), (x, y) = (−2, 5), (x, y) = (7, 5),
etc are all points on the line.
16. x = 3.
17. y = 4(x − 3) + 9.
Solution.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 8

(a) The slope is 4


(b) To get the y-intercept we set x = 0, so that y = 4(−3) + 9 = −3,
To get the x-intercept we set y = 0, so that 0 = 4(x − 3) + 9.
Solve for x and we get x − 3 = − 49 and x = 3 − 94 = 34
(c) Avoiding the intercepts we can choose x to be any number other
than x = 0 and x = 3/4. We may look for nice values of x
that make the arithmetic come out nice: for example choose
x = 3 and x = 4. When x = 3, y = 9, and we get the point
(x, y) = (3, 9). When x = 4, y = 13, and we get the point
(x, y) = (4, 13).
18. 112p + 257q = 4783.
19. Suppose that the relationship between price and quantity of widgets sold
is linear. When the price is $23, we can sell 4783 widgets. If we raise the
price to $27, we can only sell 4295 widgets. Find the equation of the line.
Solution. The information tells us we have two points: (q, p) =
(4783, 23) and (q, p) = (4295, 27). (Note that in business the quantity
q is usually the input and price p is usually the output.)
Next we need the slope: m = (27 − 23)/(4295 − 4783) = 4/(−488) =
−1/122
Using p − p0 = m(q − q0 ) we get p − 23 = −1/122(q − 4783). We can
rewrite the latter as p = 23 − 1/122(q − 4783).
20. Suppose that the relationship between price and quantity of gizmo kits
we can buy is linear. When the price is $15, we can buy 6000 gizmo kits.
If we lower the price we will pay to $13, we can only buy 4500 kits. Find
the equation of the line.

1.2 Functions in the Business setting


Link to worksheets used in this section1
Not all functions we encounter in a business setting are linear. There are
several other families of functions we should (re-) familiarize ourselves with.
These models include:

• Quadratic functions
• Exponential functions
• Logistic functions

• Normal distribution functions


• Sinusoidal functions

1.2.1 Quadratic Functions


Quadratic functions should be very familiar from previous mathematics
courses. They are of the form y = ax2 + bx + c. These are our standard
parabolas.
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/

Section-1-2-Examples.xlsx
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 9

In business we encounter quadratic equations when we study revenue and


profit functions. Recall from your economics course that:

Revenue = Price ∗Quantity = p ∗ q

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.

Figure 1.2.1 A quadratic function


For a quadratic model we are often very interested in the coordinates of
the vertex, and any possible zeros. For the general equation y = ax2 + bx + c
the sign of the coefficient of x2 , a, will determine if we have a maximum or
a minimum. If a is positive, the parabola opens up and the vertex will be a
minimum. If a is negative, the parabola opens down and the vertex will be a
maximum.
Recall that we can find the zeros of a quadratic by using the quadratic
equation. √
−b ± b2 − 4ac
roots or zeroes = .
2a
From this equation we see that the vertex must be located at x = −b/(2a.).
The discriminant (the term underneath the radical sign determines if there are
0, 1, or 2 roots.

• If b2 − 4ac > 0, then there are 2 roots.

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

Sometimes we may need more general polynomials in a model, with an


equation of the form f (x) = an xn + · · · + a1 x + a0 . In such cases we remember
that the number of turning points of the graph can be no more than n − 1.

1.2.2 Exponential functions


The exponential model, with an equation of the form f (t) = p ∗ et . Some-
times the exponential function et is denoted by exp(t). Excel will use this
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 10

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

It is also useful in determining a fair value today of a promised future


payout. The sign of the rate will determine if the graph turns up or down.
A word of warning - Math books (and Excel) like using a base of e because
it makes the mathematics easier when we do calculus, so the equation is written
as f (t) = p∗ert or f (t) = p∗exp(rt) where r is the instantaneous rate of change.
However, in real world applications we tend to use f (t) = p ∗ Rt , where R is
the effective rate of change. We also use f (t) = p ∗ (1 + r)t . The reader is
warned that in R = er and both R and r are referred to as the rate. You will
have to use the context to tell them apart.
When modeling real world behavior, we often know some special features of
the problem. For instance, we may know that our present value is $2,000 and
that we would like the future value to be $10,000 after 10 years. The question
would be what function would describe such a model? A method commonly
used to solve such a problem is to plug in the values we are given and see
if we can determine what the remaining quantities should be. We know that
F V = P V ∗ (1 + r)t . The extra information tells us PV = 2000, and when t =
10 we know that F V = 2000 ∗ (1 + r)10 = 10, 000. This is enough information
to solve for r. Dividing both sides by 2000 shows that (1 + r)10 = 5.
To solve this equation we need rules of exponents. We obtain 1 + r = 51⁄10 ,
and hence r = 51/10 − 1 = 0.1746. This means that to obtain such a growth
we would need a rate of growth of about 17.46%. The function modeling that
growth would be F V = 2000 ∗ (1.1746)t . In general we can set up equations
and solve for the unknown quantities.

1.2.3 Logistic Functions


The exponential model assumes growth without end. That is impossible in
most business situations. Instead there is typically a point where the market is
saturated. The alternative model says that the rate of change is proportional
both to the current quantity and to the distance from the theoretical maximum
value. This is called logistic growth. A typical formula for logistic growth
given an interest rate r, market saturation point M , and constant a depending
on the problem is
M
f (x) = .
1 + ae−rx
In Excel we would write this function as: f(x)=M/(1+a exp(-r x)). Using
Excel it is fairly easy to create a table and graph a logistic function.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 11

1.2.4 Sinusoidal Functions


The sinusoidal model is for data that repeats on a natural cycle. Typical
examples would include need for heating oil, electricity for air conditioning and
sales for seasonal items such as Christmas. The typical equation is

f (x) = M + A ∗ sin(2π ∗ (x − shift)/period),

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.

1.2.5 Normal Distribution Functions


The normal distribution or bell curve is used because many populations
follow a normal distribution on many scales. The equation
(x−m) 2
f (x) = ae−( s )

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

The normal distribution function has certain interesting features. The


graph shows a maximum value. The maximum occurs when x = m. And
when x = m, we know that
−(m−m) 2
f (x) = ae( s ) = ae0 = a ∗ 1 = a,

hence the maximum value is a.


There are a few more models that will show up from time to time and are
worth mentioning.

1.2.6 Inversely Proportional Functions


If we see the phrase that two quantities are inversely proportional, it means
that f (x) is a constant times 1/x. We might expect to use such a model when
a fixed amount of money will be spent to acquire all of a given product. Thus,
we may see it used to describe price as a function of supply.

1.2.7 Logarithmic Functions


The logarithmic model looks at equations of the form f (x) = a ∗ ln(x) + b
or f (x) = a ∗ ln(Bx). This model shows up in two ways. It can be obtained as
the accumulation of a quantity that is inversely proportional to our variable.
It also shows up as the inverse of the exponential model. (If y is described as
an exponential function of x, then x is a logarithmic function of y.)
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 13

1.2.8 Reading Check


1. Reading check, Functions in the Business Setting.This question
checks your reading comprehension of the material is section 1.2, Func-
tions in the Business Setting, 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 In business, compound interest is given as an exponential function.

B The normal distribution or bell curve is used because many popula-


tions follow a normal distribution on many scales.
C The exponential model models growth over prolonged periods in
most business situations.

D If we see the phrase that two quantities are inversely proportional,


it means that f (x) is a constant times 1/x.
E Quadratic functions always have two roots.
F Present and future values is given by a linear function.

G When the rate of change is proportional both to the current quantity


and to the distance from the theoretical maximum value we have
logistic growth.
H In business we encounter quadratic equations when we study revenue
and profit functions.

I The sinusoidal model is for data that repeats on a natural cycle.


J None of the above

1.2.9 Exercises Functions in the Business Setting


Exercise Group. For each model, some features of the graph are listed.
Describe how to change each feature by changing the parameters of the model.
(e.g., With the linear model, f (x) = ax + b, the parameters are a and b. The
place where the line intercepts the x-axis is −b/a, so any x-intercept can be
produced with a = −1 and b equal to the desired value.)
1. For a linear model, f (x) = ax + b, how do I get a graph with
(a) A positive y-intercept?

(b) A negative slope?

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 to obtain a negative slope: The slope is determined by a


in the formula above, so we let a < 0.
2. Suppose we are working with a quadratic model, f (x) = ax2 + bx + c
(a) How do we get a graph, that points down? (i.e. a graph that
has a maximum)?
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 14

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

• If f goes to 0 as x gets large it must be an exponential decay


function which means that the coefficient r must be negative.
6. For an exponential model, f (x) = P ∗ exp(−rx) + b, how do I get a
graph where f (x) goes to 10 as x gets large, f (0) = 1, and f (10) is at
least 9?
M
7. For a logistic growth model, f (x) = 1+a exp(−r∗t) , how do I get a graph
where f (x) goes to 10 as x gets large, f (0) = 1, and f (10) is at least
9?
Solution. We have several conditions here that need to be met. We
use them to find our parameters one at a time.

• f (x) goes to 10 as x gets large. If −r > 0, then a exp(−r ∗ x)


gets very large as x gets large which would send f down to 0,
but f goes to 10. So we know that −r < 0.
When −r < 0, exp(−r ∗ x) goes to 0 for large x. So the whole
equation must go to M . Hence M = 10.
• f (0) = 1. When x = 0 we get f (x) = M /(1 + a exp(0)) =
M /(1 + a) = 10/(1 + a) = 1, Hence a = 9.
• f (10) is at least 9. With M = 10 and a = 9 we have that f (10) =
10/(1 + 9 exp(−r ∗ 10)) > 9 This implies that 1 + 9 exp(−r ∗
10) < 10/9 and hence exp(−r ∗ 10) < 1/81. This means that
r > −1/10 ln(1/81) = 0.44
8. For a sinusoidal model, f (x) = M + A sin(2π(x + shift)/period), based
on seasonal change through the year, if x is measured in months, what
value should period have?
 2 
9. 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 (4) between 1
and 2? (You need to use trial and error on this problem.)
Solution.
x−m
• The high point of the graph occurs when s = 0. This hap-
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 15

pens at x = 7, so this means that m = 7 as well.


  
7−7 2
• Once we know that m = 7, then f (7) = a exp − s =
a exp(0)
 = a But f (7) = 20, so a = 20. This means that f (x) =
 
x−7 2
20 exp − s .
  
4−7 2
• If the value of f (4) is between 1 and 2, f (4) = 20 exp − s
is between 1 and 2. We can solve for s
 2 !
4−7
1 < 20 exp − <2
s

 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:

Amount of metal = K ∗ (Volume)3/2 .

Volume is the input, the K is some constant and Amount of Metal is


the output.
20. The total length of booms needed to contain an oil spill as a function
of the size of the spill.
21. The monthly sales of a hot new electronic device in a country.
Solution. Sales will likely increase a lot initially, but then level out.
So a logistic equation may be a reasonable model.

f (x) = M /(1 + ae−rx ).


22. The distribution of sales of pairs of pants by leg length.

1.3 Introduction to Excel Spreadsheets


Link to set up but unworked worksheets used in this section1
Link to worksheets used in this section2
Excel is used in the business world. (More precisely, the spreadsheet is the
standard tool, and Excel is currently the de facto standard brand. Most of this
text can easily be used with other spreadsheets.) However, we do not assume
that the student has worked with Excel previously. Throughout the course we
will introduce those features of Excel we need to do mathematics and model
the business problems we encounter.
While introducing Excel, we will also introduce rules of “Good Excel prac-
tice.” In a business environment, spreadsheets should be written so that some-
one else can easily understand the worksheet, and maintain it for future use.
You should assume those same standards when submitting work in Excel.
This section is meant as an introduction to several standard features of
Excel we will use often. These include:
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/

Section-1-3-Examples-Unworked.xlsx
2 external/Examples/Section-1-3-Examples.xlsx
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 17

• Basic Arithmetic such as add, subtract, multiply etc.


• Show formulas: allows us to check if the formulas in the cells are what
they should be.
• Quick fill: this feature takes a pattern and fills it across a column or a
row.
• Relative and Absolute Reference: when do we refer to a fixed cell
and when does the reference depend on our place in the spreadsheet?
• SUM(): Adding a large number of cells can be efficiently done with this
feature.

1.3.1 Basic Arithmetic, show formulas and quick fill.

Standalone

Figure 1.3.1 Video presentation of this example


We start with an example that covers basic arithmetic. Assume we are
given the following worksheet:

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.

If we use the quick fill on a pair of numbers, Excel produces an arithmetic


sequence. A pair of cells containing 1 then 4 becomes the start of a sequence
1, 4, 7, 10, … .
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 20

1.3.2 Absolute and Relative Cell References

Standalone

Figure 1.3.3 Video presentation of this example


One of the reasons that spreadsheets are so useful for doing mathematics in
a business setting is that businesses often do a relatively simple computation
for a large number of cases. That means we should pay attention to formulas
with cell references and the process of copying a formula from one case to
another. In the example above, all of the values change from one month to
the next. It is not hard to imagine a calculation where some values remain the
same for many cases. Thus we want to look at the idea of absolute and relative
cell references. This is a very important topic and an Excel feature we will be
using for the rest of the term.
Consider the following example: Your rich uncle, Fred, decided to give you
10 shares of Google stock (goog) on January first 2009, with the option of
receiving instead the same value in either Microsoft (msft) or Apple stock
(aapl). You would like to see the monthly change in value of the portfolios
over a three-year period.
We start by going to finance.yahoo.com and collecting the monthly prices
of the stocks, downloading the answers into a spreadsheet. When we look up
historical prices from Yahoo, we are interested in the adjusted closing price.
(They adjust the price to account care of splits and dividends.) That produces
a spreadsheet like the one below.

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.

Absolute references refer to a particular column and/or row. The


dollar sign ‘$’ is used to fix the reference.
Relative references refer to the cell the same distance away from
the cell containing the formula.
Partial absolute references, like $B3and B$3, are absolute in ei-
ther the row direction or the column direction and relative in the other
direction.

We continue our example by computing the change in value of our goog


portfolio in the first month. That will be the share price at the beginning of
the next month minus the share price at the beginning of the month, times the
number of shares. For January 2009, for goog this becomes =(B4-B3)*B$1.

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.

1.3.3 Named Cell References


An alternative to using absolute references in formulas is to name the cells.

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

1.3.4 Getting Help


One of the ways that doing mathematics with a program like Excel differs from
working with a calculator is that computer programs have help features. It is
worthwhile pointing out two that come with Excel. We illustrate both with
the SUM function we have used a number of times.
When we call Help from the top menu, we are given a pop up window for
Excel Help. It has a number of topics listed by default. It also has a bar for
searching topics.

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

1.3.5 Other Details


Excel is a rich and complex tool. We will be looking at more features as we go
through the course. There are several that are worth pointing out explicitly at
this point.

• For ordinary arithmetic, Excel uses the standard symbols of + , − ,


CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 25

* , / , and ^ for plus, minus, times, divided by, and raising to a


power.
• We can also use the SUM, PRODUCT, QUOTIENT, and POWER commands for
ordinary arithmetic.
• The order of operations used by Excel differs from the traditional order
of operations when it comes to taking powers of negative numbers. The
problem is illustrated in evaluating −32 , which has a negative sign and an
exponentiation. In all math classes you have taken this is interpreted as
−(32 ) or −9, with exponentiation done first. In Excel, this is interpreted
as (−3)2 or 9, with negation done first. When in doubt, use parenthesis
to make the order of operations explicit.
• Excel also has the other mathematical functions you have used before.
The functions for square root, log base 10, log base e, and e to the power
of, are respectively, SQRT, LOG, LN, and EXP.
• The value of e is represented by EXP(1).
• Excel has a number of very useful operations on collections of numbers.
We start with easy ones where the name is self explanatory, like SUM,
AVERAGE, COUNT, MIN, and MAX.

1.3.6 Reading Check


1. Reading check, Functions in the Business Setting.This question
checks your reading comprehension of the material is section 1.3, Intro-
duction to Excel Spreadsheets, 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 can name cells to make formulas easier to read.


B Absolute references refer to a particular column and/or row. The
dollar sign ’$’ is used to fix the reference.
C Relative references refer to the cell the same distance away from the
cell containing the formula.
D Excel can format an answer as currency.

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

I None of the above

1.3.7 Exercises Introduction to Excel Spreadsheets


1. Produce a spreadsheet where the first 100 rows are used. The cell in row
n and column A should have value n. The cell in row n and column B
should have value 2∗n. You should be able to do this by typing in the
value of 4 cells and using quick fill.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 26

Solution. The formulas entered should look like this:

Once we quickfill and have the regular view (not showing the formulas)

• The actual spreadsheet has 100 rows.


• Note that there is a small window that shows how far the quickfill
has gone.
• If you want to check the formulas used you go to the “Formula” menu
and choose “Show formulas”. This feature is good for debugging any
problem that may happen.
2. Produce a spreadsheet where the first 100 rows are used. Column A should
contain the first 100 odd numbers. Column B should contain multiples of
7 starting with 21.
3. Start with the worksheet given. Complete the worksheet in such a way
that if the values of x, y, and z are changed, the other values are automat-
ically recomputed.

Solution. We do not need to use absolute references in this case, but


when we are computing something involving the x, y and z values we
should refer to cells B1, B2, and B3 respectively.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 27

The spreadsheet should have entries as shown above.


4. Produce a spreadsheet where the first 101 rows are used. Row 1 should be
used for labels. Column A should contain integers from 1 to 100. Columns
B through F should contain the squares, cubes, square roots, logs base 10
and natural logs of the entries in columns A.
5. Start with the spreadsheet section below.

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.

7. Complete the spreadsheet section below so that columns A through C are


complete for numbers 1 to 100. (The value for a should be a random
number generated by the formula in cell E1.)

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

The entry in C2 could also have been given as =A2^2+$E$1.


Just E$1 will work as well. We are filling down so we really need to fix
the row in this case.
In this version the random number settled on −6 (yours is likely dif-
ferent) and the first part of the table looks as follows. The actual answer
has all 100 rows completed.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 29

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?

1.4 Graphing functions with Excel


Link to set up but unworked worksheets used in this section1
Link to worksheets used in this section2
One area where Excel is different from a graphing calculator is in producing
the graph of a function that has been defined by a formula. It is not difficult,
but it is not as straight forward as with a calculator. However, it is a skill
worth developing . When we are given a formula as part of a problem, we will
want to easily see a graph of the function.
We will walk through the process for producing graphs for three examples
of increasing complexity. For the first example, we have a specific function
and specific range in mind, say y = x2 − 6x over −10 ≤ x ≤ 10. For the
second example, we would like to use parameters in the formula, for example,
y = ax2 + bx + c, with specified values of a, b, and c, and have the ability to
easily change the values of the parameters and see the graph. For the third
example, we would also like to have the ability to change the domain, graphing
over xLow ≤ x ≤ xHigh, where xLow and xHigh can easily be changed.

1.4.1 A basic graph

Standalone

Figure 1.4.1 Video presentation of this example


Graphing y = x2 − 6x over −10 ≤ x ≤ 10
4 http://inflationdata.com/
5 http://www.bls.gov/cpi/
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/

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

1.4.2 A graph with parameters

Standalone

Figure 1.4.4 Video presentation of this example


Graphing y = x2 − 6x as an example of y = ax2 + bx + c over the domain
−10 ≤ x ≤ 10.
For the second example, we want the same graph, but we want the ability
to easily convert the graph of our first quadratic into a different quadratic
function. The solution is to consider a, b, and c to be parameters that we can
change.
Toward the top of the worksheet, we put the labels a, b, and c, and give
values for those parameters. In this case the values of a, b, and c are in cells
B9, B10, and B11 respectively.
Now we set up the problem in the same way we did above, except that we
are using absolute references for a, b, and c, and relative references for x.

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

1.4.3 Controlling the viewing window

Standalone

Figure 1.4.6 Video presentation of this example


Graphing y = x2 − 6x as an example of y = ax2 + bx + c over the domain
−10 ≤ x ≤ 10, but with the ability to easily change the domain of the graph.
Often, when we graph, we will want to change the domain of the graph.
Most easily, I may want to zoom in on a particular region to get a better view
of some interesting feature. I may want to look closely at several different
regions.
To do this we will again plot 21 points, but we want to have control of the
starting point and the change in x between the first and second points. First
we add labels and values for x-start and x-step. Then we need a bit of care in
defining the values of x. The first value of x (cell A18) is the value of x-start.
Every other value of x is defined as the previous value of x plus the value of
x-step.

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

1.4.4 Graphing more than one function

Standalone

Figure 1.4.7 Video presentation of this example


We would also like to put two or more graphs together. For our examples,
we will want to use the functions f (x) = x − 3, g(x) = (x2 − x)/10, and
h(x) = x3 − x. We start by using the procedure given above to make a chart
of values for the three functions.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 37

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

1.4.5 Formatting a chart


Excel has a lot of ways to add formatting to a graph or chart, many more
than we want to be concerned with at this point. We simply point out a few
and leave it to the reader to explore how this should be used for a good visual
presentation. If you click once on the chart to select it, the Chart tab in the
home ribbon, adds sub-tabs for layout and format. With Chart Title, you can
add a title to the chart, then edit it. The Axes icon allows you to add titles
for the axes. If you select a data point form g(x), you can then use the Data
Labels icon to add values next to the points. The chart with these annotations
is given below. The rule of thumb to follow is to add enough annotations for
a reader to be able to easily understand what is happening in the chart.

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

1.4.6 Online graphing tools: Wolfram Alpha


Throughout this book, we are limiting ourselves to mathematical tools that the
student can reasonably expect to find in a generic work environment. That is
one of the reasons for focusing on using spreadsheets and Excel. A second
reason is that we will spend a significant amount of time on functions defined
by data points, where we then try to construct a formula. However when we
are starting with a formula, there are easier ways to produce a graph. The
simplest is to use the free website, Wolfram Alpha3 . For example to obtain a
graph of the functions f (x) = x2 − 3x, as x ranges from −5 to 5, we simply
type “plot x^2 - 3 x for x from -5 to 5” and obtain:

We will return to Wolfram Alpha from time to time, when we have nice
formulas to manipulate.

1.4.7 Reading Check


1. Reading check, Functions in the Business Setting.This question
checks your reading comprehension of the material is section 1.4, Graph-
ing Functions in Excel, 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 can manually change the title of of a chart.


B If we want to look at the graph of several quadratic polynomials, we
have to start over for each graph.
C Secondary axes are useful when looking at functions that are of
different scales.
D We use a marked scatterplot to graph with Excel.
E We can only graph one function at a time with Excel.
F Absolute and relative cell references can be used interchangeably.
3 https://www.wolframalpha.com/
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 40

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

1.4.8 Exercises 1.4 Graphing functions with Excel


1. Produce a worksheet that with a graph of the function f (x) = x2 − 5x,
with x going from -10 to 10 by 1.
Solution. The entry in cell B2 is =A2^2-5*A2; remember to use quickfill
to complete the table

2. Produce a worksheet that with a graph of the function g(x) = (x2 −


5x)/(x2 + 7x + 10), with x going from -10 to 10 by 1. Explain why
the graph is inaccurate. (Pay attention to places where there should be
asymptotes.)
2∗ – Extra credit) — Fix the graph from problem 2 by adjusting the
set of x-values used.
3. Produce a worksheet with a graph of h(x) = x3 + ax2 + bx + c for x from
-10 to 10, where the values of a, b, and c can be changed and the graph will
update automatically. For initial values, use a = −2, b = 1, and c = −11.
Solution. The entry in B5 should be =A5^3+$B$1*A5^2+$B$2*A5+$B$3.
Note that the references to a, b and c are absolute references.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 41

4. Produce a worksheet with a graph of k(x) = (x2 + ax + b)/(x + c) for x


from -10 to 10, where the values of a, b, and c can be changed and the
graph will update automatically. For initial values, use a = −5, b = 2,
and c = −11.
5. Produce a worksheet with a graph of h(x) = x3 − 2x2 + x − 11 for x going
from a to b, where the values of a and b can be changed and the graph
will update automatically. For initial values, use a = −5 and b = 5.
Solution. The entries are a and b, and the step size. We assume here
that we are using 10 points to create a graph.

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

6. Produce a worksheet with a graph of k(x) = (x2 − 5x + 2)/(x − 11) for


x going from a to b, where the values of a and b can be changed and the
graph will update automatically. For initial values, use a = −5 and b = 5.
7. (Writing assignment) Write a report of 2 pages or less on the graph of
the function f (x) = (x2 + 7x + 10)/(x2 − 3x + 2). The report should
be in Word (or other word processor) format with at least 2 graphs that
illustrate different features by looking at different viewing windows.
8. Produce a worksheet with graphs of f (x) = 2x + 5 and g(x) = x3 − 9x,
for x going from -10 to 10. Use secondary axes so that both graphs use
the full plotting window.
9. Produce a worksheet with graphs of h(x) = (x3 − 9x)/(x2 + 3x + 35/16)
and k(x) = 2x2 + 5, for x going from -10 to 10. Use secondary axes so that
both graphs use the full plotting window. Adjust the range of y values
used to make the graph reasonable.
Solution. The entries should look like this:

Using secondary axes we are able to show the important feature of


each of the graphs.

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:

1.5 Using Excel to find best-fit curves


Overview. Link to set up but unworked worksheets used in this section1
Link to worksheets used in this section2
In Section 1.1–1.2 we looked at useful mathematical models and formulas
that we anticipate seeing repeatedly in the business environment. If we are
given equations that model the processes we are interested in, then this ap-
proach works. What happens though if we are not given equations? Many
important functions in business are quite often defined by data. Examples
include past sales, material costs, and consumer demand.
If we are given a data set, we can find a best fitting curve. A straightforward
approach is to assume that the data represents the output of a nice formula.
In real life applications, we will often see that so-called ”noise” can complicate
the situation. (Noise is a technical term to describe external unpredictable
factors that may cause your data to deviate form the model. For example,
if I am looking at sales at a fast food restaurant, our model will have noise
from traffic jams and bad weather outside.) For the purpose of this course we
will assume that the data will be reasonably nice, although some noise may be
evident. The problem of producing a best fitting curve to data can be broken
into two pieces:

1. We need to decide what kind of curve, or what model we want to use.


2. We want to be able to set the parameters (the constants) in the model
to give the best fit.

Coming up with a theoretical reason why we want to use a particular model


in a given case forms the content of a large number of your business courses,
both courses you have already taken and courses you are yet to take. The
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/

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.

1.5.1 Using Excel to find a best-fit line

Standalone

Figure 1.5.1 Video presentation of this example

1.5.1.1 Find the line


For a first example, we are running a widget factory and have the following
data on employee performance:
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 45

(A parenthetical note: In economics, widget is a placeholder name for a generic


manufactured device. It is only in recent times that it has also become a small
computer GUI unit.)
We would like a formula for widgets produced as a function of hours worked.
Since we can see two entries each, for 36, 43, and 44 hours worked, there cannot
be a function that hits all our data exactly. While we expect a linear function,
we are not surprised if there is random noise, as a worker may take a break, or
be particularly focused on a given day. We start by creating a scatterplot for
my data.

We right click (control-click on a Mac) on one of the data points and we


get a contextual menu. We select Add Trendline.

Figure 1.5.2

1.5.1.2 Produce the equation of the line


When adding a trend line, we need to select from a number of options. The
first option concerns the mathematical model we want to choose. Given that
we suspect the number of widget produced will be roughly proportional to the
hours worked, we want to use a linear model, so we make that choice. Under
options, we want to display the equation on the chart.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 46

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.

1.5.1.3 Bring the equation of the line back to the chart


Having found a best fitting line, I want to copy the equation back into my
spreadsheet and to be able to compare the values in my data with the projec-
tions from my equation. You should notice that the equation Excel produces
in the chart is written in standard mathematical notation, while the corre-
sponding equation in cell B3 is in Excel notation. (In Excel notation we need
a symbol for multiplication rather than simply putting a number and variable
together. In Excel notation, we also use a cell reference, B1, rather than a
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 47

variable, x.)

1.5.2 Checking and improving our equations

Standalone

Figure 1.5.4 Video presentation of this example


When finding the best fitting curve to data we have gathered, we need
to pay attention to the model we have chosen and to the range to which we
want to apply it. In our example, the linear fit looks pretty good. However,
we should be careful about using it on too wide a domain. According to our
model, a worker who works no hours produces 12.52 widgets a week, which is
obviously silly. In the other direction, it predicts that a worker who worked
168 (= 7 × 24) hours a week would produce almost 970 widgets, instead of
predicting a collapse from exhaustion.
The other issue is the choice of a model. We chose a linear model. An
argument could easily be made for a proportional model. (A worker who works
no hours produces no widgets.) We can switch to the proportional model by
setting the y-intercept to 0 in options for the trend line. Then the equation is
(Widgets Produced) = 6.00026 ∗ (Hours Worked)
instead of our original equation of
(Widgets Produced) = 5.6975 ∗ (Hours Worked) + 12.54.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 48

We should also be careful about trying to get a better fit by using an


inappropriate model. In our case, we can get a better fit by allowing the curve
to be a 6th degree polynomial. However the resulting equation does not make
sense. It predicts that a worker will produce about quarter million widgets
with a 1-hour work week, and −1500 widgets with a 55-hour work week.

1.5.3 Fitting the Consumer Price Index (CPI) to a best


fitting curve; an extended example

Standalone

Figure 1.5.5 Video presentation of this example


For our second example, we will look at the consumer price index and try
and fit it to a model. This example will illustrate several issues we need to
keep in mind when building models. We obtained data for the consumer price
index from
http://inflationdata.com/inflation/Consumer_Price_Index/HistoricalCPI.aspx.
The data from 1960 to 2011 is in the worksheet Section-1-5-Examples.xlsx3 .
3 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/

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.

1.5.3.1 Number of significant digits for equation constants


The first problem is that the equation Excel has given us does not have enough
significant digits to make useful predictions. We want to right click on the
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 50

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.

1.5.3.2 Setting the base point of a variable


The next issue to deal with is adjusting the year. Looking at the raw data, the
cpi was 100 sometime in 1983. Thus we simply add an extra column to our
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 51

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

Figure 1.5.9 Continued video presentation of this example

1.5.3.3 Selecting data for one model


Now we want to look at the more serious question, the one that says the model
does not fit very well. Looking at our data, the inflation rate seems to fall
into roughly 3 blocks, the years before 1973, the years from 1973-1983, and
the years after 1983. We would want to go back to our economics classes and
find an argument that says this division of years is reasonable. Using the same
menu that lets us add a trend line, we can edit the source data. We want to
restrict to the years after 1983. In our case, that means restricting to rows 1
to 30.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 52

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.

1.5.4 Reading Check


1. Reading check, Using Excel to Find Best Fit Curves.This question
checks your reading comprehension of the material is section 1.5, Using
Excel to Find Best Fit 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.

A We can change the number of digits shown in the trendline equation.

B When interpreting a trendline we need to be careful about the do-


main where the function makes sense.
C With an exponential model, it does not matter what we choose as
the base year.

D It does not matter which model we use with trendline.


E The trendline equation can simply be copied into a cell for compu-
tation.
F The best fitting curve minimizes the sum of the squares of the dif-
ferences between the measured and predicted values.

G In Excel we ’Add a Trendline’ to a scatterplot to find a best fitting


curve.
H None of the above

1.5.5 Exercises: Using Excel to find best fit curves


1. We have the following data on widget production:
Month Jan Feb Mar Apr May
Production 16,597 30,687 48,441 55,751 79,606

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

Excel automatically changes the months into numerical values.


The best linear function for the data is y = 15108x + 891.8.

(b) Create a new table using the function to determine the predicted
production levels.

Excel needs x to be a number, so we need to insert a row and provide


the appropriate numerical values: 1 for Jan, 2 for Feb, etc.
The predicted production for May is 76,432.

(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:

Month Jan Mar Apr July Aug


Units sold 1.505 9,042 13,018 21,873 22,636

(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:

Units sold 3,000 5,000 7,000 9,000 11,000


Revenue 16,161 24,783 34,484 38,014 33,030

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

The linear model is y = 2.3485x + 12855.


(b) We can do scatterplots and use the polynomial trendline of degree
2 to find the model we need. (See the second image in part (a).)
The quadratic (polynomial of degree 2) model is y = −0.0006x2 +
10.694x − 11586
The graphs show that the quadratic equation is the better model
and follows the data more closely.
(c) The revenue function is given by price ∗ quantity. If we offer more
units the price will eventually go down. If the price goes down faster
than the number of new items sold, the revenue will at some point
go back down.
(d) Plug x = 15000 into y = 2.3485x + 12855 and we get $48,082.50 for
the linear model.
Plug x = 15000 into y = −0.0006x2 + 10.694x − 11586, and we get
$13, 824 for the quadratic model.
[You can use Excel, a calculator or Wolfram Alpha to do these last
computations.]
4. In building water tanks, design considerations indicate the weight of the
dry tank should be roughly a power function of the capacity. I am inter-
ested in building a larger tank than I have before. I have the following
data between capacity and weight:

Gallons 1,000 5,000 7,000 9,000 17,000


Weight 103 878 1,339 1,927 4,496

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

Month Jan Apr July Oct Jan


Units sold 1082 1680 2662 3783 6430

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

The best fitting exponential curve given by Trendlines is y =


934.78e0.1459x .

(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

Sales(time) = MarketCap/(1 + adjustment ∗ exp(−rate ∗ time)).

We have the following data on sales:

time(years) 0 2 4 6 8
sales 1000 5610 14,845 19,095 19,870

Find values of the parameters MarketCap, adjustment, and rate to


reasonably fit the data.
7. The unit sales of an article of clothes for adults can be expected to
follow the model of a normal distribution. In such a case the sales
should be modeled by a normal equation, of the form
 2 !!
Size − Mean
Sales(size) = MaxPerSize ∗ exp − .
StandardDeviation

(Note we need an extra set of parenthesis to keep the order of opera-


tions correct.) We have the following data on sales:

size 7 8 9 10 11 12
Weight 360 3,390 12,820 20,000 12,826 3,375

Find values of the parameters MaxPerSize, Mean, and StandardDevi-


ation to reasonably fit the data.
Solution. The initial plot shows that the distribution is normal:

The maximum is at x = 10. This suggests( that) Mean = 10.


x−10 2
− ( STDev )
If we use Sales(x) = MaxPerSize ∗ e , then if x = 10 we
have Sales(10) = MaxPerSize, and so MaxPerSize = 20, 000, hence we
have that ( )
x−10 2
− ( STDev )
Sales(x) = 20, 000 ∗ e .
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 58
( )
−1 2
Let x = 11, then 12825 = 20, 000 ∗ e ( STDev ) .
−1


Hence e STDev2 = 12825 . Then STDev 12825
2 = ln 20000
p 2000
So STDev = (−1/ ln(12825/20000)) = 1.5002 so STDev =
1.5002
Comment: We will develop some methods to solve problems such
as this using Excel in Section 6.4 in Chapter 6.
8. The populations of the states can be found online for both the 2000
and 2010 censuses.
(A good site is http://en.wikipedia.org/wiki/
List_of_U.S._states_and_territories_by_population4 .)

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

Exercise Group. Projects:


10. Find the data for the consumer price index and the Dow Jones Indus-
trial average at the start of the year for the past 50 years. Over that
time, what is the best linear relationship between the two indices? To
make your equation easier to understand, scale the indices so they
both start at 100 on the same day.
11. Pick your two favorite stocks and chart their prices on the opening
days for a period of 30 years. How well are their prices modeled as a
linear model of each other? See if you can find two stocks that seem
to be inversely proportional to each other.

1.6 Finding Numerical Solutions with Goal Seek


Link to unworked worksheets used in this section1
4 http://en.wikipedia.org/wiki/List_of_U.S._states_and_territories_by_

population
5 http://www.census.gov/govs/state/
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 59

Link to worksheets used in this section2


In previous sections, we looked at deciding on a model to use for numerical
data, and finding the best fitting curve of that model for our data. Once we
have completed those phases of the process, we have reduced our data to an
equation. At that point we want to use the equation to answer some question.
Sometimes ,that question will reduce to solving an equation, as when we have
an equation for profit as a function of sales and we want to know when the
business will break even. At other times, we want to know what input gives
a desired output. (e.g., How much do I need to sell to make $100,000 in
commission?)
We can obviously use all the algebraic techniques we developed in previous
courses to solve our problem symbolically. However, Excel gives us two tools
to use to solve problems numerically, Goal Seek and Solver. In this section we
will explore Goal Seek, the simpler of these tools.

• We will use Goal Seek if we know what the desired output of an


equation is, and would like to know when that output is achieved.

• We need to have an equation to work with and we can only solve


for one kind of input (variable).
• Goal Seek is located under the What-If analysis menu.

1.6.1 A linear example

Standalone

Figure 1.6.1 Video presentation of this example


As with all new techniques in a math class, we start with a very simple
example that you can easily solve by methods you learned in previous courses.
Suppose we have the function f (x) = 3x + 5, and I want to find the value
of x where f (x) = 40. I start by setting up a worksheet with x and f (x) as
columns. I also need to start with a guessed value, which can be any number.
I will start by guessing a value of 5. (I will enter that value twice so we can
see before and after.)
Section-1-6-Examples-unworked.xlsx
2 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/

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

1.6.2 A quadratic example and concern with precision


We move on to a quadratic example. We let f (x) = x2 and want to find
f (x) = 2. The set up is similar, with an appropriate change in the equation.
However when I use Goal Seek, I don’t get quite the correct answer.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 61

Instead of finding a value with x2 = 2, I found a value with x2 = 1.99999495.

• We note that Excel is not solving the problem algebraically, but is finding
a numerical approximation within a preset tolerance.

• It is actually finding an x such that f(x) is within 0.001 of 2.

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:

This has computed the value of the square root of 2 to 10 digits.

1.6.3 More realistic examples: finding the intersection of


two curves
Equivalently, finding where two functions are equal to one another.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 62

Standalone

Figure 1.6.5 Video presentation of this example


In economics, there are the concepts of supply and demand prices, the
prices that will produce a specified supply or demand. (We will look at this
problem in more depth in the next chapter.) Suppose we are told the formula
for the supply and demand prices of a product are:

SupplyPrice(q) = ln(50 + 1000q) + q

DemandPrice(q) = 1000 ∗ exp(−0.02 ∗ q).


We want to find the quantity where supply and demand prices are equal. We
first do a fast graph to get an understanding of what is going on.

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

We see that equilibrium occurs when q is 106.725. We could have found


this algebraically by solving the equation

0 = 1000 ∗ exp(−0.02 ∗ q) − (ln(50 + 1000 ∗ q) + q),

but that is not an easy problem.


Our last example for Goal Seek looks at financial computations.

1.6.4 Using Goal Seek for financial computations

Standalone

Figure 1.6.6 Video presentation of this example


Assume you have decided to open a retirement account when you get out of
college. You decide that you will start by contributing $2,000 at the beginning
of each year, with that amount increasing by $100 each year, assuming a 5%
annual interest rate. The relevant formulas are:

Ending Balance = Beginning Balance + deposits + Interest Earned


Interest Earned = (Beginning Balance + Deposits) * Interest Rate
Beginning Balance = previous year’s ending balance.

It becomes easy to set up a spreadsheet to compute the balance at the end of


40 years.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 64

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

1.6.5 Looking under the hood and understanding Goal


Seek’s limitations
As with any tool we use, it is wise to have some understanding of the method
used by Goal Seek. That will help us understand when it is giving us an answer
different from the one we were expecting, or even gives us an answer that is
wrong.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 65

Standalone

Figure 1.6.7 Video presentation of this example


Goal Seek uses Newton’s Method, a technique based on Calculus, to find
solutions. The heart of the method is based on the fact that, at least for most
functions nice enough to show up in a course like this, when you zoom in far
enough on a graph you will get something that looks like a straight line. The
line we find that way is called the tangent line. (Finding the slope of the
tangent line, or the instantaneous rate of change, is one of the main goals of
calculus, and is given the name of finding the derivative.) If we start with
a guessed solution, we can produce a tangent line, find the point where the
tangent line reaches the desired value, and take the point’s x-coordinate as our
next guess. Repeating this process usually converges to a solution.

If we use the spreadsheet to illustrate Newton’s method for our example,


finding the solution for x2 = 2 starting with a guess of x = 1, we see that it
converges in 5 iterations. (At this point, we are simply illustrating how Goal
Seek works. You are not yet expected to be able to replicate the process. You
will learn how to find the slope of the tangent in later chapters.)
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 66

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

Figure 1.6.8 Further video for this example


The first difficulty is that Goal Seek may not give you the answer you are
looking for if there are multiple answers. The function f (x) = x3 − x has three
roots, x = −1, 0, 1. If we give Goal Seek a starting point of x = .55, it will give
the solution of x = 0.

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 variant of these problems occasionally shows up. If we start with a


carefully rigged problem we can set the algorithm of Goal Seek into a loop. If
we start with the function f (x) = x3 − 50 ∗ x with an initial guess of x = 1, and
ask Goal Seek to find when f (x) = 500, Goal Seek will not find an answer. In
this case we could look at a graph and make an initial guess of 6, and then get
a correct answer. Once again, with a numerical method, it pays to try some
cases and make sure that our guess is close to a reasonable answer. If f (x) is
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 68

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.

1.6.6 Reading Check


1. Reading check, Finding Numerical Solutions with Goal Seek.This
question checks your reading comprehension of the material is section 1.6,
Finding Numerical Solutions with Goal Seek, 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 Goal Seek finds an exact answer.

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

1.6.7 Finding Numerical Solutions with Goal Seek

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

2. Let f (x) = −x2 + 4x + 5. Find an x so that f (x) = −5.


3. Let f (x) = 5x + 7/x. Find an x so that f (x) = 20.
Solution.

4. Let f (x) = 10 exp(x/10). Find an x so that f (x) = 1000.


5. Let f (x) = ln(x + 5) + 7. Find an x so that f (x) = 5.
Solution.

Note that next to the solution there is a button for “Approximate


form”.
We can use that to get a decimal approximation:
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 70

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

Wolfram finds two intersections: one at t ≈ −1.71925 and the


other at t ≈ 68.5047.
Using the function g(t) = t/10 we get the two intersection points
at (−1.71925, −.171925) and (68.5047, 6.85047).
10. Find an intersection point of f (t) = 20 ln(100t + 854) and g(t) = 0.02t.
11. Find both intersection points of f (x) = 7 + 10x − x2 and g(x) = 0.
Solution.

The y-coordinates must be 0. If we use the approximate form of


the solution we get (−0.65685, 0) and (10.657, 0).
12. Find both intersection points of f (x) = 15x + 200/x and g(x) =
20 + 25x.
13. We have reason to believe that the profit function for widget manufactur-
ing is modeled by a quadratic equation. We have the following data for
sales and profits.
CHAPTER 1. FUNCTIONS GRAPHS AND EXCEL 72

Sales 100 250 350 500 600


Profit $8,462 $18,378 $22,455 $24,400 $23,747

(a) Find the best fitting curve for the data.


(b) Find the two break-even point, or amount of sales that yield a profit
of $0.

Solution.
(a) Using Excel we find the best fitting polynomial of order 2:

y = −0.1006x2 + 100.66x − 555.65

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

The break-even points are at sales of 5.55 and 995.05.


14. A certain bank will give a $75 bonus on a new account with a deposit
of $1000, and then pays 5% interest compounded continuously. A second
investment opportunity will pay $100 per year.

(a) Which opportunity pays more in the first year?


(b) For what period of time do the two opportunities offer the same
return?

(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

15. Let f (x) = (10x − 1) ∗ exp(−x) + 2.

(a) Find a solution with Goal Seek starting with x=1.

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

For x = 1 as the starting point GoalSeek find a zero at x ≈ −0.0839


(b) Starting at x = 2 GoalSeek does not find a zero at all. If we run
GoalSeek a second time, now starting with the value at x = 53.02
we zoom in on the first zero!
(c) Using Wolfram, we see a fairly complicated solution, but we are also
shown that there is one real solution.

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

2.1 Market Equilibrium Problems


Link to unworked set of worksheets used in this section1
Link to worksheets used in this section2
As we mentioned in the previous chapter, many functions are locally linear,
so if we restrict the domain the function will appear linear. Thus, we often
start with linear models when trying to understand a situation. In this section,
we look at the concepts of supply and demand and market equilibrium. For
our examples in this section we will assume that the functions are linear in the
range we care about.

2.1.1 Supply and Demand and Market Equilibrium


The normal laws of supply and demand assume we are in a market with many
producers and consumers, operating independently, all of them looking out for
their own best interests. We expect that when the price goes up, more produc-
ers are willing to sell but fewer consumers are willing to buy. Conversely, when
the price goes down, fewer producers are willing to sell but more consumers
are willing to buy.
Consider the example of gasoline prices. Different prices will make some
areas of exploration and production profitable or not profitable. When prices
go up, new wells get drilled. If prices go down too far, stripper wells cease
being profitable and are shut down. From the consumer side, when prices go
up, more people look at mass transit or getting a more fuel-efficient vehicle.
When prices go down, it is easier to think about a road trip.
The law of supply looks at the economy from the supplier’s point of view.
Price and quantity available for sale always move in the same direction. If the
price goes up we can assume that all the old suppliers are still willing to sell at
the higher price, but some more suppliers may enter the market. If the price
goes down, no new suppliers will enter the market, and some old suppliers may
leave the market. For a linear model:

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.

• This intersection of the supply and the demand functions is called


the point of market equilibrium, or equilibrium point.

• The price at this point is referred to as the equilibrium price.


• The standard economic theory says that a free and open market
will naturally settle on the equilibrium price.

Example 2.1.1 Starting With Formulas.


CHAPTER 2. BUSINESS APPLICATIONS 77

Standalone

Figure 2.1.2 Video presentation of this example


Suppose q denotes quantity, and the supply price for widgets is given by
q
SupplyPrice = $6 + .
100
We are also told the demand price is given by
2q
DemandPrice = $18 − .
100
Find the equilibrium price and quantity.
Solution 1 (Solution (a)). We have started with an example that we can do
by basic algebra without any technology. Subtracting the two equations, we
see that
3q
0 = $12 − .
100
Some straightforward algebra shows that the equilibrium quantity is 400.
Substituting back into either equation gives an equilibrium price of $10.
Solution 2 (Solution (b)). While we can do this example by hand, we also
want to use it to set up a solution with Excel, since we may want help on
problems where the numbers are not as nice. Our plan is to use Goal Seek to
find the intersection. We need a cell where we can solve the problem by forcing
the cell to have a value of zero.

When cell D2 is zero, the supply price will be the same as the demand price.
We now invoke Goal Seek.

As expected, it finds equilibrium when q = 400. □


We need to do a bit more work when we are simply given data points and
need to find the supply and demand curves.
Example 2.1.3 Starting With Data.
CHAPTER 2. BUSINESS APPLICATIONS 78

Standalone

Figure 2.1.4 Video presentation of this example


My market data indicates customers will buy 700 gizmos if they are priced
at $13 each. If the price rises to $15, they will only buy 500. If the price is $12
a unit, the producers will make 400 gizmos. If the price rises to $13, they will
produce 600 gizmos. Assume that the supply and demand curves are linear
for between 300 and 1000 gizmos. Find the equilibrium point for the gizmo
market.
Solution. We start by making a chart for the values given. We add a scat-
terplot so that we can see the values.

Next we add linear trendlines for both the supply and demand. We select
the option to show the equations.

The projected equations are:


SupplyPrice = 0.005 ∗ Quantity + 10

Dprice = −0.01 ∗ Quantity + 20.


We set up columns for the projected supply and demand curves. We also
add a column for the difference so that we can use Goal seek to find the
equilibrium point.
CHAPTER 2. BUSINESS APPLICATIONS 79

It is then straightforward to see that the equilibrium quantity is 666.67 and


the equilibrium price is $13.33.


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

Figure 2.1.6 Video presentation of this example


We have obtained the following data for sales of gizmos in our location.

quantity 653 762 847 943 1050 1130 1260


Supply price 5.52 6.20 6.85 7.48
Demand price 6.68 6.50 6.38 6.31

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

The supply and demand functions are:

SupplyPrice = .0032 ∗ Quantity + 3.44


DemandPrice = −0.0010 ∗ Quantity + 7.46.

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.

We now use Goal Seek to find the equilibrium point.

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

2.1.2 Reading Check


1. Reading check, Market Equilibrium Problems.This question checks
your reading comprehension of the material is section 2.1, Market Equilib-
rium Problems, 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 The slope of the demand curve is always positive.


B The standard economic theory says that a free and open market will
naturally settle on the equilibrium price.
C This intersection of the supply and the demand functions is called
the point of market equilibrium, or equilibrium point.
D The law of supply looks at the economy from the supplier’s point of
view.
E If the supply and demand curves are unlabeled, there is no way to
guess which is which.
F The law of demand looks at the economy from the consumer’s point
of view.
G The slope of the supply curve is always positive.

H None of the above

2.1.3 Exercises 2.1 Equilibrium Problems

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

Entries in the cells be-


fore quick fill

Table with quantities


ranging from 0 to 10

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)

When q = 6000 we have that the supply price is $1357.30 and


the demand price is $3408.90.
(b) The market equilibrium is outside the range that we tested. The
graph indicates that the equilibrium (the intersection point) is
to the right of the values we checked. Let’s redo the table with q
between 0 and 20,000. The increments are a matter of preference.
In this example we will use steps of 4000. The graph shows that
the intersection point is somewhere between q = 12, 000 and
16, 000. The table shows it’s close to q = 16, 000.
CHAPTER 2. BUSINESS APPLICATIONS 83

We use Goal Seek to determine the actual equilibrium point.


Goal Seek shows that the equilibrium point
is at q = 15770 with a price of $3311.20

4. Given ps = 0.0035q + 23 and pd = −0.0027q + 463, with q0 = 46, 798.


5. I am given p = −2q + 100 and p = 3q − 30, as my supply and demand
curves, but am not told which is which. Determine which curve is the
supply curve and explain how you did it. What limits can you put on the
domain of the supply and demand functions?
Solution. The supply function is always increasing (positive slope) and
the demand function is always decreasing (negative slope), so we have:

demand: p = −2q + 100


supply: p = 3q − 30.

We expect both functions to be positive, because negative prices would


indicate we would have to actually give people money to take our product
off our hands!

−2q + 100 > 0 implies q < 50


3q − 30 > 0 implies q > 10.

So we should only consider quantities between 10 and 50.


Exercise Group. For Exercise 2.1.3.6–2.1.3.9, given the supply and demand
data:
(a) Find equations of the supply and demand curves, assuming they are both
linear.
(b) Find the market equilibrium.
6. Given supply and demand data:

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.

The market equilibrium occurs at q = 80 with a price of $18.


(No Goal Seek required in this case.)
8. Given supply and demand data:

quantity 4356 4792 6503 7038


Supply price $1.00 $1.15
Demand price $1.10 $.98
9. Given supply and demand data:
quantity 5378 7984 8352
Supply price $8.00 $9.50
Demand price $12.00 $10.00

Solution.
(a)

The supply and demand functions are:


SupplyPrice(q) = 0.0006q + 4.9045
DemandPrice(q) = −0.0007q + 15.017.

These decimal approximations introduce a bit of an error: note


the difference between the recorded prices and the ones predicted
by the model.
(b) To find the market equilibrium the column for q = 8352 was
copied and used to find the equilibrium point. Note that Goal
Seek only works if the entries in the cells are formulas! The
equilibrium is at q = 8240, with a price of $9.85.
(c) The projected prices are:
• Supply price of $9.92 when q = 8352
• Demand price of $10.03 when q = 7984
CHAPTER 2. BUSINESS APPLICATIONS 85

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:

quantity 100 120 140 160 180 155


Supply price 10.5 11.8 13.9 16.3 17.5
Demand price 21.3 18.1 14.7 12.3 8.6
11. Given the supply and demand data:

quantity 5021 6051 6968 7901 9023 9917 7500


Supply price 13.18 16.76 17.89 19.32
Demand price 19.69 18.78 18.05 17.61

Solution.
(a) For this problem the trendlines are truly models and will find
the best fit curve.

To be able to use Goal Seek we do need a table generated by


formulas, so we use the trendline equations:

SupplyPrice = 0.0012x + 7.773


DemandPrice = −0.0005x + 22.506.

(b) The market equilibrium takes place at q = 8666.5 with a price


of $ 18.17.
(c) The projected prices are
CHAPTER 2. BUSINESS APPLICATIONS 86

12. Given the supply and demand data:

quantity 3160 3615 4092 4462 4837 5261 5579 6000


Supply price 20.54 20.70 22.37 22.43
Demand price 25.31 18.91 17.04 14.37

2.2 Modeling Revenue, Costs, and Profit


Link to unworked worksheets used in this section1
Link to worksheets used in this section.2
In the last section we looked at the economic model for supply and demand.
We were particularly interested in the point of market equilibrium. In this
section we will look at the model for revenue, cost and profit. As with the
previous section, we will begin with assumptions that make as many things as
possible linear.

2.2.1 Revenue and a review of demand price


The simple model for revenue is

Revenue = Quantity ∗ Price .

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

Revenue = Quantity ∗ DemandPrice(Quantity).

If the demand price is a linear function, then revenue is a quadratic function.


We previously noted that a linear demand price function has a negative
slope. We should note the two limiting cases. If the slope of the demand
curve is 0, the consumers have a fixed price they will pay for however much of
the product is available. In this case the demand curve is a constant, so the
revenue curve will be linear. This is referred to as a perfectly elastic market.
The other limiting case is where the demand is for a fixed amount no matter
what the price. In this case the demand curve is a vertical line and is not a
function, so the revenue curve also fails to be a function of quantity.
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/

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.

Example 2.2.1 Finding Revenue From Linear Demand Price.

Standalone

Figure 2.2.2 Video presentation of this example


We have determined that the demand price function for widgets is

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.

• For our simplified model variable costs= unit costs∗quantity.


• Thus costs= fixed costs + unit costs∗quantity.
CHAPTER 2. BUSINESS APPLICATIONS 89

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

Cost = 6000 + 14 ∗ Quantity.

If we substitute 2500 for the quantity, our costs are

Cost(2500) = 6000 + 14 ∗ 2500 = 41000.

2.2.3 Profit
For the third piece of the model, we look at profit. We have the simple formula

Profit = Revenue − Cost .

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

Figure 2.2.4 Video presentation of the next two examples


Example 2.2.5 Finding Profit. We are interested in selling widgets. The
demand price function is
q
DemandPrice = 15 − .
1000
It will cost $10,000 to keep our shop open before we consider the price
of inventory. Our variable cost is the cost of buying the widgets from our
wholesaler who will sell them to us for $8 a unit. Find a function for profit as
a function of how many units we sell. Graph that function for quantities from
1000 to 10000.
Solution. Using the methods from the previous examples, we write down the
functions for revenues and costs.

Revenue = Quantity ∗ Price


q
= q ∗ (15 − )
1000
costs = fixed costs + variable costs ∗ Quantity
= 10000 + 8 ∗ q.

Now we find profit as the difference of revenue and cost.


q
Profit = q ∗ (15 − ) − (10000 + 8q)
1000
−q 2
Profit = + 7q − 10000.
1000
We then use Excel to make a chart of values and a graph.


CHAPTER 2. BUSINESS APPLICATIONS 91

2.2.4 Break-Even Point


The last example illustrates a reality of manufacturing and retail. If a business
has a fixed cost or startup expense, it will have a loss if it does not sell enough.

The point at which revenues equal expenses (cost) is called the


break-even point.

This is important in preparing a business proposal, because the bank will


want to know if the break even point is a reasonable amount before it lends
any money.
Example 2.2.6 Find Break-Even Points. Find break-even points for
previous example. Explain what those points mean in practical terms.
Solution. We look at the chart from the previous example.

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

Figure 2.2.8 Video presentation of this example


We have the following data from the gizmo market, with quantity and costs
measured in millions.
CHAPTER 2. BUSINESS APPLICATIONS 92

Quantity 7.81 10.07 11.99 13.84 15.80


Demand Price $12.07 $9.05 $7.60 $6.64 $5.64
Cost $60.05 $70.09 $79.98 $89.90 $99.83

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.

This produces the desired cost and price functions.

DemandPrice = −0.7796q + 17.478


Cost = 5.00251q + 20.162.

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.

2.2.5 Technical note


In business situations we often have cases where a change of quantity in the
thousands only changes prices by pennies. Then, our coefficients are close to
zero, and Excel may give formulas rounded to zero. In those cases we need to
format the trendline to get more digits of accuracy.
CHAPTER 2. BUSINESS APPLICATIONS 93

Example 2.2.9 Problems with using big numbers.

Standalone

Figure 2.2.10 Video presentation of this example


We want to explore an issue that arises our coefficients are very small.
We will have to be concerned with the number of significant digits in our
coefficients.
We repeat the previous example, but with quantity and cost measured
directly, rather than in millions. We should get the same answers, since we are
using the same data.

Quantity 7,810,000 10,070,000 11,990,000 13,840,000 15,800,000


Demand Price $12.07 $9.05 $7.60 $6.64 $5.64
Cost $60,050,000 $70,090,000 $79,980,000 $89,900,000 $99,830,000
We face the same tasks. 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 explanation.
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.

As expected, a coefficient of each equation has been shifted by a factor of


1,000,000.

DemandPrice = −8 ∗ 10−7 q + 17.478


Cost = 5.0251q + 2 ∗ 107 .

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:

DemandPrice = −0.0000007796q + 17.4782059302


Cost = 5.02506q + 20161700.

We then go through the same process at get our original answers back.

2.2.6 Reading Check


1. Reading check, Modeling Revenue, Costs, and Profit.This ques-
tion checks your reading comprehension of the material is section 2.2,
Modeling Revenue, Costs, and Profit, 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 Profit = Costs - Revenue.

B In real world cases the revenue function has a negative coefficient


for the quadratic term and is a downward facing parabola.
C The simple model for revenue is revenue =quantity∗price.
D In our simplified model, the profit function is linear.
CHAPTER 2. BUSINESS APPLICATIONS 95

E We typically use the supply price in computing revenue.


F In the real world variable costs are proportional to quantity.
G We typically use the demand price in computing revenue.

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

2.2.7 Exercises: Modeling Revenue, Costs, and Profit


1. Reading check, Modeling Revenue, Costs, and Profit.This ques-
tion checks your reading comprehension of the material is section 2.2,
Modeling Revenue, Costs, and Profit, 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 In our simplified model, the profit function is linear.


B Profit = Costs - Revenue.

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.

E We typically use the supply price in computing revenue.


F We typically use the demand price in computing revenue.
G The simple model for revenue is revenue =quantity∗price.
H In real world cases the revenue function has a negative coefficient
for the quadratic term and is a downward facing parabola.
I In the real world variable costs are proportional to quantity.
J For our simplified model, costs= fixed costs + unit costs∗quantity.
K None of the above

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

(d) Find all break-even points.


(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.
2. Given DemandPrice = −2Quantity + 20 and Cost = 3Quantity + 10,
with q0 = 6.
Solution.

(a) Identify the fixed and variable costs.


The fixed cost is $10 (the constant/fixed part of the cost func-
tion), and the variable cost is $3 per item.
(b) Find the revenue and profit functions

Revenue = DemandPrice ∗Quantity


= (−2q + 20) ∗ q = −2q 2 + 20q

Profit = Revenue − Cost = −2q 2 + 20q − (3q + 10)


= −2q 2 + 17q − 10.

(c) Evaluate cost, demand price, revenue, and profit at q0

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.

(d) Find all break-even points


Solve Profit = −2q 2 +17q−10 = 0. We can do this with Excel or
with Wolfram. The break even points are q = 0.6 and q = 7.9.

(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

Entries in the cells be-


fore quick fill

The table with q be-


tween 0 and 8

Goal Seek gives break


even points at q = 0.64
and q = 7.86

The graph produced in Excel. To create the labels: double


click on one of the break-even points, go to “Chart Layout”, go
to “Data Labels”. In this example we chose the “x-value”. Both
break-even points were labeled to show where they are and what
the values are in this problem.
3. Given DemandPrice = −Quantity/10 + 50 and Cost = 10Quantity +
1000, with q0 = 300.
4. Given DemandPrice = −2.35Quantity + 250 and Cost =
54.6Quantity + 1234, with q0 = 59.
Solution.
(a) Identify the fixed and variable costs.
Fixed cost = $1234, and the variable cost = $54.60 (per unit)
(b) Find the revenue and profit functions.

Revenue = q(−2.35q + 250) = −2.35q 2 + 250q

Profit = Revenue − Cost = −2.35q 2 + 250q − (54.6q + 1234)


= −2.35q 2 + 195.4q − 1234.

(c) Evaluate cost, demand price, revenue, and profit at q0 .


Entries in the cells be-
fore quick fill
CHAPTER 2. BUSINESS APPLICATIONS 98

Table plus extra col-


umn for the value q =
59.

At q = 59, Cost = $4455.40, DemandPrice = $111.35,


Revenue = $6569.65, and Profit = $2114.25
(d) Find all break-even points.
Table plus extra col-
umn for the value q =
59

The break-even points are q = 6.9 and q = 76.3


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

The graph produced in Excel. To create the labels: double


click on one of the break-even points, go to “Chart Layout”, go
to “Data Labels”. In this example we chose the “x-value”. Both
break-even points were labeled to show where they are and what
the values are in this problem.
5. Given DemandPrice = −0.0023Quantity + 9 and Cost =
1.39Quantity + 1398.7, with q0 = 687.
6. Given demand price and cost are the linear functions that best fit the
data below and that q0 = 75.

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.

Identify the fixed and variable costs.


Fixed cost = $150, and the variable cost = $3 (per unit).

(b) Find the revenue and profit functions.


CHAPTER 2. BUSINESS APPLICATIONS 99

Revenue = q(−0.04q + 12) = −0.04q 2 + 12q

Profit = Revenue − Cost = −0.04q 2 + 12q − (3q + 150)


= −0.04q 2 + 9q − 150.

(c) Evaluate cost, demand price, revenue, and profit at q0 .


At q = 75, Cost = $375, DemandPrice = $9, Revenue = $675,
and Profit = $300
(d) Find all break-even points.
The break-even points, found with goal seek, are q = 18.127 and
q = 206.873
(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.
Entries in the cells be-
fore quick fill

Table plus extra


columns for the brek
even points

The graph produced in Excel. To create the labels: double


click on one of the break-even points, go to “Chart Layout”, go
to “Data Labels”. In this example we chose the “x-value”. Both
break-even points were labeled to show where they are and what
the values are in this problem.
7. Given demand price and cost are the linear functions that best fit the
data below and that q0 = 110.

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

Quantity 4356 4792 6503 7038


Demand price $1.10 $.98
Cost $1190 $1860

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)

(a) Identify the fixed and variable costs.


The fixed cost is - $169.35, and the variable cost is $0.3121 per
unit of quantity. (That the fixed costs are negative should make
us suspicious that we are outside the useful domain of our cost
function.)

(b) Find the revenue and profit functions.

Revenue = 5 ∗ (10)−5 x2 + 1.356x

Profit = 5 ∗ (10)−5 x2 + 1.356x − 0.3121x + 169.35


= 5 ∗ (10)−5 x2 + 1.0439x + 169.35.

(c) Evaluate cost, demand price, revenue, and profit at q0 .


At q = 75 we have that Cost = −$146, DemandPrice = $1.35,
Revenue = $101.42, and Profit = $247.

(d) Find all break-even points.


Re-compute profit for a different range of quantities and we get

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 profit function shows the break-even points close to 0 (-161)


and near 20,000 (21,039)
9. Given demand price and cost are the linear functions that best fit the
data below and that q0 = 7500.

Quantity 5378 7984 8352


Demand price $12.00 $10.00
Supply price $31,100 $45,100
10. Mary has been put in charge of a school function. She estimates that there
is a fixed cost of $1000 for the site plus a cost of $5 per person that attends.
If she charges $15 a ticket she can sell 250 tickets, but if she lowers the
price to $10 she can sell 500 tickets. Assuming the demand price is linear,
what price should she charge to break even while maximizing attendance?
Solution. The description of the cost function states that the fixed cost
is $1000, and the variable cost is $5, so the cost function is Cost = 5q +
1000.
Two points are given for the price function: (q1 , p1 ) = (250, 15) and
(q2 , p2 ) = (500, 10). Hence the slope is m = (15 − 10)/(250 − 500) =
−5/250 = −1/50 = −0.02.
Then the demand price function is (p − p0 ) = m(q − q0 ) Hence

(p − 15) = −0.02(q − 250)


p = 15 − 0.02(q − 250).
Entries in the cells before
quick fill

Values after quick fill

Identified the break-even


points using Goal Seek

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:

Quantity 5021 6051 6968 7901 9023 9917 7500


Cost 80376 103874 128513 140258
Demand price 19.69 18.78 18.05 17.61

Solution.
(a) Find best fitting equations of the cost and demand curves, as-
suming they are both linear.
Using trendlines we get

Cost = 12.175x + 19117


demand = −0.0005x + 22.506.

(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

We see that when quantity is 7500 the revenue is $140,670, and


the profit is $30,240.50.
(c) Find the break-even points.
Note that these values are not usefull for finding the break-even
points. To find those we will start quantity q at 0 and go up to
20,000.

So the two break-even points are q = 2054.8 and q = 18, 607.2.


13. Given the cost and demand data:
CHAPTER 2. BUSINESS APPLICATIONS 103

Quantity 3160 3615 4092 4462 4837 5261 5579 6000


Cost (Thousands) 90.1 126.70 197.2 234.9
Demand price 25.31 20.91 17.04 14.37

2.3 Nonlinear Functions


Link to worksheets used in this section1
For most of this chapter, we have restricted ourselves to functions that were
either linear functions or polynomial functions where they are built from the
interaction of linear functions. While this makes the economic models easier to
understand, it is pretty clear that the situations we care about are often better
described by more complicated functions. Suppliers of gasoline have a finite
amount they can deliver regardless of the price. That leads to a very nonlinear
supply function. It is worthwhile to review how we would enter other functions
in a spreadsheet.

2.3.1 Algebraic Functions


We start with the algebraic functions that should be familiar from previous
courses. These functions will let us use all the models that were mentioned in
Chapter 1. For this table, we will assume the input to the function has been
stored in cell A1.

Algebraic Entry Spreadsheet Entry Notes



f (x) = 2x + 7 =SQRT(2*A1+7) ∗ needed for multipliciation

f (x) = 3 2x + 7 =(2*A1+7)^(1/3) other roots done as fractional exponents
f (x) = x4 =A1^4
f (x) = −x4 =-1*(A1^4) Excel does negation before exponentiation
f (x) = ln(x) =LN(A1) Log base e or natural log
f (x) = log10 (x) =LOG10(A1) Log base 10 or common log
f (x) = log2 (x) =LOG(A1,2) Log to another base
f (x) = 1.06x =1.06^(A1)
f (x) = ex =EXP(A1)
2
f (x) = e(−x ) =EXP(-(A1^2)) Parentheses needed for correct evaluation
f (x) = |x| =ABS(A1) Absolute value

Consider a demand function and why it is probably not linear. We expect


demand to go up whenever we drop the price. However, with a linear function,
if dropping the price from $100 t0 $50 increases the demand by 20 from 100
to 120, then decreasing the price from $50 to $0 and giving it away would
only increase demand by another 20 to 140. A more reasonable model may be
a power function where decreasing the price by a fixed percentage increases
consumption by a fixed percentage. Similarly, when we think about the supply
function, we often expect the limits on available materials to make increasing
the supply progressively more expensive.
Example 2.3.1 Exponential Supply and Demand Price.
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/

Section-2-3-Examples.xlsx
CHAPTER 2. BUSINESS APPLICATIONS 104

Standalone

Figure 2.3.2 Video presentation of this example


We are interested in selling gizmos. The most a consumer will pay is $1,000.
If we drop the cost by 10\%, we increase demand by 100. The cheapest that
a supplier will sell for is $200. We find the market will produce another 100
gizmos whenever we increase the price by 20%. Find the market equilibrium.
Solution. We start by converting our information about supply and demand
into equations, plugging the equations into Excel, and sketching a graph. We
then use Goal Seek to find where the two equations are equal.

DemandPrice(Quantity) = 1000 ∗ (0.9)(Quantity/100)


SupplyPrice(Quantity) = 200 ∗ (1.2)(Quantity/100) .

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

Figure 2.3.4 Video presentation of this example


We have the following table of data for demand price and costs for our
product.
CHAPTER 2. BUSINESS APPLICATIONS 105

Quantity 100 300 500 1000 1500


Demand Price $35.35 $21.63 $17.25 $12.70 $10.26
Costs $2347.67 $5040.00 $7481.67 $12469.67 $16196.00

We have reason to believe that my demand price is a power function of some


kind. Our cost function is close to linear, but we can get volume discounts
and reduce the per-unit cost with larger quantities. Thus, we expect my cost
function is actually quadratic, with the quadratic term much smaller than the
linear term. Find best fitting curves for cost and price. Derive functions for
revenue and profit. Find break-even points between 10 and 1500.
Solution. I start by finding best-fit curves of for cost and price.

Thus we have:

Cost(q) = −0.0028q 2 + 14.353q + 968.13


Price(q) = 286.02q −0.453 .

Next, we follow our models to get equations for revenue and profit.

Revenue(q) = q ∗ Price(q) = q286.02q −0.453 = 286.02q 0.547


Profit(q) = Revenue(q) − Cost(q) = 286.02q 0.547 + 0.0028q 2 − 14.353q − 968.13.

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.

We see we have break-even points when q is 12.74 and 996.28. □

2.3.2 Discontinuous Functions


All of the functions above have graphs without breaks. In mathematical terms,
they are continuous functions. When we are modeling real world phenomena,
we also want to use functions that have breaks in the graph. Paint is typically
CHAPTER 2. BUSINESS APPLICATIONS 106

bought in gallon containers, so the price to paint a room is based on the


number of gallons rounded up to the next whole number. Many businesses will
give a volume discount to their best customers, so there is one price for small
quantities and a different price for large quantities. The cost of labor changes
if overtime pay is involved. In all of these cases, the graph has a break in it.
Excel has several discontinuous functions that are of use to us.

Function Example Value Notes


ROUND ROUND(2.347,1) 2.3 2.35 would round to 2.4
ROUNDDOWN ROUNDDOWN(2.99,0) 2.0 0 for digits rounds to integers
ROUNDUP ROUNDUP(-2.132,2) -2.14 Up is away from 0.
CEILING CEILING(3.14159,1.5) 4.5 Rounds up to a multiple of 1.5
FLOOR FLOOR(3.14159,2) 2 Rounds down to a multiple of 2.
IF IF(2 < 1,5,10) 10 The condition is false.
MIN MIN(1, 3, 5) 1 The minimum of a list of values.
MAX MAX(1, 3, 5) 5 The maximum of a list of values.

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

Figure 2.3.5 Video discussion of discontinuous functions in Excel


Example 2.3.6 Raw Materials in Blocks.
CHAPTER 2. BUSINESS APPLICATIONS 107

Standalone

Figure 2.3.7 Video presentation of this example


The raw material needed to build widgets is sold in blocks that will make
100 widgets. A block costs $1000. The labor cost for building a widget is $7.
The fixed costs for widget production is $10,000. Find a formula for the costs
of producing widgets. Find the cost of producing 998 and 1009 widgets. You
should also find the cost per unit at those quantities.
Solution. To make the worksheet easier to follow, we break costs into three
pieces, fixed costs labor costs, and materials costs. The fixed coasts are con-
stant, and the labor costs are linear. For the materials costs we need to use the
CEILING function to round the number of widgets up to the next even 100,
then divide by 100 to obtain the number of blocks of raw material we want to
buy.

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

IF(test condition, value if condition is true, value if condition is


false)

The values for true and false can be numbers, string, or formulas to evaluate.
Example 2.3.8 Computing Overtime Pay.

Standalone

Figure 2.3.9 Video presentation of this example


I am a bookkeeper at a small firm. Company policy pays the employees
time and a half for working more than 40 hours per week. I need to compute
the weekly pay of 5 employees. The employees worked 35, 42, 43, 38, and 42.5
hours. Their base pay rates were respectively $8, $9, $10, $11, and $12 an hour.
Compute the pay for each employee.
Solution. In setting up the worksheet, I will separate regular pay from over-
time pay. The regular pay is the base rate times the hours worked, unless the
employee worked more than 40 hours, in which case it is the base rate times 40.
Overtime pay is the base pay times 1.5 times the number of overtime hours.
Since overtime cannot be negative, we use the maximum of 0 and hours worked
minus 40.

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

Example 2.3.10 Market Equilibrium with Discontinuous Supply


Price.

Standalone

Figure 2.3.11 Video presentation of this example


In the widget market, the supply is constrained. Obtaining more than 2
widgets means using a more expensive process. My supply and demand curves
are:
DemandPrice(q) = 4 − q/2
(
1q/2 + 1 q ≤ 2
SupplyPrice(q) = .
1q/2 + 3 q > 2
Find the market equilibrium price.
Solution. We would like to find the place where the two curves cross. How-
ever when we look at a graph of the two functions we see that they never
meet.

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.

2.3.3 Reading Check


1. Reading check, Nonlinear Functions.This question checks your read-
ing comprehension of the material is section 2.3, Nonlinear Functions,
Costs, and Profit, of Business Calculus with Excel. Based on your read-
ing, 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 ln(x) is used for the natural log of x, or log base e.


B All real world cost functions are continuous.
C The CEIL command can be used to roundup.
D Excel does negation before exponentiation.

E The commands ROUND, ROUNDUP, and ROUNDDOWN can be


used interchangeably.
F For the FLOOR command we specify the number of digits past the
decimal point in the rounded number.

G In Excel ex is written EXP(x).


H The if construction can be used in Excel for a function with branches.
I For the ROUND command we specify the number of digits past the
decimal point in the rounded number.

J In the real world, the demand function is probably not linear.


K None of the above

2.3.4 Exercises 2.3 Nonlinear functions

Exercise Group. For Exercise 2.3.4.1–2.3.4.5, given the equations of the


supply and demand curves:
(a) Evaluate the curves at q0 .
CHAPTER 2. BUSINESS APPLICATIONS 111

(b) Find the market equilibrium.


1. Given SupplyPrice = 20 ∗ (1.1)(q/10) and DemandPrice = 50 ∗
(0.95)(q/10) , with q0 = 10.
Solution.
Formulas

Table

(a) At q0 = 10, supply = $22, and demand = $47.50


(b) Using Goal Seek we see that the equilibrium occurs at q = 62.5
and the price is $36.29
2. Given supply Price = 10 ∗ (1.05)(q/10) and DemandPrice = 60 ∗
(0.96)(q/10) , with q0 = 10.
3. Given ps = 5 ln(q + 10) and pd = 1000/(q + 10) − 2, with q0 = 40.
Solution.
Formulas

Table

Goal Seek
near q =
40

(a) At q0 = 40, supply = $19.56, and demand = $18


(b) Using Goal Seek we see that the equilibrium occurs at q = 37
and the price is $19.25
4. Given SupplyPrice = 10 ln(q+2) and DemandPrice = 60∗(0.90)(q/100) ,
with q0 = 6000.
5. Given (
20 ∗ (1.1)(q/10) q ≤ 50
SupplyPrice(q) =
20 ∗ (1.1)(q/10) q > 50
and
DemandPrice(q) = 50 ∗ (0.095)(q/10) ,
with q0 = 40.
Solution. For this problem our supply price function changes at
q = 50. This is indicated in the table by a thin blue column.
CHAPTER 2. BUSINESS APPLICATIONS 112

(a) At q0 = 40, supply = $29.28, and demand = $40.73


(b) The equilibrium occurs somewhere between q = 60 and q = 70.
Using Goal Seek we find that the equilibrium occurs for q =
62.43.

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.

(a) Using the trendline feature from Excel we get that

Supply = 0.0015x + 9.7518


Demand = 50.214e(−0.0001x) .

(b) See the tables below.

(c) See the tables below.


Formulas
entered
CHAPTER 2. BUSINESS APPLICATIONS 113

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

8. Given the data

Quantity 1009 1469 2041 2462 3002 3517 3979 3200


Supply price 98 106 112 120 1231 126
Demand price 160 144 116 102 82

and the assumption that supply price is linear and demand price is
exponential.

Exercise Group. For Exercise 2.3.4.9–2.3.4.15, for the given functions:


(a) Give the excel command that will produce the following function with
the assumption that x is in cell A2.

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

(b) The chart is produced by the following code.

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

(c) The graph is on the chart above.

(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) The Excel command is =5*CEILING(A2,0.5)


(b)

(c) The graph is on the chart above.


CHAPTER 2. BUSINESS APPLICATIONS 116

(d) The graph is discontinuous at multiples of .5

Exercise Group. Profit model with nonlinear models


For Exercise 2.3.4.16–2.3.4.24, given the equations of the cost and demand
price function:
(a) Find the revenue and profit functions.
(b) Evaluate cost, demand price, revenue, and profit at q0 .
(c) Find the first break-even point.
(d) Graph the profit function over a domain that includes the first break-even
point. Add a textbox and label to identify the break-even point.
16. Given DemandPrice = 30 ∗ (0.95)Quantity/10 and Cost = 3Quantity +
100, with q0 = 6.
17. Given DemandPrice = 40 ∗ (0.90)(q/10) and Cost = 10q + 200, with
q0 = 10.
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)

18. Given DemandPrice = −q/10 + 50 and Cost = −2(q/1000)2 + 10q +


1000, with q0 = 300.
19. Given Price = 47 ∗ (0.96)(q/11) and Cost = −2(q/1000)2 + 17q + 1234,
with q0 = 59.
Solution.
(a)
Revenue = q ∗ 47(0.96)q/11
CHAPTER 2. BUSINESS APPLICATIONS 117

q 2
Profit = q ∗ 47(0.96)q/11 + 2( ) − 17q − 1234
1000

(b) Using Excel we get

(c) Using q = 60 as the basis, using Goal Seek gives the value of our
first break-even point as being 59.75.

(d)

20. Given demand price is an exponential function and cost is a quadratic


function fitting the data below and that q0 = 75.

Quantity 100 130 160 190 220 250


Demand price 48 41 35 30 26 22
Cost 3000 3280 3560 3860 4160 4470
21. Given demand price is an exponential function and cost is a quadratic
function fitting the data below and that q0 = 300.

Quantity 200 600 1000 1400 1800 2200


Demand price 190 171 155 140 126 114
Cost 30000 69600 109000 148000 186800 225200
Solution. Using Excel trendlines, we use the polynomial of order 2
approximation for cost:
Cost = −0.0009x2 + 99.864x + 10050.
We use the exponential approximation for demand price:
DemandPrice = 199.78e(−0.0003x) .
(a)
Revenue = x ∗ 199.78e(−0.0003x)
Profit = x ∗ 199.78e(−0.0003x) − (−0.0009x2 + 99.864x + 10050).

(b) Recreate the table, but now with the functions we found:
CHAPTER 2. BUSINESS APPLICATIONS 118

We can add another column to find the values of the respective


functions when q0 = 300.
Demand price = $ 182.59, cost = $39,928.20, revenue =
$54,775.55 and profit = $14,847.35.

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

Quantity 200 600 1000 1400 1800 2200


Demand price 140 120 100 80 60 40
Cost 31600 52400 70000 84400 95600 103600
23. Given (
100 − q/10 q ≤ 50
DemandPrice(q) =
95 − q/20 q > 50
and (
3000 + 50q q ≤ 100
Cost(q) = .
3000 + 47q q > 100
with q0 = 200.
Solution.
(a)
(
q ∗ 100 − q 2 /10 q ≤ 50
Revenue(q) =
95q − q /20
2
q > 50
CHAPTER 2. BUSINESS APPLICATIONS 119

q ∗ 100 − q /10 − 50q − 3000 q ≤ 50
 2

Profit(q) = 95q − q 2 /20 − 50q − 3000 50 < q ≤ 100




95q − q /20 − 47q − 3000
2
q > 100

(b) Cost = $12,400, demand price = $88, revenue = $17,600, and


profit = $5200

(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

Rate of Change and Deriva-


tives

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.

3.1 Marginal Functions and Difference Quotients


Link to worksheets used in this section1
There are a number of industries where it is common for people to pay sig-
nificantly different prices for the same product from the same vendor. (Airline
tickets, symphony seats, and doughnuts at different times of the day come to
mind.) The reason is generally not favoritism or an irrational vendor, but an
analysis that looks at the change in costs and profits for making an additional
sale. Flying a plane with 51 passengers does not cost much more than flying
the same plane with 50 passengers. The same is true when playing a sym-
phony. Selling an extra doughnut at half price, just before closing when you
would have to throw the doughnut out, adds to the profit. In all of these cases,
we are less concerned with total revenues and profits and more concerned with
how things change with one more sale.
In finance and economics this issue is dealt with using marginal functions.

3.1.1 Marginal Functions


Definition 3.1.1 Marginal value. If f (x) is a function (i.e., cost, revenue,
or profit), we define the marginal value of f (x) to be the change in f (x) as
x increases by 1. Thus

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

is phrased in terms of change associated with producing one more. I am more


concerned about deciding about what I should do rather than looking at what
I have already done. The usual functions with related marginal functions are
Cost, Revenue, and Profit.

• Marginal Cost at x, or MarginalCost(x + 1) is the change from Cost(x)


to Cost(x + 1):

MarginalCost(x + 1) = Cost(x + 1) − Cost(x).

• MarginalRevenue(x+1) is the change from Revenue(x) to Revenue(x+1):

MarginalRevenue(x + 1) = Revenue(x + 1) − Revenue(x).

• MarginalProfit(x + 1) is the change from Profit(x) to Profit(x + 1):

MarginalProfit(x + 1) = Profit(x + 1) − Profit(x).

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

Figure 3.1.3 Video presentation of marginal revenue for widgets


For my widget company, I have determined that the cost and demand price
functions are:

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

I set up my worksheet to compute these values.


CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 122

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.

MarginalCost(11) = Cost(11) − Cost(10) = 85.1 − 80 = 5.1


MarginalRevenue(11) = Revenue(11) − Revenue(10) = 269.5 − 250 = 19.5
MarginalProfit(11) = Profit(11) − Profit(10) = 184.4 − 170 = 14.4

MarginalCost(26) = Cost(26) − Cost(25) = 185.6 − 177.5 = 8.1


MarginalRevenue(26) = Revenue(26) − Revenue(25) = 442 − 437.5 = 4.5
MarginalProfit(26) = Profit(26) − Profit(25) = 256.4 − 260 = −3.6.


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

Figure 3.1.7 Video presentation of this example


The function Profit(q) = −q 2 /20 + 100q − 1000 expresses the profit at my
gadget factory. Plot both profit and marginal profit together to estimate both
the maximum profit at the factory, as well as the quantity I should produce to
get that profit.
Solution. In setting up the spreadsheet, there are some details to notice.

Since Excel does negation before powers, I need parentheses so −(q 2 ) is


evaluated correctly. Since I suspect I will have to look at a large range of
numbers to find the maximum, I put Profit(q) and Profit(q + 1) as separate
columns. This keeps my marginal operation in a single row and allows com-
putation of Marginal Profit without evaluating for every value of q. We now
look at the graph with both Profit and Marginal Profit. To make the graph
easier to read, a secondary axis is used for profit. This allows us to see where
Marginal Profit crosses the axis.

We see that profit reaches a maximum where marginal profit is zero. This
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 124

occurs approximately when q is approximately 1000. In that case the profit is


about $50,000. Looking back at the numbers in the spreadsheet, we see that
the maximum profit is closer to $49,000.


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

Figure 3.1.9 Video presentation of this example


I have the following data on profit and production level for widgets.

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

3.1.2 Difference Quotients and Average Rate of Change


The marginal value, M f (x + 1), of a function f (x), measures the amount of
change from f (x) to f (x + 1). It can also be understood as a special case of
the average rate of change of f (x).

It is easy to see that the average rate of change of f (x) as x goes


from a to b is
f (b) − f (a)
.
b−a

There are a number of situations where we want to look at average rate


of change for a period of some other change in the variable. We may have
production in thousands or millions of units. If we are looking at monthly or
quarterly financial records, we may want to look at the average rate of change
over a year to take into account the seasonal variation of production.
Example 3.1.10 Rate of Change when denominator is not 1.

Standalone

Figure 3.1.11 Video presentation of this example


We have the following monthly sales data on gizmos.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 126

We want to find the rate of change of monthly sales. If we look at a graph


of the sales data:

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.

3.1.3 An Excel Trick for Difference Quotients

Standalone

Figure 3.1.12 Video presentation of this topic


When creating marginal functions or other difference quotients, we often
want the computations kept in one row, particularly if we want to graph the
function and the marginal function together. A careful arrangement of the
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 127

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

3.1.4 Reading Check


1. Reading check, Marginal Functions and Difference Quo-
tients.This question checks your reading comprehension of the material
is section 3.1, Marginal Functions and Difference Quotients„ 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 Marginal Cost at x, or Marginal Cost(x+1) is the change from


Cost(x) to Cost(x+1).
B Marginal Profit(x+1) is the change from Profit(x) to Profit(x+1).

C Marginal functions are difference quotients with denominator 1.


D The marginal value of f (x) is defined to be the change in f (x) as x
increases by 1.
E Marginal Revenue(x) is the change from Revenue(x) to Rev-
enue(x+1).

F None of the above

3.1.5 Exercises: Marginal Functions and Difference Quo-


tients Problems
1. If Revenue(q) = 5q, what is the marginal revenue from selling the 10th
item?
Solution. The marginal revenue would be given by

MarginalRevenue(10) = Revenue(10) − Revenue(9)


= 50 − 45 = 5.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 128

The marginal revenue from selling the 10th item is $5.


2. If Profit(q) = −100 + 5q − 0.01q 2 , what is the marginal profit from selling
the 20th item?
3. If Cost(q) = 100 + 7q, what is the marginal cost from selling the 30th
item?
Solution. The marginal cost would be given by

MarginalCost(30) = Cost(30) − Cost(29)


= 310 − 303 = 7

The marginal cost from selling the 30th item is $7.


p
4. If Revenue(q) = −500 + 7q − 0.01 q 3 , what is the marginal revenue from
selling the 100th item?
5. If Cost(q) is a constant function what can you say about the marginal
cost function? (Use algebra to find a formula for the marginal function.)
Hint. MarginalCost(q + 1) = Cost(q + 1) − Cost(q)
Solution. MarginalCost(q + 1) = Cost(q + 1) − Cost(q), but the cost
function is equal to some constant, so cost(q + 1) = cost(q). This implies
that the Marginal Cost function must be 0.
6. If Revenue(q) is a linear function with slope m, what can you say about
the marginal revenue function? (Use algebra to find a formula for the
marginal function.)

Exercise Group. For Exercise 3.1.5.7–3.1.5.12:


(a) Make a chart of the function and the marginal function as q goes from 0
to 30.
(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) 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.

(a) Recall that MarginalCost(q + 1) = Cost(q + 1) − Cost(q).


The entries in the cells should be

(See part b for some of the values)

(b) Partial table and the graphs:


CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 129

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

(a) Recall that MarginalRevenue(q + 1) = Revenue(q + 1) −


Revenue(q)
The entries in the cells should be

(See part b for some of the values)


(b) Partial table and the graphs:

(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

10. Let Profit(q) = −2q 2 + 100q − 500.


11. Let Cost(q) = q 3 − 4.5q 2 + 60q + 100.
Solution.
(a) Recall that MarginalCost(q + 1) = Cost(q + 1) − Cost(q).
The entries in the cells should be

(See part b for some of the values)

(b) Partial table and the graphs:

(c) The table and the graph indicate that the marginal function is
a quadratic function.

(d) MarginalCost(q) = 3q 2 − 6q + 56.5


(e) The Cost function is always increasing.
(f) The marginal function is always positive.
12. Let value(q) = 100(0.9)q .

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:

Quantity 30 48 73 149 177


Profit 447 561 669 801 759

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.

(c) The Marginal Profit function seems to be a straight line with


negative slope.

(d) In a textbox, describe your conclusions about the sign of the


marginal function and the rising or falling of the original func-
tion.
14. Assume Profit(q) is a polynomial function of degree 2 and that you
have the following data:

Quantity 105 203 349 535 644


Profit 339 1535 2429 2035 1029
15. Assume ResaleValue(q) is an exponential function and that you have
the following data:

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 .

(b) Using the following Excel commands


CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 132

(c) Marginal Resale Value seems to be an exponential function


(d) It appears that Marginal Resale Value is always negative and
Resale value is always decreasing.
16. Assume RetirementBalance(q) is an exponential function and that you
have the following data:

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.

Marginal Revenue is the change in revenue each month. This gives us


some idea of what is happening each month, but does not give a very clear
picture of overall trends.
The average rate of change over a 12-month time span would be

Revenue(13) − Revenue(1) 360 − 300


Average rate of change = = = 5.
13 − 1 12
The overall growth over an entire year gives a better indication of trends.
And the comparison over a year indicates a slight growth on average by
$5/month.
18. Historical data for quarterly revenue reports for Microsoft can be
found online. (A good source is http://www.microsoft.com/investor/
EarningsAndFinancials/TrendedHistory/default.asp2 .) Plot 5 years of
data.

(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

(b) Explain how to adjust for this problem.

3.2 Numeric Derivatives and Limits


Link to worksheets used in this section1
In the previous section, we looked at marginal functions, the difference
between f (x + 1) and f (x). For functions that are only defined at integer
values, this is the obvious way to define a rate of change. However for functions
that are defined on an interval, we would like to use the information at values
closer to our value of x.
Intuitively, we would like to be able to zoom in on the graph of f (x) at a
point until the graph looks like a straight line, then pick two points on that
line, and find the slope as the rise over the run. The rate of change is then the
slope of the line we have found. If we could zoom arbitrarily close, this process
would give an instantaneous rate of change, or the derivative of the function
at that point.
Definition 3.2.1 Formal derivative at a point. For a function f (x), the
instantaneous rate of change of f (x) at x = x0 , or the derivative of f (x), at
x = x0 , denoted as f ′ (x), is defined as

f (x0 + ∆x) − f (x0 )


f ′ (x0 ) = lim ,
(∆x→0) ∆x

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

Figure 3.2.3 Simple Derivative at a Point


Solution 1 (Solution A - Intuitive Definition). We start with our intuitive
notion. We want to look at the graph of f (x), zoomed in far enough that the
graph looks like a straight line. I set up a worksheet to look at the graph of
2 http://www.microsoft.com/investor/EarningsAndFinancials/TrendedHistory/

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

f (x0 + ∆x) − f (x0 )


.
∆x
For this example x0 = 1. If ∆x = 1, we can see that the function and the
secant line are clearly distinct.

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.

We will use the default on calculators, that is we will use ∆x = 0.001.

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.9 Video Grophing a function and its derivative


Example 3.2.10 A Function and its Derivative. Compare the graph of
f (x) = x2 − 2x + 1 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. Since this problem will serve as a template for a question we will
look at many times, it is worthwhile to look at it in detail. We start by setting
up a workbook that will have the structure we need to compute a chart of
values for f (x) and f ′ (x).

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

Figure 3.2.14 Video presentation of this example


Use trendlines to find a formula for the derivative of f (x) = 2x2 + 5x − 7.
Solution. The setup for this example is very similar to the last problem. We
simply change the function. This involves changing the formulas in cells B1
and D5, then using quick copy to change the formulas for the cells in columns
D through F.

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

A Note on Terminology. It is worthwhile to point out some ambiguity


in the terms used in this section and the previous section. We have been us-
ing the term Marginal f (x + 1) for the change f (x + 1) − f (x), where f (x),
might be revenue, or cost, or profit. This is the standard definition of a mar-
ginal function from finance or economics. However, if you do a web search on
“calculus marginal revenue” you will find that most calculus books treat the
marginal function as simply another name for the derivative. While they are
related, they are not the same thing. In the next chapter, we will find that
it is often easier to produce a formula for the derivative of a function rather
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 140

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.

Summary. The notion of derivative is one of the key concepts of calculus.


The concept of the derivative of a function is closely connected to the concept
of marginal function. We gave three ways of understanding the derivative of a
function at a point.

Intuitive The derivative of f (x), at x = x0 denoted as f ′ (x0 ), is


understanding the slope of the line obtained by zooming in on the graph
at (x0 , f (x0 )) until it looks like a straight line.
Formal The derivative of f (x), denoted as f ′ (x), is defined as
definition
f (x + ∆x) − f (x)
f ′ (x) = lim .
∆x→0 ∆x
The calculator The derivative of f (x), can be approximated using the
approximation formula
f (x + .001) − f (x − 0.001)
f ′ (x) ≈ .
.002

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.

A The calculator definition of derivative approximates f ′ (x) by (f (x +


0.001) − f (x − 0.001))/(0.002).
B If the derivative of f (x) is negative, the graph of the function f (x),
is increasing.
C The calculator definition of the derivative gives a good approxima-
tion for all functions.).
D If the derivative of f (x) is positive, the graph of the function f (x),
is increasing.
E The calculator definition of derivative has problems with corners
and cusps.

F For a function f (x), the derivative f ′ (x) is defined as the limit as


del x approaches 0 of (f (x + del x) − f (x))/(del x).
G None of the above

Exercises: Numeric Derivatives and Limits

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.

Excel Commands Excel Output


Change ∆x (delx) and x-value given depending on the problem, and adjust
the function and the rest will autofill. Once the graph has been added that
will update as well.
1. Use f (x) = x2 + 3 at x = 2.
Solution.
(a) Using Slope= (B14-B4)/(10*B1) we get the following

So the slope for this choice of delx is 4.


Your may have chosen a slightly different ∆x, and as long as the
graph looks roughly linear that would be fine.
(b) You can either change delx and record each of the slopes in the
Excel sheet above, or we can set up another table that records
the slopes for us. We prefer the second method because the
table of values allows us to inspect the pattern more easily.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 142

Excel commands for the table:

The limit is 4.
(c)
f (x + 0.001) − f (x − 0.001)
f ′ (x) ≈
0.002

So f ′ (x) ≈ f (2+.001)−f (2−.001)


.002 = 4 (second entry in the table for
delx).
(d)
Marginal f (x + 1) = f (x + 1) − f (x).
Marginal f (2 + 1) = f (3) − f (2) = (9 + 3) − (4 + 3) = 5.
2. Use f (x) = (3x)2 − 5 at x = −2.
3. Use f (x) = 5(x − 2)2 at x = 3.5.
Solution.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 143

(a)

The slope of the secant line is 15.


(b) From work in part a, the limit is also 15.
(c) From Row 21 we see that the slope of the tangent line is esti-
mated to be 15
(d)

Marginal f (4.5) = f (4.5) − f (3.5)


= 5(2.5)2 − 5(1.5)2 = 5(6.25 − 2.25) = 20.

So the derivative is 15 and the marginal function is 20 at this


point.
4. Use f (x) = 7 at x = 5.
5. Use f (x) = 7x − 4 at x = 3.
Solution.
(a)

The slope of the secant line is 7.


(b) From work in part a, the limit is also 7.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 144

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

The slope of the secant line is 14.78.


(b) From work in part a, the limit is also 14.78.
(c) From Row 21 we see that the slope of the tangent line is esti-
mated to be 14.78
(d)
Marginal f (2) = f (2) − f (1) = e4 − e2 ≈ 47.21.
Comment: Notice the very large difference between the deriva-
tive and the marginal function. The exponential function is very
curved and this curvature means that the discrepancy between
the marginal function and the derivative will be large. The dif-
ference between the two is much smaller for graphs that are less
curved.
8. Use f (x) = 2x at x = 3.
9. Use f (x) = ln(x) at x = 5.
Solution.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 145

(a)

The slope of the secant line is 0.2.


(b) From work in part a, the limit is also 0.2.
(c) From Row 21 we see that the slope of the tangent line is esti-
mated to be 0.2

(d)
Marginal f (6) = f (6) − f (5) = ln(6) − ln(5) ≈ 0.18.
10. Use f (x) = x3 − 5 at x = 2.

Exercise Group. For each specified function, do the following:


(a) On a single graph, but using separate axes, graph the function and its
derivative.
(b) Using goal seek, identify places where the derivative is 0 in the interval
−10 < x < 10.
(c) For each point where the derivative is 0, tell whether the corresponding
point on the graph of the function is locally a maximum, minimum, or
neither.
11. Let f (x) = x3 − 4x.
Solution.

(a)

(b) The derivative seems to be zero at x = −1.15 and at x = 1.15.


(c) We have a local maximum at x = −1.15 and a local minimum
at x = 1.15.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 146

12. Let f (x) = x4 − 49x2 .


13. Let f (x) = x4 − 7x3 .
Solution.

(a)

(b) The derivative seems to be 0 when x = 0 and x = 5.25.


(c) It seems that the graph has a minimum at x = o. It seems that
the graph has neither at x = 5.25.
14. Let f (x) = 5xe−x .
15. Let f (x) = 8xe−x .
2

Solution.
(a)

(b) It looks like the derivative is 0 at x = −0.707 and at x = 0.707.


(c) The first of those points is a local minimum. The second point
is a local maximum.
16. Let f (x) = 3x + 5.
17. Let f (x) = π 2 .
Solution.
(a)

(b) The derivative is always 0 for this function.


(c) All points are both local maximums and local minimums.
18. Let f (x) = x3 − 4x.

Exercise Group. For each specified function, do the following:


CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 147

(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) Add a trendline to produce a formula for the derivative.


19. Let f (x) = x3 − 6x2 + 3x.
Solution.
(a)

(b) The derivative looks like a polynomial of order 2. It is a


parabola.
(c) The trendline indicates the formula for the derivative can be
approximated by
y = 3x2 − 12x + 3.
20. Let f (x) = x4 − 36x2 + x.
21. Let f (x) = e3x .
Solution.
(a)

(b) The derivative looks like an exponential function.

(c) The trendline indicates the formula for the derivative can be
approximated by
y = 3e3x .
22. Let f (x) = ln(x).

3.3 Local Linearity


Link to worksheets used in this section1
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/

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.

linear fa (x) = f (a) + mf (a + 1) ∗ (x − a).

In the differentiable case, given a function y = f (x), where we know value


of, f ′ (a), the derivative of f (x) at x = a, then our linear approximation has
the form:

Linear fa (x) = f (a) + f ′ (a) ∗ (x − a).

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:

discrete linear profita (x) = Profit(a) + MarginalProfit(a + 1) ∗ (x − a).

Filling in the values from the problem yields:

discrete linear profit10000 (x) = 487253 + 45 ∗ (x − 10000)


discrete linear profit10000 (10013) = 487253 + 45 ∗ (13) = 487838.

Thus we estimate the profit from selling 10013 gizmos to be $487,838. □


Example 3.3.2 Estimating square roots.

Standalone

Figure 3.3.3 Video on linear aproximation of square roots



Use information about f (x) = x near x0 = 100 to estimate the square
roots of 96 through 104. Check the accuracy of your approximations.
Solution. We first use Excel to find the value of the function and its deriva-
tive at 100. For the derivative we use the calculator approximation.

Thus, the linear approximation is

Linear f (x) = f (100) + f ′ (100)(x − 100)


= 10 + (0.05)(x − 100).

We can set up the worksheet to compute the approximation and to give us


the error, both as a number and as a percentage of the correct answer.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 150

It is then straightforward to compute values and check accuracy. On the


given domain, the linear approximation has an error under 0.03%. □
Example 3.3.4 Estimating reciprocals.

Standalone

Figure 3.3.5 Video presentation of this example


Use information about f (x) = 100/x near x0 = 400 to estimate the reci-
procals of the integers from of 396 through 404. Check the accuracy of your
approximations.
Solution. Once again, we use Excel to find the value of the function and its
derivative at 400. For the derivative we use the calculator approximation.

Thus the linear approximation is

Linear f (x) = f (400) + f ′ (400)(x − 400)


= .25 + (−0.000625)(x − 400).
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 151

It is then straightforward to compute values and check accuracy. On the


given domain, the linear approximation has an error under 0.01%. □
Example 3.3.6 Estimating exponential functions.

Standalone

Figure 3.3.7 Video presentation of this example


For approximating interest with continual compounding it is useful to have
a linear approximation of f (r) = exp(r) when r is close to 0. Use information
about f (r) = exp(r) near r0 = 0 to estimate the exponential function for
numbers near 0. Check the accuracy of your approximations and give a domain
where the approximation is good enough to use.
Solution. Once again, we use Excel to find the value of the function and its
derivative at 0. For the derivative we use the calculator approximation.

Thus the linear approximation is

Linear f (x) = f (0) + f ′ (0)(r − 0)


= 1 + (1)(r).

This is much easier to compute than the exponential function. However,


when we check accuracy, we find that it is not very accurate for other integer
values.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 152

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.

A In the differentiable case, the the linear approximation is the tangent


line.
B In the discrete case, the linear approximation is a secant line.
C For a function f (x), the discrete linear approximation of f (x) at a
is f (a) + mf (a + 1) ∗ (x − a) where mf (a + 1) is the marginal change
of f (x( form a to a + 1.

D In the discrete case we look at the the linear approximation is the


tangent line.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 153

E Linear approximations can always be used for values within 5 of the


base point.
F For a function f (x), the linear approximation of f (x) at a is f (a) +
f ′ (a) ∗ (x − a) where f ′ (a) is the derivative of f (x( at a .
G One of the reasons for looking at the linear approximation of a func-
tion is that linear functions are easy to evaluate.
H None of the above

Exercises: Local Linearity


Exercise Group. For Exercise 3.3.1–3.3.5, for the given function and value
for x0 :
(a) Give the formula for the discrete linear approximation.
(b) Evaluate the approximation at x1 .
1. x0 = 10, f (10) = 50, mf (11) = 6, and x1 = 15.
Solution.

f (x) ≈ f (10) + mf (11) ∗ (x − 10)


f (x) ≈ 50 + 6 ∗ (x − 10).

Next we evaluate the linear approximation at 15:

f (15) ≈ 50 + 6 ∗ (15 − 10) = 50 + 30 = 80.


2. x0 = 15, Profit(15) = 50, MarginalProfit(16) = 2, and x1 = 6.
3. x0 = 20, f (19) = 191, f (20) = 200, f (21) = 210, and x1 = 28.
Solution.
f (x) ≈ f (20) + mf (21) ∗ (x − 20).
Note that we have to compute mf (21).

mf (21) = f (21) − f (20) = 210 − 200 = 10


f (x) ≈ 200 + 10 ∗ (x − 20).

Next we evaluate the linear approximation at 28:

f (28) ≈ 200 + 10 ∗ (28 − 20) = 200 + 80 = 280.


4. x0 = 50, Revenue(49) = 1007, Revenue(50) = 1000, Revenue(51) =
994, and x1 = 45.
5. x0 = 100, cost(99) = 3740, cost(100) = 3743, cost(101) = 3754, and
x1 = 112.
Solution.
Cost(x) ≈ Cost(100) + MarginalCost(101) ∗ (x − 100).
Note that we have to compute MarginalCost(101)
MarginalCost(101) = Cost(101) − Cost(100) = 3754 − 3743 = 11
cost(x) ≈ 3743 + 11 ∗ (x − 100).
Next we evaluate the linear approximation at 112:
Cost(112) ≈ 3743 + 11 ∗ (112 − 100) = 3743 + 132 = 3875.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 154

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

(c) Hence at x1 = 85 we get

g(85)/approx9+0.056∗(85−81) = 9+0.056∗4 = 9+0.23 = 9.23.



(d) If we compute 85 = 9.22, we see that the approximation is
fairly good.
The error is |real value − approximation| = |9.22 − 9.23| =
|−0.01| = 0.01.
8. Profit(x) = −x2 /10 + 3000x − 7862, x0 = 2000 and x1 = 2050.
9. Revenue(x) = x ∗ ln(x), x0 = 3000 and x1 = 3100.
Solution.
(a)
Revenue(x) ≈ Revenue(3000) + Revenue′ (3000) ∗ (x − 3000).

Note that Revenue(3000) ≈ 24019 and


Revenue(3000.001) − Revenue(2999.999)
Revenue′ (3000) ≈ = 9.00636.
0.002

(b)
Revenue(x) ≈ 24019 + 9.00636 ∗ (x − 3000).

(c) Hence at x1 = 3100 we get


Revenue(3100)/approx24019+9.00636∗(3100−3000) = 24919.7.

(d) If we compute Revenue(3100) = 24921.4, we see that the ap-


proximation is fairly good.
The error is |real value − approximation| = |1.66485| = 1.66485.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 155

10. cost(x) = (x ∗ ln(x))/2 + x2 /300, x0 = 3000 and x1 = 3100.


11. Let f (x) = (1 + x)r and x0 = 0.

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

(a) The linear approximation of f (x) at x = 0 is f (0) + f ′ (0)(x). For


all values of r we have f (0) = 1. As the table shows when r =
1/3, 1/2, −1 and 2, we have f (x) ≈ 1 + rx

(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

Example 3.4.1 Profit function for widgets.

Standalone

Figure 3.4.2 Video presentation of this example


We have determined that the profit function for selling widgets is

Profit(Quantity) = Quantity ∗ (400 − Quantity) − 5000,

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

Figure 3.4.4 Video presentation of this example


We have determined that the profit function for selling cumquat oil is

Profit(Quantity) = (10Quantity − 20) ∗ exp(−Quantity/50) − 10.

We understand that the function is valid on the interval 0 ≤ Quantity ≤


400, where the quantity is measured in thousands of pints and profit is measured
in thousands of dollars. Find the minimum and maximum profit in the given
interval.
Solution. The spreadsheet is set up like it was in the first example, but with
the function changed.

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

Figure 3.4.6 Video presentation of this example>


A plant can produce between 150 and 300 gizmos. The profit function for
the plant is:

Profit(Quantity) = 4Quantity2 − 1300Quantity + 125000.

Find the production level that maximizes profit.


Solution. We set up the problem as before, using goal seek on the derivative
to find critical points, and checking the ends of the interval.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 159

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

Figure 3.4.8 Video presentation of this example


I am manufacturing goop, a liquid that needs to be put in cans. We will
use cans that have a standard cylindrical shape. Find the height and radius of
a 1 liter can that uses a minimal amount of metal surface.

Solution. Using basic geometry we recall the formulas for the volume and
surface area of a cylinder.

volume = πradius2 ∗ height


area = 2πradius2 + 2π ∗ radius ∗ height.

Since I am measuring volume in liters, I want to measure radius and height


in decimeters so the units work correctly. In order to optimize, we need to
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 160

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

Figure 3.4.10 Video presentation of this example


CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 161

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

Profit(q) = −1.002q 2 + 477.22q = 6720.9.

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

Figure 3.4.12 Video presentation of this example


We are running a business and want to minimize equipment expenses. For a
particular piece of equipment the costs can be broken into initial outlays to buy
the equipment, fixed annual expenses to keep the equipment in the inventory,
and repair costs which we anticipate rising as the equipment gets older. A
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 162

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.

A When a curve has a point that is a maximum or minimum for the


whole domain, we call it an absolute maximum or minimum.

B We cannot have an extremum at an interior point of the domain if


the derivative is nonzero.
C When a curve has a point that is a maximum or minimum in some
interval around the point, we call it a relative maximum or mini-
mum.

D We can only have extrema at a critical point, a place when the


derivative is zero or undefined, or at an endpoint.
E At points where the derivative is zero we must have a relative max-
imum or minimum.

F Every function must have an absolute maximum.


G The process for optimization is to find all the candidate points, then
to see which gives the highest and lowest values.
H In a business setting, we are often concerned with finding the max-
imum and minimum values of a function, because one or the other
will be a best, or optimum value.
I None of the above
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 163

Exercises: Optimization

Exercise Group. For the given function and domain:

(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

The global minimum value is −4127 at x = 50.


The global maximum value is 59.13 at x = 4.25
2. g(x) = −3x2 + 18x + 25 on the interval 10 ≤ x ≤ 50.
3. h(x) = x3 − 9x + 12 on the interval 0 ≤ x ≤ 10.
Solution.
(a)

(b) The place where f ′ (x) = 0 is at x = 1.73.


The function f is decreasing for 0 < x < 1.73.
The function f is increasing for 1.73 < x < 10.

(c) The function has a local minimum at (1.73, 1.61).


The function has a local maximums at (0, 12) and (10, 922).
(d) To find the global maximum and minimum we check the end-
points and the critical points.

x f (x) status
0 12
1.73 1.61 minimum
10 922 maximum

The global minimum value is 1.73 at x = 1.61.


The global maximum value is 922 at x = 10
4. k(x) = x3 − 6x2 + 12x + 5 on the interval 0 ≤ x ≤ 10.
5. m(x) = 5x + 9 on the interval −10 ≤ x ≤ 30.
Solution.
(a)

(b) The derivative is never zero


The function m(x) is always increasing for −10 < x < 30
(c) The function has a local minimum at (−10, −41) and a local
maximum at (30, 159).
(d) The global minimum value is −41 at the left endpoint x = −10.
The global maximum value is 159 at the right endpoint x = 30
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 165

6. n(x) = 42 on the interval 0 ≤ x ≤ 10.


7. f (x) = (x − 3) exp(−0.02x) on the interval 0 ≤ x ≤ 100.
Solution.
(a)

(b) The place where f ′ (x) = 0 is at x = 52.95


The function f is increasing for 0 < x < 52.95.
The function f is decreasing for 52.95 < x < 100
(c) The function has a local max at x = 52.95 and the maximum
value is 17.32
The function has a local minimum at (0, −3) and (100, 13.13).
(d) To find the global maximum and minimum we check the end-
points and the critical points

x f (x) status
0 -3 minimum
52.95 17.32 maximum
100 13.13

The global minimum value is −3 at x = 0.


The global maximum value is 17.32 at x = 52.95
8. g(x) = (x3 − 9x)exp(−0.1x) on the interval0 ≤ x ≤ 100.
9. h(x) = 100/x + 5x on the interval 1 ≤ x ≤ 50.
Solution.
(a)

(b) The place where f ′ (x) = 0 is at x = 4.47


The function h is decreasing for 1 < x < 4.47.
The function h is increasing for 4.47 < x < 50

(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

The global minimum value is 44.73 at x = 4.47.


The global maximum value is 252 at x = 50
10. k(x) = 75/x + 3x2 on the interval 1 ≤ x ≤ 50.
11. The demand price for widgets is given by Price(q) = 300 − 0.5q. The fixed
costs are $7,500 and the variable costs are $10 per widget.

(a) Give a profit function for widgets. Specify the domain on which the
function makes sense.

(b) Identify the candidate points for maximizing profit.


(c) Give the quantity that maximizes profit along with the maximum
profit.

Solution. Preliminary work: find the formulas for price (given) and cost
(described).

Price(q) = 300 − 0.5q


Cost(q) = 10q + 7, 500.

(a)

Profit(q) = Revenue(q) − Cost(q)


= 300q − 0.5q 2 − 10q − 7500
= −0.5q 2 + 290q − 7500.

One assumption that makes sense is that the price should be posi-
tive.

Price(q) = 300 − 0.5q > 0


−0.5q > −300
q < 600

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

Profit(q) = Revenue(q) − Cost(q)


= q ∗ 100/(1 + .01q) − (1000 + 2q + .0001q 2 ).

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.

√ is Cost(q) = 10000 + 10q and the demand


14. The cost equation for gizmos
function is Price(q) = 100/ 1 + .01q. Find the maximum profit.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 168

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

AnnualExpense(t) = (PurchasePrice)/t + RepairFactor ∗ tr ,

where r is a positive number that depends on the type of property. Assume


for carpet cleaners that the replacement cost is $600, that the repair costs
in the first year are $50, and r = 1. Find the length of time the property
should be held to minimize the annual expense.
Solution. In this instance the Annual Expense function is

AnnualExpense(t) = 600/t + 50 ∗ t1 = 600/t + 50t.

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.

Production level 1903 2424 3065 3424 4076


Profit $828,560.10 $942,625.40 $1,006,167.50 $987,980.40 $929,780.40

(a) Plot the data and find a reasonable best fitting curve for the data.

(b) Find the production level that maximizes profit.


(c) Find the maximum profit.

3.5 An Introduction to Solver


Link to worksheets used in this section1
We should expect, whenever we look at an operation that is used a lot in
the business world, that Excel will have a fairly simple command to achieve
the result. In section 1.5, we introduced Goal Seek, a tool that is part of Excel,
and that can be used to solve an equation for a root from a given starting
point. In the last section, we noted that one can find candidates for a local
maximum or minimum of a function by finding the derivative and using Goal
Seek to find where the derivative is 0. In this section we introduce Solver, an
Add-In to Excel. It is easiest to think of solver as a more powerful version of
Goal Seek. It will be easiest to walk through the use of Solver while working
an example.
Example 3.5.1 Use Solver to gather information about the graph.
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/

Section-3-5-Examples.xlsx
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 170

Standalone

Figure 3.5.2 Using Solver on a simple function


Let f (x) = 9x − x2 + 7 on the interval −1 ≤ x ≤ 14.
Solution. As always, we start by using simpler tools. In this case it is useful
to have Excel sketch a graph and to use information we gathered in prior course.
From the form of the function we know the graph is a parabola that points
downwards.

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.

As with Goal Seek, if we use Solver again, starting with x closer to 9, we


will find a solution x = 9.72015.
We introduce Solver because it can do things would be more difficult with
Goal Seek. From the graph, and our knowledge or parabolas, we know the
graph has a single maximum. To find the maximum with Goal Seek, we need to
realize that the maximum occurs when the derivative is 0, define the numerical
derivative, then set the derivative equal to 0. With Solver, we simply ask it to
find the maximum. It finds the vertex at x = 4.5.

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

Example 3.5.8 A deceptive graph.

Standalone

Figure 3.5.9 Video presentation of this example


Use solver to gather information, on the interval 0 ≤ x ≤ 15, on the graph
of f (x) = (x3 − 4x2 + 4x + 3)e(−x/2) .
Solution. As always, start by looking at a graph.

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

This function can be used to illustrate a limitation of our method. If we


had graphed the functions at intervals at intervals of size 1 rather than 0.5, we
get a different picture.

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

Figure 3.5.11 Video presentation of this example


CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 175

Use solver to gather information, on the interval −2 ≤ x ≤ 2, on the graph


of (
−5x − 3 x < 0
f (x) = .
4(x − 1)2 x > 0

Solution. As always, start by looking at a graph. We use the IF function to


produce cases.

It is pretty easy to see that the function reaches a maximum of 7 at x = −2,


and has a root at x = −0.6. On this interval the function does not have a
minimum, but it gets close to -3 when x approaches 0 from the negative side.
If we start at x = 0.5 and try sliding up or down the curve, we are going in the
wrong direction to find the root or minimum. To find the maximum we also
need to go down before we can go up to the maximum.
When we look at solver, we get the wrong but expected results. The func-
tion not only fails to have a tangent line at x = 0, it has a jump there. Solver
finds the nearest local maximum and minimum. For the root, it tells us it can’t
find a feasible solution.


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.

A preview of things to come — Extrema of functions of two variables.


There is another feature of Solver that we will come back to later in the course.
Goal Seek asked which cell should be changed to reach our desired goal. Solver
allows us to specify a number of cells that we can change. This means it will
work with functions of several variables. This will allow us to shed some light
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 176

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

Figure 3.5.13 Video presentation of this example


Find a best fitting line to the following data.

x 1 2 3 4 5
y 35 46 78 84 114

Solution. As we mentioned in Section 1.4, when we are asked to find a best


fitting line, we are asked to create a predicting function p(x) = Ax + B, with
A and B chosen to minimize the sum of the squares of the error between the
actual values and the predicted values. We build a worksheet that finds the
sum of squared errors. We start with our variables, A and B, set at 5, an
arbitrary initial guess.

We ask Solver to minimize D11 by changing B2 and B3. For comparison we


ask for the best fitting Trendline using the scatterplot.

We see that we get the same answers, subject to rounding rules. □


The Trendline tool has the advantage of being easier to use in many cases.
Finding the best fitting curve with solver has the advantage of showing what
we mean by best fitting. It will also work with models that may not have been
programmed into the Trendline tool.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 177

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.

A Solver can be used on functions of 2 variables.


B Solver will only find a root if the function actually has one.
C It is easiest to think of solver as a more powerful version of Goal
Seek.

D Solver is more versatile than Goal Seek.


E Solver can find the minimum of any function.
F Solver uses a version of Newton’s method to find extrema.
G Solver can run into problems when it has to move across a bend in
the curve to find a solution.
H None of the above

Exercises: An Introduction to Solver

Exercise Group. In Exercise 3.5.1–3.5.7 you are given a function and an


interval it is defined over:
(a) Make a chart of values and plot a graph of the function.
(b) Find any roots for the function.
(c) Find relative maxima and minima for the function. (Remember to in-
clude the endpoints.).
(d) Find the absolute maximum and minimum of the function on the interval.
1. f (x) = x2 − 10x + 9, on the interval 0 ≤ x ≤ 10.
Solution.
(a)

(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

Solver indicates that the minimum value of the function is -16


and the minimum takes place at x = 5.
We have local maximums at the endpoints (0, 9) and (10, 9).
(d) Test the endpoints,(0, 9) and (10, 9), and compare to the mini-
mum, (5, 16).
The absolute minimum is -16 (at x = 5) and the absolute maxi-
mum is 9 (at x = 1 and 10)
2. g(x) = 10x ∗ (4/5)x − 1, on the interval 0 ≤ x ≤ 10.
3. h(x) = (3000 + 200x)(0.97)x , on the interval 0 ≤ x ≤ 100.
Solution.
(a)

(b) This function does not have any roots on the interval 0 ≤ x ≤
100.

(c) The graph indicates there is a maximum near x = 20. Use


Solver: There is a maximum at x = 17.83. The maximum value
is 3814.53.
We have local minimums at the endpoints (0, 3000) and
(100, 1093.71).

(d) Compare the local extrema to the endpoints. We need


to consider three points, (100, 1093.71), (17.83, 3814.53), and
(100, 1093.71).
The global maximum is 3814.53 (at x = 17.83).
The global minimum of 1093.71 (at x = 100).
4. The revenue function, Revenue(q) = (500 − 3q)(q), on the interval
0 ≤ q ≤ 200.
5. The profit function, Profit(q) = (500 − 3q)(q) − (12q + 600), on the
interval 0 ≤ q ≤ 200.
Solution.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 179

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

Quantity 157 513 702 842 995


Profit 143,814 314,801 322,223 279,988 189,263

on the interval 0 ≤ Quantity ≤ 1200.


7. The cost function obtained as the best fitting cubic curve for the
following data.
Quantity 2 6 9 12 15
Cost 487 539 532 541 626
on the interval 0 ≤ Quantity ≤ 16.
Solution. First we need to use Trendlines to find the equation of
the function. Use polynomial of degree 3 to find the function
Cost(x) = 0.3353x3 − 7.9874x2 + 59.63x + 396.91.
(a)

(b) There are no roots on the interval [0, 16].


(c) There is a local maximum between 4 and 8, and a local minimum
between 8 and 12. Using Solver We find the local maximum at
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 180

(6.00, 539.57) and a local minimum at (9.88, 529.74). We also


have a local minimum at the endpoint (0, 396.91) and a local
maximum at the other endpoint (16, 679.604).
(d) Compare the local extrema to the endpoints. We need to con-
sider four points, (0, $396.91), (6.00, $539.57), (9.88, $529.74),
and (16, $584.30).
The global maximum is $396.91 (at x = 0)
The global minimum of $679.604 (at x = 16)

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

on the interval 0 ≤ x ≤ 10.


Solution.
(a) Inserting an empty row will allow us to see the break in the graph
where we switch from the linear part to the quadratic part of
the function. The functions have been included for clarity.

(b) The local maximum looks to be at approximately x = 5 and the


local minimum appears to be near x = 7.
(c) The local minimum is the most straight forward: start at x =
7 and let Solver find the minimum. Solver indicates that the
minimum value is 0 and the minimum occurs at x = 7.
For the local maximum we can have two things happen:
• The maximum is on the linear part of the equation.
• The maximum is on the quadratic part.
The two pieces do meet at x = 5, but we cannot see just where
the line ends up.
So start with x = 4 on Solver, find the maximum on the interval
[4,5] and compare that to the value on the other branch of the
graph.
CHAPTER 3. RATE OF CHANGE AND DERIVATIVES 181

Solver returns a value of 10 at x = 5.


Note that g(x) is defined to be 8 exactly at x = 5, because the
output is determined by the 2(x − 7)2 part.
Thus we do not have a local maximum here. The graph ap-
proaches 10 (gets infinitely close to it) as x approaches 5 from
the left, but switches to 8 at he last minute.
10. (
−4 ∗ (x − 2)2 x<6
h(x) =
2(x − 7) − 10
2
x>6
on the interval 0 ≤ x ≤ 10.
Chapter 4

Symbolic Differentiation

In the last chapter we approximated derivatives by using a balanced difference


quotient. For most functions that gave an easy approximation without any
rules other than the conceptual understanding that we obtained the derivative
by zooming in far enough for the graph to look like a straight line. When we
looked at the derivative at many points we found that for polynomials of degree
2 or less, the derivative seems to be a polynomial of one degree lower. In this
chapter we explore rules for symbolic differentiation. This lets us move from
a function defined by a formula to its derivative defined by a formula without
going through the work of finding best fitting curves. It also will work with a
many functions where Excel will not have the appropriate choice available if
we want to fit a curve.

4.1 Elementary Derivatives


4.1.1 Definition and Notation
Link to worksheets used in this section1
We start by recalling the formal definition, with a slight adjustment in
notation to match the standard conventions:
Definition 4.1.1 Derivative. For a function f (x), the instantaneous rate
of change of f (x), or the derivative of f (x), denoted as f ′ (x), is defined as

f (x + h) − f (x)
f ′ (x) = lim .
h→0 h

We also want to recall some alternate notations we may use.

Notation: Let y = f (x).


The derivative of f (x) is denoted as f ′ (x) or dx
d
f (x)or dy/dx.

The derivative at x = x0 is denoted as f (x0 ) or dx dy
|x=x0 .

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

4.1.2 Derivatives of monomials


Our first rule for symbolic differentiation gives the derivative of a monomial.
Claim 4.1.2 Monomial rule. If f (x) = axn , then f ′ (x) = n ∗ a ∗ xn−1 .
This rule is a generalization of the rule we found in section 3.2 using trend-
lines. There we noticed that the derivative is linear whenever the function
is quadratic. The rule is valid for all values of n, not just for positive whole
numbers. We can now find derivatives for expressions that can be converted
into this form.
Example 4.1.3 Derivatives of monomials. Using our first rule of symbolic
differentiation, find the derivatives of the following functions:
(a) f (x) = 3x
(b) g(x) = 5x2
(c) h(x) = 7x25

(d) j(x) = 6 x
4
(e) k(x) =
x3
Solution. Using our rule:
d d
(a) f (x) = (3x1 ) = 1 ∗ 3x0 = 3.
dx dx
d d
(b) g(x) = (5x2 ) = 2 ∗ 5x1 = 10x.
dx dx
d d
(c) h(x) = (7x25 ) = 25 ∗ 7x24 = 175x24 .
dx dx
d d √ d 3
(d) j(x) = (6 x) = (6x1/2 ) = 1/2 ∗ 6x−1/2 = 3x−1/2 = √
dx dx dx x
d d 4 −12
(e) k(x) = = d/dx(4x(−3) ) = −3 ∗ 4x−4 = −12x−4 = 4
dx dx x3 x

For parts (d) and (e), we converted roots and fractions so they looked like
monomials with negative or fractional exponents and applied our rule.
Probably the most convincing demonstration of the truth of this rule is
for us to use Excel and the techniques of the last chapter to find a function,
its numeric and symbolic derivatives and see that the symbolic and numeric
derivatives are the same up to round off error. We would also like to see how
the symbolic derivative can be derived from the formal definition of derivative
in simple cases.
Example 4.1.4 Derivatives of linear functions. From the formal defini-
tion of derivative, if f (x) = ax + b, then show f ′ (x) = a.
Solution. Using our definition:

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

(x + h)n = xn + nx(n−1) h + terms involving h2 .

We are ready to generalize.


Example 4.1.6 Derivative of power function. From the formal definition
of derivative, if f (x) = axn , then show f ′ (x) = nax(n−1) .
Solution. Using our definition:

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

4.1.3 Derivatives of Exponential Functions


Claim 4.1.7 Exponential Rule. If f (x) = a ∗ ex , then f ′ (x) = a ∗ ex .
The elegance of this rule is part of the reason why mathematicians and
math books like base e for exponential functions. However we more typically
want to use exponential functions based on a rate of growth or decay.
Claim 4.1.8 General Exponential Rule. If f (x) = b ∗ ax , then f ′ (x) =
b ∗ ln(a) ∗ ax .
Example 4.1.9 Exponential examples. Using the exponential rules of
symbolic differentiation, find the derivatives of the following functions:
(a) f (x) = 2ex
(b) g(x) = πex
(c) h(x) = 7 ∗ 2x

(d) j(x) = 5 ∗ (1.06)x


(e) k(x) = 9 ∗ (0.97)x

Solution. Using our rule:


d d
(a) f (x) = (2ex ) = 2ex .
dx dx
d d
(b) g(x) = (πex ) = πex .
dx dx
d d
(c) h(x) = (7 ∗ 2x ) = 7 ∗ ln(2) ∗ 2x
dx dx
d d
(d) j(x) = (5 ∗ (1.06)x ) = 5 ∗ ln(1.06) ∗ (1.06)x
dx dx
d d
(e) k(x) = (9 ∗ (0.97)x ) = 9 ∗ ln(0.97) ∗ (0.97)x
dx dx

In some ways, the most convincing argument for these rules is to use Excel
to plot the function, its numeric derivative and its symbolic derivative for a
variety of values and see that the numeric and symbolic derivatives are the
same up to rounding error. We would also like to make an argument from the
formal definition of the derivative.
Example 4.1.10 Justification of first exponential rule. From the formal
definition of derivative show that if f (x) = ex , then f ′ (x) = ex .
Solution. Using our definition:

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

Using our definition:

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

4.1.4 Derivatives of Logarithmic Functions


For a last rule for this section we want to find the derivative of f (x) = a ln(x).
Claim 4.1.13 Logarithmic Rule. If f (x) = a ln(x), then f ′ (x) = a/x.
Example 4.1.14 Derivatives of logarithmic functions. Using the log-
arithmic rule of symbolic differentiation, find the derivatives of the following
functions:
(a) f (x) = 2 ln(x)
(b) g(x) = 3 ln(x2 )

(c) h(x) = 5 ln(1/x)

Solution. Using our rule:


d d
(a) f (x) = (2 ln(x)) = 2/x.
dx dx
d d d
(b) g(x) = (3 ln(x2 )) = (3 ∗ 2 ln(x)) = 6/x.
dx dx dx
d d d
(c) h(x) = (5 ln(1/x)) = (−1 ∗ 5 ln(x)) = −5/x.
dx dx dx

Our argument for this derivative rule will be more geometric.
Example 4.1.15 Justification of logarithmic rule. If f (x) = ln(x), then
show f ′ (x) = 1/x.
Solution. We start by noticing that y = ex and y = ln(x) are inverse func-
tions. That means their graphs can be obtained by reflecting across the line
y = x.

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

4.1.5 Reading Check


1. Reading check, Elementary Derivatives.This question checks your
reading comprehension of the material is section 4.1, Elementary Deriva-
tives, 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 The monomial rule for taking the derivative of f (x) = a ∗ xn is only


valid when n is an integer.
B If f (x) = a ∗ ln(x) then f ′ (x) = a/x.

C If f (x) = b ∗ ax then f ′ (x) = b ∗ ln(a) ∗ ax .


D If f (x) = a ∗ xπ then f ′ (x) = a ∗ ln(pi) ∗ xπ .
E If f (x) = a ∗ ln(xn ) then f ′ (x) = a ∗ n/xn−1 .

F If f (x) = a ∗ ex then f ′ (x) = a ∗ ex .


G If f (x) = a ∗ xn then f ′ (x) = n ∗ a ∗ xn−1 .
H None of the above

4.1.6 Exercises: Elementary Derivatives Problems

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

4.2 Derivative Rules for Combinations of Func-


tions
In the last section we learned rules to symbolically differentiate some elemen-
tary functions. To summarize, we have established 5 rules.

Elementary Formulas.

If f (x) = a, then f ′ (x) = 0.


If f (x) = ax, then f ′ (x) = a.
If f (x) = a ∗ xn , then f ′ (x) = a ∗ n ∗ xn−1 , for any nonzero number
n.
If f (x) = ex , then f ′ (x) = ex .
If f (x) = ax , then f ′ (x) = ax ln(a).
If f (x) = ln(x), then f ′ (x) = 1/x

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.

4.2.1 Derivatives of scalar products


We start by differentiating a constant times a function.
Claim 4.2.1 Scalar multiple rule. The derivative of c ∗ f (x) is c ∗ f ′ (x).
In other words,
[c ∗ f (x)]′ = c ∗ f ′ (x).
Example 4.2.2 Derivatives of constants times standard functions.
Find the derivatives of the following functions:

(a) f (x) = 2ex


(b) g(x) = 500(1.05)x
(c) h(x) = ln(x7 )

Solution. Using our rule:

(a) f ′ (x) = 2[ex ]′ = 2ex .


(b) g ′ (x) = 500[(1.05)x ]′ = 500(1.05)x ln(1.05).
(c) h′ (x) = [ln(x7 )]′ = [7 ln(x)]′ = 7[ln(x)]′ = 7/x.

4.2.2 Derivatives of sums and differences


Next we want to look at the sum or difference of two functions.
CHAPTER 4. SYMBOLIC DIFFERENTIATION 191

Claim 4.2.3 Sum and difference rule. The derivative of f (x) ± g(x) is
f ′ (x) ± g ′ (x). In other words,

[f (x) ± g(x)]′ = f ′ (x) ± g ′ (x).


Example 4.2.4 Derivatives of sums and differences of standard func-
tions. Find the derivatives of the following functions:
(a) f (x) = 5x3 + 3x2 − 7
(b) g(x) = 100ex − 1000(1.03)x
√ √
(c) h(x) = 5 x + 2/ x − 7x−3

Solution. Using our rule:


(a) f ′ (x) = [5x3 ]′ + [3x2 ]′ − [7]′ = 15x2 + 6x − 0.
(b) g ′ (x) = 100[ex ]′ − [1000(1.03)x ]′ = 100ex − 1000(1.03)x ln(1.03).

(c)

h′ (x) = 5[x1/2 ]′ + 2[x−1/2 ]′ − 7[x−3 ]′


= 5/2x−1/2 − x−3/2 + 21x−4
5 1 21
= √ − √ + 4.
2 x x 3 x

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.

c ∗ (f ′ (x0 )(x − x0 ) + f (x0 )) = (cf ′ (x0 ))(x − x0 ) + (cf (x0 )).

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.

(f ′ (x0 )(x − x0 ) + f (x0 )) ± (g ′ (x0 )(x − x0 ) + g(x0 ))


= (f ′ (x0 ) ± g ′ (x0 ))(x − x0 ) + (f (x0 )±g(x0 )).

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

4.2.3 Derivatives of products


We now turn our attention to the product of two functions.
Claim 4.2.5 Product rule. The derivative of f (x) ∗ g(x) is f ′ (x)g(x) +
f (x)g ′ (x). In other words,

[f (x) ∗ g(x)]′ = f ′ (x) ∗ g(x) + f (x) ∗ g ′ (x).


Warning: Note that the derivative of a product is not the product of the
derivatives!
We start with an example that we can do by multiplying before taking the
derivative. This gives us a way to check that we have the rule correct.
Example 4.2.6 Simple derivative of a product. Let f (x) = x and
g(x) = x2 . Find the derivative of f (x) ∗ g(x).
Solution. Note that f (x) ∗ g(x) = x3 . Using our rule for monomials (f (x) ∗
g(x))′ = (x3 )′ = 3x2 . Using the same rule we see f ′ (x) = 1, and g ′ (x) = 2x.
We can now evaluate using the product rule:

(f (x) ∗ g(x))′ = f ′ (x) ∗ g(x) + f (x) ∗ g ′ (x)


= (1) ∗ (x2 ) + (x) ∗ (2x) = 3x2 .


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)

f ′ (x) = (6x + 100)′ ∗ (1.06)x + (6x + 100) ∗ ((1.06)x )′


= (6) ∗ (1.06)x + (6x + 100) ∗ (1.06)x ln(1.06).
√ √ √ √
(b) g ′ (x) = [ x]′ ln(x) + x[ln(x)]′ = [1/(2 x)] ln(x) + x[1/x].

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.

(ax + c)(bx + d) = abx2 + (ad + bc)x + cd.

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

f ′ (x0 )g(x0 ) + f (x0 )g ′ (x0 ).


CHAPTER 4. SYMBOLIC DIFFERENTIATION 193

4.2.4 Derivatives of quotients


Finally, we turn our attention to the quotient of two functions.
′ ′
Claim 4.2.8 Quotient rule. The derivative of fg(x) (x)
is f (x)g(x)−f (x)g (x)
(g(x))2 . In
other words,  ′
f (x) f ′ (x) ∗ g(x) − f (x) ∗ g ′ (x)
= .
g(x) (g(x))2
Warning: Once again, note that the derivative of a quotient is NOT the
quotient of the derivatives!
Example 4.2.9 Simple derivative of a quotient. For our first example
we look at a case that we dane do without the quotient rule by simplifying
first. This lets us check our answer. Let f (x) = x2 and g(x) = x. Find the
derivative of f (x)/g(x).
Solution. We start by simplifying. Note that f (x)/g(x) = x. Using our rule
for monomials, (f (x) ∗ g(x))′ = (x)′ = 1.
Now we use the quotient rule directly. Using the same rule we see f ′ (x) =
2x, and g ′ (x) = 1. Using the quotient rule:

f ′ (x) ∗ g(x) − f (x) ∗ g ′ (x)


(f (x)/g(x))′ =
(g(x))2
(2x) ∗ (x) − (x2 ) ∗ (1) x2
= 2
= 2 = 1.
x x
Both methods give the same answer. □
Note that the quotient of the derivatives is 2x, which is not the same as
the derivative of the quotient.
Example 4.2.10 General derivatives of quotients. Find the derivatives
of the following functions:

(a) f (x) = ((6x2 + 100))/(x3 + x).


(b) g(x) = (1.07)x /(3x + 5).

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

Theory and justification. Following the general method, we look at the


linear term of the quotient of the linear approximations. However, we need to
do an algebraic trick before we can find the linear term. Consider the quotient
of two linear expressions:

a + cx (a + cx)(b − dx) ab + (cb − ad)x − cdx2


= = .
b + dx (b + dx)(b − dx) b2 − d 2 x 2

When x is small enough, we get a good approximation by ignoring the x2


term. In that approximation, the coefficient of the linear term is (cb−ad)
b2 . Thus,
CHAPTER 4. SYMBOLIC DIFFERENTIATION 194

when we take the quotient,

f ′ (x0 )(x − x0 ) + f (x0 )


,
g ′ (x0 )(x − x0 ) + g(x0 )

the coefficient of the linear term is


f ′ (x0 )g(x0 ) − f (x0 )g ′ (x0 )
.
(g(x0 ))2

4.2.5 Reading Check


1. Reading check, Derivative Rules for Combinations of Func-
tions.This question checks your reading comprehension of the material is
section 4.2, Derivative Rules for Combinations of Functions, 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 The derivative of f (x)/g(x) is f ′ (x)/g ′ (x).


B The derivative of f (x) + g(x) is f ′ (x) + g ′ (x).
C The derivative of f (x) ∗ g(x) is f ′ (x) ∗ g ′ (x).
D The derivative of f (x) ∗ g(x) is f ′ (x) ∗ g(x) + f (x) ∗ g ′ (x).
f ′ (x)∗g(x)−f (x)∗g ′ (x)
E The derivative of f (x)/g(x) is (g(x)2 .

F The derivative of f (x) − g(x) is f ′ (x) − g ′ (x).


f (x)∗g ′ (x)−f ′ (x)∗g(x)
G The derivative of f (x)/g(x) is (g(x)2 .

H The derivative of c ∗ f (x) is c ∗ f ′ (x).

I None of the above

4.2.6 Exercises: Derivative Rules for Combinations of Func-


tions Problems

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

Solution. Product Rule:

m′ (x) = (x3 + 5x2 − 7)′ (x2 − 3) + (x3 + 5x2 − 7)(x2 − 3)′


= (3x2 + 10x)(x2 − 3) + (x3 + 5x2 − 7)(2x).

6. n(x) = (10x − 9)(x5 + x).
7. f (x) = ex ln(x).
Solution. Product Rule:
1 1
f ′ (x) = (ex )′ ln(x) + ex (ln(x))′ = ex ln(x) + ex = ex [ln(x) + ].
x x
x
Note: the equation f ′ (x) = ex ln(x) + ex is also acceptable as a
solution.
Factoring is sometimes done, but depends on the problem we are
trying to solve and what we are trying to do with the derivative.
8. g(x) = 1.07x (10x − 15).
9. h(x) = (ax + b)(cx + d)(ex + f ).
Solution. If we have a product of 3 functions we need to first con-
sider 2 of the functions as a sigle function that includes a product.

h′ (x) = (ax + b)′ ((cx + d)(ex + f )) + (ax + b)((cx + d)(ex + f ))′


= (ax + b)′ (cx + d)(ex + f ) + (ax + b)(cx + d)′ (ex + f ) + (ax + b)(cx + d)(ex + f )′
= a(cx + d)(ex + f ) + (ax + b)c(ex + f ) + (ax + b)(cx + d)e.
10. k(x) = 1.04x ex .
(x2 −5x)
11. m(x) = (x2 +3) .
Solution. Quotient Rule:

(x2 − 5x)′ (x2 + 3) − (x2 − 5x)(x2 + 3)′


m′ (x) =
(x2 + 3)2
(2x − 5)(x2 + 3) − (x2 − 5x)(2x)
= .
(x2 + 3)2

We can simplify this :

2x3 − 5x2 + 6x − 15 − (2x3 − 10x2 ) −15x2 + 6x − 15


m′ (x) = 2 2
= .
(x + 3) (x2 + 3)2
(x2 −5x+3)
12. n(x) = ex .
ln(x))
13. f (x) = (2x+7) .
Solution. Quotient Rule:

(ln(x))′ (2x + 7) − (ln(x))(2x + 7)′


f ′ (x) =
(2x + 7)2
(1/x)(2x + 7) − (ln(x))(2)
=
(2x + 7)2
x (1/x)(2x + 7) − (ln(x))(2)
=
x (2x + 7)2
2x + 7 − 2x ln(x)
= .
x(2x + 7)2
CHAPTER 4. SYMBOLIC DIFFERENTIATION 196

(x3 +2x+9)
14. g(x) = 1.07x .
(ax+b)
15. h(x) = (cx+d) .
Solution. Quotient Rule:

(ax + b)′ (cx + d) − (ax + b)(cx + d)′


h′ (x) =
(cx + d)2
a(cx + d) − (ax + b)c acx + ad − (acx + bc)
= 2
=
(cx + d) (cx + d)2
ad − bc
= .
(cx + d)2
((3x+5)(x2 +7))
16. k(x) = (x2 +2x) .
ln(x)(1.04x )
17. m(x) = 3x2 +7 .
Solution. Quotient Rule with embedded Product Rule:

(ln(x)(1.04x ))′ (3x2 + 7) − (ln(x)(1.04x ))(3x2 + 7)′


m′ (x) =
(3x2 + 7)2
(ln(x)′ (1.04x ) + ln(x)(1.04x )′ )(3x2 + 7) − (ln(x)(1.04x ))(3x2 + 7)′
=
(3x2 + 7)2
( 1 (1.04x ) + ln(x) ln(1.04)(1.04x ))(3x2 + 7) − (ln(x)(1.04x ))(6x)
= x
(3x2 + 7)2
1.06x ex
18. m(x) = 1.08x

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.

h′ (x) = f ′ (x) ∗ g(x) + f (x) ∗ g ′ (x)


h′ (2) = f ′ (2) ∗ g(2) + f (2) ∗ g ′ (2)
= 5 ∗ 0 + 7 ∗ 4 = 28.

20. h (5), where h(x) = f (x) − g(x).
21. h′ (7), where h(x) = f (x)/g(x).
Solution.
f ′ (x)g(x) − f (x)g ′ (x)
h′ (x) =
(g(x))2
f (7)g(7) − f (7)g ′ (7)

h′ (7) =
(g(7))2
0∗1−2∗3
= = −6.
(1)2
22. h′ (4), where h(x) = g(x)/f (x).
CHAPTER 4. SYMBOLIC DIFFERENTIATION 197

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

Profit(150) = −1502 + 300(150) − 2500


= −22, 500 + 45, 000 − 2500 = 20, 000.
24. The demand function for a fad item is Demand(t) = 100t2 (0.8)t , with t
measured in months. When is the demand the highest?
25. The cost function for gizmo production is Cost(q) = 3000 + 10q − 0.02q 2 ,
for q ≤ 200. Find the equation of the line tangent to the cost function at
q = 200.
Solution. For the tangent line we need a point and a slope, and once
we have those we find the equation of the line.
Point: When q = 200,

Cost(200) = 3000 + 10(200) − .02(200)2


= 3000 + 2000 − .02 ∗ 40, 000 = 4200.

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.

4.3 The Chain Rule


In the last two sections we learned rules to symbolically differentiate some
functions. To summarize, we have established some elementary formulas and
some arithmetic rules.
Elementary Formulas.

If f (x) = a, then f ′ (x) = 0.


If f (x) = ax, then f ′ (x) = a.
If f (x) = a ∗ xn , then f ′ (x) = a ∗ n ∗ xn−1 , for any nonzero number
n.
If f (x) = ex , then f ′ (x) = ex .
If f (x) = ax , then f ′ (x) = ax ln(a).
If f (x) = ln(x), then f ′ (x) = 1/x

Arithmetic derivative rules.


Arithmetic derivative rules:
Scalar multiple rule: The derivative of c ∗ f (x) is c ∗ f ′ (x).
CHAPTER 4. SYMBOLIC DIFFERENTIATION 198

Sum and difference rule: The derivative of f (x) ± g(x) is f ′ (x) ±



g (x).
Product Rule: The derivative of f (x)g(x) is f ′ (x)g(x) + f (x)g ′ (x).

(x)g ′ (x)
Quotient Rule: The derivative of f (x)/g(x) is f (x)g(x)−f
(g(x))2 .

The other way we traditionally build functions from simpler functions is by


use of composition.
p We want to be able to take derivatives of functions like
(2x + 3)52 , (x2 ) + 5x + 7, and 1.06.2x .
Claim 4.3.1 Chain rule. The derivative of f (g(x)) is f ′ (g(x))g ′ (x). In
other words,

[f (g(x))] = f ′ (g(x)) ∗ g ′ (x).
Example 4.3.2 Simple chain rule. Find the derivative of the following
functions:
(a) f (p) = (p3 + 2p + 5)7 .
p
(b) g(q) = q 2 + 6.
(c) h(x) = e2x+5 .

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

f ′ (p) = g ′ (h(p))h′ (p) = 7(p3 + 2p + 5)6 (3p2 + 2).



(b) We can write g(q) as f (h(q)) where h(q) = q 2 + 6 and f (q) = q. We use
′ ′
the rules from the previous section to compute
p h (q) = 2q and f (q) =
√ ′
1/(2 q). Composing we get f (h(q)) = 1/(2 (q + 6)). Thus
2

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

g ′ (t) = f ′ (h(t))h′ (t) = 2e2t+5 .

Theory and justification. As in the previous section, we will use local


linearity to justify our derivative rule.
To simplify notation, we will let g(x) = u = bx + d. We will be substituting
g(x) into f (x) and so we will be using the functions f (u) = au + c, with
a = f ′ (u) = f ′ (g(x0 )) and g(x) = bx + d, with b = g ′ (x0 ).
The composition of f and g can then be written as

f (g(x)) = a(bx + d) + c = (ab)x + (ad + c).


CHAPTER 4. SYMBOLIC DIFFERENTIATION 199

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.

Chain Rule (fractional notation version).

If z = g(x) and y = f (z) so y = f (g(x)), then

dy dy dz df df dg
= or = .
dx dz dx dx dg dx

Example 4.3.3 Successive processes. We have two processes that need


to be run in succession to produce gizmos. The yields of the two processes are
given by:
intermediate(raw) = −25 + 7.3raw + .2raw2
gizmos(intermediate) = −5 + 12intermediate.
Find the rate of production in terms of the amount of raw material.
Solution. We want to find the derivatives of the individual processes and
then use the chain rule.
dintermediate
= 7.3 + .4raw
draw
d gizmos
= 12.
dintermediate
Thus
d gizmos d gizmos dintermediate
=
draw dintermediate draw
= 12 ∗ (7.3 + .4raw) = 87.6 + 4.8raw.

The rate of production is a linear function of the amount of raw material


used. □
Example 4.3.4 Chain rule with separate functions. Find h′ (x) for
h(x) = f (g(x)) for the given f (z) and g(x).

(a) f (z) = 2z + 7 and z = g(x) = 3x + 5.


(b) f (z) = z 3 and z = g(x) = x2 + 7.
(c) f (z) = ez and z = g(x) = x2 + 3.

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

(Notice that the two derivatives are in terms of different variables. We


need to convert to a single variable.)
dh dh dg 2
(c) = = ez ∗ 2x = e(x +3) ∗ 2x.
dx dz dx

Warning for this method:
We tend to use x as the variable for almost all functions. When we use the
chain rule we need to remember that the input for the second function is the
output from the first function. It is safest to use separate variable for the two
functions.
Special cases:
Two special cases of the chain rule come up so often, it is worth explicitly
noting them.

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 .

B The derivative of f (g(x)) is f ′ (g ′ (x)).


dy dy dz
C If z = g(x), and y = f (z), so y = f (g(x)), then dx = dz dx .

D The derivative of f (g(x)) is f ′ (g(x)) ∗ g ′ (x).


E If g(x) = (f (a ∗ x + b) then g ′ (x) = a ∗ f ′ (a ∗ x + b).
F If g(x) = g(f (x)n then g ′ (x) = n ∗ (f (x)n−1 ∗ f ′ (x).

G None of the above

Exercises: The Chain Rule

Exercise Group. Find the derivatives of the following functions.


1. f (x) = (x3 + 5x + 7)4 .
Solution. Let u = x3 + 5x + 7, then f (x) = (u)4 , and

f ′ (x) = 4u3 du = 4(x3 + 5x + 7)3 (3x2 + 5).


2. g(x) = (x2 − 6x + 8)123 .
p
3. h(x) = (5x7 + 3x − 2).
CHAPTER 4. SYMBOLIC DIFFERENTIATION 201

Solution. Let h(x) = 5x7 + 3x − 2 = u1/2 , with u = 5x7 + 3x − 2.

h′ (x) = 1/2u−1/2 du = 1/2(5x7 + 3x − 2)−1/2 (35x6 + 3).

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

Hint: It is easier to simplify h(x) to 2 ln(10x − 15) first.


10. k(x) = ((ln(x))(ex ))3 .
2
11. m(x) = ln(e(x +x)
+ x).
Solution.
1
m′ (x) =
2
[e(x +x) ∗ (2x + 1) + 1]
e(x2 +x) + x
2
(2x + 1)e(x +x) + 1
= .
e(x2 +x) + x
 5
x2 −5x+3
12. n(x) = ex .
 4
ln(x)
13. f (x) = (2x+7) .
Solution.
 3  
′ ln(x) d ln(x)
f (x) = 4 ∗
2x + 7 dx 2x + 7
CHAPTER 4. SYMBOLIC DIFFERENTIATION 202

 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.

h′ (x) = f ′ (g(x))g ′ (x)


h′ (2) = f ′ (g(2))g ′ (2)
= f ′ (0) ∗ 4 = 7 ∗ 4 = 28.
16. h′ (5), where h(x) = f (f (x)).
17. h′ (7), where h(x) = g(g(x)).
Solution.

h′ (x) = g ′ (g(x))g ′ (x)


h′ (7) = g ′ (g(7))g ′ (7)
= g ′ (1) ∗ 3 = 8 ∗ 3 = 24.
18. h′ (4), where h(x) = g(f (x)).
19. The pretax profit function is Profit(q) = −q 2 + 300q − 2500 at the widget
factory. The tax function is tax(Profit) = 0.4(Profit −1000). Find the
equation of the line tangent to the graph of after tax profits when q = 100.
Solution. We will need a point and a slope to construct the tangent
line.
Point: when q = 100, we have Profit(100) = −1002 +300(100)−2500 =
−10, 000 + 30, 000 − 2500 = 18, 500
Also tax(Profit) = 0.4(Profit −1000), gives

tax(18, 500) = 0.4(18, 500 − 1000) = 7, 000.

So the point is q = 100, tax = 7, 000.


tax
Slope: ddq = d taxd Profit ∗ d Profit
dq = (0.4) ∗ (−2q + 300)
d tax
So at q = 100 we have m = dq = 0.4 ∗ (−200 + 300) = 40.
Tangent line: tax − tax0 = m(q − q0 )
So tax = tax0 + m(q − q0 ) = 7000 + 40(q − 100)
In slope-intercept form we have

tax(q) = 40q + 3000.


CHAPTER 4. SYMBOLIC DIFFERENTIATION 203

Note that here we have approximated a composite function by some-


thing much simpler. Finding tax meant we had to first find the profit,
and then plug that profit into the tax function. Now, all we have to do is
plug our value of q into the linear equation!
20. The revenue function for gizmos is Revenue(q) = .2q 2 + 500q.
The commission cost to the sales force is commissions(Revenue) =
0.1 Revenue + Revenue2 /3, 000, 000. Find the equation of the tangent line
to commissions as a function of quantity, when q = 1000.

4.4 Differentiation Using Computer Algebra


As we noted in Chapter 1, in this book we are limiting ourselves to mathe-
matical tools that the student can reasonably expect to find in a generic work
environment. That is one of the reasons for focusing on using spreadsheets
and Excel. However, we will also look at using free web tools, particularly as
a means of doing symbolic manipulation. Differentiation is one of those oper-
ations that can be done with free tools available on the web. The student in
this course will be expected to routinely do symbolic differentiation by hand.
However, it is good to be able to check your work. We also want tools that
will work reliably with messier problems.
In working with derivatives, we have looked at three basic problems:

• Given a function, find a formula for its derivative. A related question is


finding the marginal function.
• Given a function, find the value of the derivative at a particular point.
We do this when we want a rate of change at a particular point.

• Given a function, find where the derivative is 0. We do this when we are


trying to find minimum or maximum values of the function.
There are a number of websites that will take symbolic derivatives. We start
with Wolfram|Alpha, which is available at http://www.wolframalpha.com1 .
Example 4.4.1 A simple derivative with Alpha. Use Wolfram|Alpha to
find the derivative of x3 + 5x + 7.
Solution. When you call the website, you get an input bar much as you
would with your favorite search engine.

The interface for Wolfram|Alpha is rather robust. While Wolfram|Alpha


lets you use a Math Input pallette, we can ask the question in plain English.
In our case, we would like to find the derivative of x3 + 5x + 7 with respect to
x. Some of the ways of asking that question are:
• find the derivative of (x^3+5x+7)
• find the derivative of (x^3+5x+7) with respect to x
1 http://www.wolframalpha.com
CHAPTER 4. SYMBOLIC DIFFERENTIATION 204

• 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

use Wolfram|Alpha to check our differentiation rules.


Example 4.4.2 Recalling the quotient rule. Use Wolfram|Alpha to recall
the quotient rule.
Solution. See the image below.


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:

Cost = 2000 + 10 ∗ Quantity + .001 ∗ Quantity2 .

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 .

We can input this as c=2000+10*q+.001*q^2.


We want to evaluate the derivative with respect to q when q = 1000.

Thus, when Quantity = 1000, increasing production by 1 widget increases


cost by $12. □
The third basic derivative problem was to find a maximum or minimum.
For extrema problems, we want to find where the derivative is 0, since the
extrema can only occur at endpoints and critical points.
CHAPTER 4. SYMBOLIC DIFFERENTIATION 206

Example 4.4.4 Exploring a business example. The cost and demand


price functions of widgets are given by:

Cost = 2000 + 10 ∗ Quantity + .001 ∗ Quantity2


100 ∗ Quantity
Revenue = .
1 + .01 ∗ Quantity

Find the quantity that maximizes profit.


Solution. We simplify variable names to q, c, p, and r for quantity, cost, profit
and revenue, respectively. Our formula for profit is:

p = r − c = 100q/(1 + .01q) − (2000 + 10q + .001q 2 ).

When looking for a maximum, we always start by looking at a graph of the


function in question.

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

We need to do a bit of interpretation since Wolfram|Alpha is using numer-


ical methods with complex numbers. In particular, the answers have a zero
imaginary part. We are also looking for a positive number. Thus, we conclude
profit is maximized at 209.8 widgets. □
In looking at free software on the web for taking derivatives we started with
Wolfram|Alpha because we can use it throughout the book when Excel does
not solve our needs. It is also supported by the company that produces Math-
ematica®, so it should stay available for the foreseeable future. Another use-
ful source are the solvers from Symbolab https://www.symbolab.com/solver2 .
Symbolab has a collection of solvers for the topics in this course.

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.

You may find other websites for doing derivatives as well.


3 http://www.derivative-calculator.net/
CHAPTER 4. SYMBOLIC DIFFERENTIATION 209

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.

A Differentiation can be done with free tools available on the web.

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.

E Symbolab is a free tool available on the web that does symbolic


differentiation.
F Wolfram|Alpha is a free tool available on the web that does symbolic
differentiation.
G None of the above

Exercises: Differentiation Using Computer Algebra Prob-


lems

Exercise Group. Find the derivative of the given function.


1. f (x) = x ln(x)
Solution.

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 returns several forms (they differ by some simple algebra).


We can choose the one that has the form we find most useful. In this
case we could choose for instance:

h′ (t) = e−0.06t (2t − 0.06t)2 .

It’s a nice compact answer that avoids decimal approximations.


4. k(x) = (2x + 5)37
5. m(x) = ln(ln(ln(x2 + 3)))
Solution.

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.

Going back to the original notation we have

SupplyP rice′ (q) = 0.00392207(1.04)q/100 ,

where (1.04)0.01 = e0.000392207 .


10. ConsumerSurplus = 10 ∗ (0.95)(Quantity/100) − 2 ∗ (1.07)(Quantity/100)
11. k(x) = f (x) ∗ g(x) ∗ h(x)
Solution.

k ′ (x) = g(x)h(x)f ′ (x) + f (x)h(x)g ′ (x) + f (x)g(x)h′ (x).


12. k(x) = f (f (f (x)))

Exercise Group. Evaluate the definite derivative at the given point.


CHAPTER 4. SYMBOLIC DIFFERENTIATION 212

13. f (t) = t2 e(−0.06t) at t = 10.


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.

16. DemandPrice = 20 ∗ (0.95)(Quantity/100) at Quantity = 200.


17. SupplyPrice = 20 ∗ (1.09)(Quantity/100) at Quantity = 300.
Solution. Rewriting the function as P (q) = 20 ∗ (1.09)(q/100) we get:

18. Revenue = Quantity ∗ (20 − Quantity/500) at Quantity = 2000.


19. h(x) = f (g(x)) at x = 4.
Solution.
CHAPTER 4. SYMBOLIC DIFFERENTIATION 213

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

Then we plot the original function. We want to know if q = 9.49122


is a max, min or neither. So graph over the interval [1, 20]:

So the function has a local maximum at q = 9.49122


22. TotalCost = 100000 + 5 ∗ OrderSize + 4 ∗ 10000/OrderSize.
23. Revenue = 20 ∗ Quantity − (Quantity2 )/100.
Solution. Wolfram shows that the critical point is at q = 1000.

Graphing the original function from 0 to 2000 shows the critical


point is a maximum.
CHAPTER 4. SYMBOLIC DIFFERENTIATION 214

24. Revenue = Quantity ∗ 20 ∗ (0.95)(Quantity/100) .


25. Profit = Quantity ∗ 20 ∗ (0.95)(Quantity/100) − (1000 + 10 ∗ Quantity)
Solution. We set the derivative equal to 0. The general answer is
complicated but the real valued answer is what we are looking for.

So the critical point is at q = 613.965.


We want to graph over some interval that contains q = 613.965.
Big pictures are usually nice, so let’s choose the interval [0, 1500].

The function has a (local) maximum at the critical point.

4.5 The Second Derivative and Concavity


For an intuitive definition of the derivative, we talked about zooming in on the
graph until it looks like a straight line and taking the slope. For concavity, we
CHAPTER 4. SYMBOLIC DIFFERENTIATION 215

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

In determining is a curve is concave up or concave down, we want to take


the second derivative of a function, or the derivative of the derivative.
Definition 4.5.1 For a function f (x), the second derivative of f (x) or the
derivative of f ′ (x), denoted as f ′′ (x), is defined as
 
d d
f ′′ (x) = (f (x)) .
dx dx


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:

(a) f (x) = 3x5 + 4x2


(b) g(x) = 5x6 + 3x + 9
(c) h(x) = xe2x
√ 3
(d) j(x) = 6 x +
x
ln(x)
(e) k(x) =
x3
Solution. Using our rule:
d d d
(a) f ′′ (x) = ( (3x5 + 4x2 )) (15x4 + 8x) = 60x3 + 8.
dx dx dx
d d d
(b) g ′′ (x) = ( (5x6 + 3x + 9)) = (30x5 + 3) = 150x4 .
dx dx dx
CHAPTER 4. SYMBOLIC DIFFERENTIATION 216

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.

(a) f (x) = x3 − 12x, x0 = 2


(b) f (x) = x − 12x,
3
x0 = −2
(c) f (x) = x3 − 12x, x0 = 4

(d) g(x) = x4 , x0 = 0
(e) h(x) = x5 , x0 = 0

Solution. Using our rule:

(a) f (x) = x3 − 12x, f ′ (x) = 3x2 − 12, f ′′ (x) = 6x.


At x0 = 2, we have f ′ (x0 ) = 0 and f ′′ (x0 ) = 12. We are at a critical
point, and the curve is concave up, so we have a local minimum.
CHAPTER 4. SYMBOLIC DIFFERENTIATION 217

(b) f (x) = x3 − 12x, f ′ (x) = 3x2 − 12, f ′′ (x) = 6x.


At x0 = −2, we have f ′ (x0 ) = 0 and f ′′ (x0 ) = −12. We are at a critical
point and the curve is concave down, so we have a local maximum.

(c) f (x) = x3 − 12x, f ′ (x) = 3x2 − 12, f ′′ (x) = 6x.


At x0 = 4, we have f ′ (x0 ) = 36. The second derivative is positive, so the
curve is concave up, but since the derivative is not zero, this is not an
extreme point.
(d) g(x) = x4 , g ′ (x) = 4x3 , g ′′ (x) = 12x2 .
At x0 = 0, we have g ′ (x0 ) = 0 and g ′′ (x0 ) = 0, so the second derivative
test fails at this point. (However if we look a the graph, we can see the
curve is concave up everywhere, and that this point is a local minimum.)
(e) h(x) = x5 , h′ (x) = 5x4 , h′′ (x) = 20x3 .
At x0 = 0, we have h′ (x0 ) = 0 and h′′ (x0 ) = 0, so the second derivative
test fails at this point. (However if we look a the graph, we can see this
point is neither a local minimum or a local maximum. It is a place where
the graph switches from being concave up to being concave down. This
is called an inflection point.)

We will use the second derivative test for finding maximums and minimums
in the next chapter.

Second derivative with CAS. We can find second derivatives with our
favorite CAS programs.
With Symbolab

With WolframAlpha
CHAPTER 4. SYMBOLIC DIFFERENTIATION 218

Second derivative in finance. The mathematical first and second deriva-


tives are used in pricing various financial products and options that are also
called derivatives. The first derivative is used to give a value to whether the
underlying product has a price that goes up or down. It looks at the slope of
the pricing curve. The second derivative is used to give a value to the volatility
of the underlying product. It looks at how much the pricing curve bends. We
will return to these uses when we look at integrals.

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.

D If the second derivative is positive we are at a local minimum.


E If the second derivative is positive we are at a local maximum.
F If the second derivative is zero we cannot have a local maximum.
G The second derivative of a function is the derivative of the derivative
of the function.
H The second derivative test fails if we are not at a critical point.
I None of the above

Exercises: The Second Derivative and Concavity Problems

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

(b) The second derivative is always positive, so the function is al-


ways concave up

(c) There is one critical point at x = 3. It is a local minimum.


2. g(t) = (x − 3)(x − 1)(x + 4)
3. h(t) = t2 e−t
Solution.
(a)
h′ (t) = 2te−t − t2 e−t = (2t − t2 )e−t
h′′ (t) = (2 − 2t)e−t − (2t − t2 )e−t = (2 − 4t + t2 )e−t

(b) The function is concave down,


√ where the√second derivative is
negative, that is for 2 − 2 < t < 2 + 2. It is concave up
outside this region.
(c) There are critical points when the derivative is undefined or 0.
The only critical points are when t = 0 and t = 2. When t = 0,
h′′ (t) > 0, so we have a local minimum. When t = 2, h′′ (t) < 0,
so we have a local maximum.
4. k(x) = (x2 − 9)3
x2 −4
5. m(x) = x2 −9
Solution.
(a)
−10x
m′ (x) =
(x2 − 9)3
30x2 + 90
m′′ (x) =
(x2 − 9)3

(b) The function is concave down, where the second derivative is


negative, which for our function is when the denominator is
negative. The function m(x) is concave down when −3 < x < 3.
It is concave up outside this region.
(c) There are critical points when t is 0 or 2. When t = 0, h′′ (t) > 0,
so we have a local minimum. When t = 2, the second derivative
is negative and we have a local maximum.
Quantity Quantity
6. ConsumerSurplus = 10 ∗ (0.95) 100 − 2 ∗ (1.07) 100

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.

Exercise Group. Identify which curve is f , f ′ , and f ′′ .


10.

11.

Solution. Note that local maximums of a function must correspond


to zeroes of its derivative. The original function is F (green). Its
derivative is D (Purple). The second derivative is E (black).

E(x) = D′ (x) = F ′′ (x).


CHAPTER 4. SYMBOLIC DIFFERENTIATION 221

12.

13.

Solution. Looking at the middle segment of the curves, the green


curve is a downward facing parabola, whose derivative is a line with
a negative slope like the purples curve, whose derivative is a negative
constant like the black line.

F (x) = D′ (x) = E ′′ (x).

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)

Cost′′ (rate) = years(1 + years) ∗ FaceValue(1 + rate)(−years−2)

Cost(.04) = 30(31) ∗ 1000(1.04)(−32) = 265103


16. The face value of the bond is $1000. The interest rate is currently 6%.
The bond matures in 10 years.
17. The face value of the bond is $1000. The interest rate is currently 3%.
The bond matures in 20 years.
Solution.

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

Cost′′ (rate) = years(1 + years) ∗ FaceValue(1 + rate)(−years−2)

Cost(.03) = 20(21) ∗ 1000(1.03)(−22) = 219914


Chapter 5

Differentiation Techniques and


Applications

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.

5.1 Implicit Differentiation


We often run into situations where y is expressed not as a function of x, but
as being in a relation with x. A familiar example is the equation for a circle
of radius 5,
x2 + y 2 = 25.
We recall that a circle is not actually the graph of a function. It is, however,
the combined graph of the two functions representing the top and bottom
halves of the circle.
We have two approaches if we want to find the slope of the line tangent
to the circle at (4, 3). We could first use algebra to express y as a function of
x, and then use our rules to find the derivative. That approach works in this
problem but will fail with more complicated relations. The alternative method
is to say that y is implicitly a function of x. We can then use the chain rule to
take the derivative of the relation, with the derivative of y being designated as
y ′ . We can then solve for y ′ in terms of x and y. This second method is called
implicit differentiation.
We start by trying both approaches on the equation of a circle.
Example 5.1.1 Tangent to a circle. Find the equation of the line tangent
to x2 + y 2 = 25 at (4, 3).
Solution 1 (Solution A). 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 can express
the circle as the graph of 2 functions. We first solve for y 2 :
y 2 = 25 − x2 .
We then take the square root to produce 2 functions.
p
f1 (x) = 25 − x2

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.

f1′ (x) = 1/2(25 − x2 )−1/2 (−2x)


f1′ (4) = 1/2(25 − 42 )−1/2 (−8) = −4/3.

Thus the tangent line, in point-slope form, is:


4
y = 3 − (x − 4).
3

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

10p + 2pq + q 2 = 1000,

with 10 < q < 90, where quantity is in thousands of units. If I am currently


selling 20,000 widgets, what is the relationship between change in quantity and
change in price?
Solution. Instead of solving for quantity as an explicit function of price, we
will implicitly differentiate.
d
(10p + 2pq + q 2 = 1000)
dq
dp dp
10 + 2 ∗ ∗ q + 2p + 2q = 0
dq dq
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS225

dp
(10 + 2q) = −2 ∗ (p + q)
dq
dp −2 ∗ (p + q)
= .
dq (10 + 2q)

Since quantity is in thousands of units, if we are selling 20,000 widgets,


Quantity : q = 20 and Price : p = 12.00. Substituting those values into the
formula for the derivative of price with respect to quantity, we see

d Price −2(12.00 + 20)


= = −1.28.
dQuantity (10 + 2 ∗ 20)

We increase sales by 1000 by dropping price by $1.28. □


For the first two examples, the relation was quadratic, so it was straight-
forward to find the derivative by either solving for an explicit function or by
differentiating implicitly. However, if the relation more complicated we will
find implicit differentiation easier than solving for the function.
Example 5.1.3 Another price-quantity relationship. The quantity q
and demand price p for gizmos satisfy the relation

5p + 3 ∗ (pq)1.5 + 2q = 2000,

with 10 < q < 100, where quantity is in thousands of units. If I am currently


selling 25,000 widgets, what is the relationship between change in quantity and
change in price?
Solution. There is no easy method to solve this relation for either price
or quantity as an explicit function of the other. Instead, we will implicitly
differentiate.
d
(5 ∗ p + 3 ∗ (p ∗ q)1.5+ 2 ∗ q = 2000)
dq
dp dp
5 + 3 ∗ (1.5 ∗ p.5 ∗ ∗ q 1.5 + p1.5 ∗ 1.5 ∗ q .5 ) + 2 = 0
dq dq
dp
∗ (5 + 4.5 ∗ p.5 ∗ q 1.5 ) = −(2 + 4.5 ∗ p1.5 ∗ q .5 )
dq
dp (2 + 4.5 ∗ p1.5 ∗ q .5 )
=− .
dq (5 + 4.5 ∗ p.5 ∗ q 1.5 )

Since quantity is in thousands of units, if we are selling 25,000 widgets,


Quantity = 25 and Price = 2.986. Substituting those values into the formula
for the derivative of price with respect to quantity, we see
d price −118.104
= = −0.12088.
d quantity 997.025

We increase sales by 1000 by dropping price by $0.121. □

A standard result from economics is the Cobb-Douglas equation


that claims
Y = ALα K β ,
where Y , L, and K represent total production, labor, and capital, re-
spectively. In the classical model α + β = 1.
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS226

This can be understood as a relation involving capital and labor. An inter-


esting question is to ask for the rate of change of capital with respect to labor,
or how increasing or reducing capital investment will raise or lower labor costs.
Example 5.1.4 Differentiation of Cobb-Douglas. A widget manufacturer
has a production function given by

Y = 50L0.75 K 0.25 .

The manufacturer currently uses 81 units of labor and 16 units of capital.


Find the derivative of labor with respect to capital and interpret your result.
Solution. We implicitly differentiate our equation with respect to capital.
d
(Y = 50L.75 K .25 )
dK
dL
0 = 50 ∗ (0.75 ∗ L−0.25 ∗ ∗ K .25 + L.75 ∗ .25 ∗ K −0.75 )
dK
dL
∗ (0.75 ∗ L−0.25 ∗ K .25 ) = −(L.75 ∗ .25 ∗ K −0.75 )
dK
dL
∗ = −(L.75 ∗ .25 ∗ K −0.75 )/((0.75 ∗ L−0.25 ∗ K .25 )) = −L/3K.
dK
Substituting in our values for L and K we see that Y = 50∗81.75 16.25 = 2700
and (dL)/(dK) = −81/48 ≈ −1.6875. This means, if we want to keep level
production, changing capital investment by 1 unit allows us to change labor by
−1.6875 units. □

Implicit differentiation using CAS. As with regular differentiation, we


can use online computer algebra systems to do implicit differentiation. The
easiest way to do this is with a web search for implicit differentiation calculator.

The first option we are given is a widget interface for WolframAlpha. It


easily lets us do the first example in this section.
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS227

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.

Summary. Implicit differentiation is an application of the chain rule. To use


this technique we need an equation between two variables that we can think
of as implicitly defining one variable as a function of the other. If assume one
variable is implicitly a function of the other, differentiating the equation gives
us an equation in the two variables and the derivative. We can then use algebra
to solve the new equation for the derivative.

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.

A A relation involving two quantities implicitly defines one as a func-


tion of the other in a small region.
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS228

B The textbook worked through examples of using implicit differenti-


ation to find tangent lines to hyperbolas.
C The textbook worked through examples of using implicit differenti-
ation to find tangent lines to circles.
D Implicit differentiation is used when we are given an equation be-
tween two variables and it is not solved for one of the variables.
E For implicit differentiation, you need to explicitly solve for one of
the variables.
F Implicit differentiation is an application of the chain rule.

G The textbook worked through examples of using implicit differenti-


ation to find tangent lines to ellipses.
H None of the above

Exercises: Implicit Differentiation Problems


Exercise Group. For the following equations find the specified derivative.
dy
1. 2x + 3y = 23. Find dx .
−2
Solution. The best method is to notice this is a line with slope 3 .
Plunging ahead without noticing that:

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 .

dK 0.6L−0.4 K 0.4 −3K


= − 0.6 = .
dL L 0.4K −0.6 2L
10. 2000 = 7L0.3 K 0.7 . Find dK
dL .
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS230

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

measures the slope of L ans a function of K.


14. Let 30 ∗ Price +3 ∗ Price ∗Quantity + (Quantity2 )/100 = 2000 be an
d Price
equation relating supply and price for gizmos. Find dQuantity and
dQuantity
d Price . Explain what each derivative means.
dy
15. exy + 2x + 3y = 17. Find dx .
Solution.
d xy d
(e + 2x + 3y) = 17.
dx dx
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS231

Evaluating the derivatives:

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)

5.2 Related Rates


dy
As we have seen, dx is the instantaneous rate of change of y with respect to
dy
x. In Chapter 4 we learned techniques for finding dx when y is defined as a
function of x. In the last section we learned how to use implicit differentiation
dy
to find dx when we were given an equation in x and y. In this section we want
dy
find dx when x and y are both described in terms of another variable. As with
the section on related rates, we will start with an example where we can solve
the problem by eliminating the extra variable before differentiating, and then
look at how to solve with related rates.
Example 5.2.1 Change in revenue with respect to expense, doable
two ways. We can buy widgets wholesale for $10 a widget. In the. retail
market, the demand price of widgets is $20 minus 0.1 times the quantity to be
sold. Find the derivative of revenue with respect to expense.
Solution 1 (Solution A). The revenue and cost functions for widgets depend
on the quantity q. The formulas for revenue and cost are:

Revenue = q(20 − 0.1q) = 20q − 0.1q 2


Cost = 10q.

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 .

It is straightforward to take the derivative:

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

Solution 2 (Solution B). The alternative method is to differentiate the equa-


tions for revenue (r) and cost (c) with respect to quantity (q), and find the two
derivatives dr dc
dq and dq , then treat them as fractions. The derivative we want is
the quotient of these fractions.
The revenue and cost functions for widgets are the same as above.

Revenue = 20q − 0.1q 2


Cost = 10q

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)

r(q) = 30q − 0.1q 2 − 0.001q 3


c(q) = 500 + 10q − 0.01q 2

Find the derivative of revenue with respect to cost (i.e. dr


dc when q = 50.
Solution. Since the cost is quadratic in quantity, solving for revenue as a
function of cost involves more work than we need for this problem. The appro-
priate derivatives are:
dr
= 30 − 0.2q − 0.003q 2
dq
dc
= 10 − 0.02q.
dq
When q = 50, we have
dr
= 30 − 0.2 ∗ 50 − 0.003 ∗ 502 = 12.5
dq
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS233

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:

Revenue = 50 ∗ Quantity − 0.01 ∗ Quantity2


d Cost
= 15.
dQuantity

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

d Revenue d Revenue d Cost 48


= / = = 3.2.
d Cost dQuantity dQuantity 15

Related rates are also useful when we are looking at a two-step process and
we are interested in the rate of the combined process.
Example 5.2.4 Composition of functions. We are producing widgets
(w). The manufacturing process turns goop (g) into sludge (s) and sludge into
widgets. The yield equations in the appropriate units are:

widgets(sludge) = 4 ∗ sludge − 0.1 ∗ sludge2 ,

or in shorthand notation: w(s) = 4s − 0.1s2 , and

sludge(goop) = 3 ∗ goop + .1 ∗ goop2 ,

or in shorthand notation: s(g) = 3g + .1g 2 .


Find the derivative of widgets with respect to goop when g = 10.
Solution. We note that when g = 10, we have s = 3 ∗ 10 + .1 ∗ 102 = 40. In
this example we will take the derivatives of our equation. We will then multiply
them to get the derivative we want.
d widgets dw
= = 4 − 0.02 ∗ s
d sludge ds
d sludge ds
= = 3 + .2 ∗ g.
d goop dg

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

need to multiply the derivatives to cancel the ds.


dw dw ds
= ∗ = (3.2)(5) = 16.
dg ds dg
Thus the rate of widget production is increasing by 16 units per increase in
on unit of goop at that point. □
We often run into situations where several quantities are related by some
constraint or equation. In such situations we will want to know the rate at
which quantities are changing with time. The technique of related rates gives
us a way to move from one rate with respect to time to another. Recall the
Cobb-Douglas equation from the last section:

Y = ALα K β ,

where Y , L, and K represent total production, labor, and capital, respectively.


If we know the rate of investment in capital equipment, we will be interested
in the rate of change of labor with respect to time. An interesting question is
to ask for the rate of change of capital with respect to labor, or how increasing
or reducing capital investment will raise or lower labor costs.
Example 5.2.5 Cobb-Douglas. A gizmo manufacturer has a production
function given by
Y = 50L0.75 K 0.25 .
The manufacturer currently uses 16 units of labor and 81 units of capital.
The total production is constant but the manufacturer is investing in automa-
tion. The derivative of capital with respect to time is 2. How fast is the amount
of labor needed changing?
Solution. We are going to assume that both labor and capital are functions
of time and the Y is a constant. We start by implicitly differentiating our
equation with respect to time.
d
(Y = 50L0.75 K 0.25 )
dt
dL dK
0 = 50 ∗ (0.75 ∗ L−0.25 ∗ ∗ K .25 + L.75 ∗ .25 ∗ K −0.75 ∗ ).
dt dt
dK
We now substitute in for the values of K, L, and dt , which were given.

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

Summary. The related rates technique is an application of the chain rule.


We use this technique when we have either three variables. We may want the
rate of change of one variable with respect to a second, and those variables
may be connected through equations using a third variable. We may also want
to relate the rate of change of two variables with respect to time. We take
advantage of the fact that we can think of a derivative as a fraction of two
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS235

small values. We either want to multiply or divide theses fractions to obtain


the desired derivative.

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.

A Related rates are useful when we are looking at a two-step process


and we are interested in the rate of the combined process.
B Related rates are useful when we are looking at a two variables
related by some constraint or equation and both are varying with
time.

C Related rates and implicit differentiation are interchangeable meth-


ods.
D 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.
E We always can use algebra to reduce to two variables, so we do not
really need related rates.
F The related rates technique is an application of the chain rule.

G None of the above

Exercises: Related Rates Problems


dz
1. Let y = 3x + 5 and z = 4y + 7. Find dx when x = 2 by solving for z as
dz dy
a function of x and taking the derivative, and also by finding dy and dx
and using related rates to apply the chain rule.
Solution.

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

3. Let y = 1000 ∗ 1.06x and z = 200y + 3. Find dz


dx when x = 5.
Solution. First find the derivative
dz dz dy
= = (200)(1000 ∗ 1.06x ln(1.06)) = 200, 000 ln(1.06)1.06x .
dx dy dx
Next plug in our value of x:

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)

Next plug in our value of x:

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

12. Let z = x2 − 3x + 5 and dy


dx = 3. Find dy/dz when x=7.
13. The revenue and expense equations for gizmos are

Revenue = 30 ∗ Quantity − 0.1 ∗ Quantity2


expense = 500 + 10 ∗ Quantity

Find the derivative of revenue with respect to expense when


Quantity = 100.
Solution. If R = Revenue = 30q − 0.1q 2 , then dR
dq = 30 − 0.2q.
If E = expense = 500 + 10q, then dE
dq = 10.
Combining the two rates we get

dR dR/dq 30 − 0.2q
= = .
dE dE/dq 10

Hence at q = 100 we have that

dR 30 − 0.2(100) 10
= = = 1.
dE 10 10
14. The revenue and expense equations for widgets are

Revenue = 200 ∗ Quantity − 0.1 ∗ Quantity2 + .005 ∗ Quantity3


expense = 1000 + 20 ∗ Quantity.

Find the derivative of revenue with respect to expense when


Quantity = 50.
15. The production of gadgets is a two step process:
productA = 50 ∗ RawMaterial + .01 ∗ RawMaterial2
gadgets = 4 ∗ productA − 0.0001 ∗ productA2 .
Find the derivative of gadgets with respect to RawMaterial when
productA = 20.
Solution. Let’s simplify the notation and write the two equations as
p = 50r + 0.01r2
g = 4p − 0.0001p2 .

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

16. The production of whatchamacallits is a three step process:

productA = 10 ∗ RawMaterial − 7
productB = 15 ∗ productA − 20
whatchamacallits = 6 ∗ productB − 5.

Find the derivative of whatchamacallits with respect to RawMaterial


when productA = 15.
Exercise Group. Find the indicated derivative for the production function.
dL
17. Our production function is 960 = 5L0.25 K 0.75 . Find dt if L = 81,
K = 256, dK
dt = 5.
Solution. Take the derivative with respect to t:
d d
960 = 5 [L0.25 K 0.75 ]
dt dt
d d
0 = 5[ (L0.25 )K 0.75 + L0.25 (K 0.75 )]
dt dt
d 0.25 0.75 0.25 d
0 = [ (L )K +L (K 0.75 )]
dt dt
dL dK
0 = [0.25L−0.75 K 0.75 + L0.25 0.75K (−0.25) ].
dt dt
dL
Solve for dt :

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

Rather than looking at the derivative of quantity with respect to


price, or the rate of change with respect to price, we want to look at
the relative rate of change with respect to price, or the Elasticity of
Demand.

If a small change in price causes a big change in demand, the demand is


elastic. In that case, I generally want to lower the price and get a lot more
customers. If I need to make a big change in price to get a small change in
demand, the demand is inelastic. With inelastic demand I can raise revenue
by raising price. Thus, elasticity of demand gives us a tool for maximizing
revenue. We can look at this issue is either the discrete case (arc elasticity) or
the continuous case (point elasticity).

5.3.1 Point Elasticity


To understand elasticity we look at the simple case when the demand price
function is linear. In that case, we can use geometry to understand the problem.

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.

We refer to that quantity as Elasticity of Demand.

d(Quantity/Q0 ) dQuantity/Q0 dQuantity P (Q0 )


E=− =− =− ∗ .
d(Price /P (Q0 )) d Price /P (Q0 ) d Price Q0

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.

When demand is elastic (E > 1), we raise revenue by lowering price.

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.

When the demand is inelastic (E < 1), we increase revenue by in-


creasing price.

A relatively large change in price will produce a relatively small change in


demand. Revenue will be at a maximum when elasticity is 1. This condition
is referred to as unit elasticity.
Note that we have usually described price as a function of quantity, and in
the definition of elasticity we use the derivative obtained from making quantity
a function of price. From related rates, we know that these derivatives are
reciprocals of each other.
Example 5.3.1 Point elasticity. The demand price function for widgets is
given in terms of quantity (q).

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

I need to compute P (Q0 ) and −dQ


dP . Substituting into the demand func-
tion,
P (800) = 20 − 800/100 = 20 − 8 = 12.
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS241

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

Revenue = Price ∗Quantity = 20q − q 2 /100.

We recognize that this is a downward parabola with a maximum when


q = 1000, which is consistent with our results.

5.3.2 Arc Elasticity


Point elasticity was developed for use with a continuous demand price function
where we could take a derivative. Often, our demand price function is a set
of discrete points, because our quantity has to be a whole number. We would
like to adapt elasticity to that case.
For arc elasticity we have two quantity-price points (Quantity1 , Price1 ) and
(Quantity2 , Price2 ). We want to adapt our formula for elasticity to the discrete
case. We can think of the derivative, dQ dP , as the ratio of small changes in
quantity and price. The best value for price and quantity is the average value
from the two points.
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS242

Our formula is converted to:


−∆Quantity average price
E= ∗
∆ Price average quantity
Quantity2 − Quantity1 (Price1 + Price2 )/2
=− ∗ .
Price2 − Price1 (Quantity1 + Quantity2 )/2

Arc Elasticity.

Quantity2 − Quantity1 Price1 + Price2


E=− ∗ .
Price2 − Price1 Quantity1 + Quantity2

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:

Quantity2 − Quantity1 Price1 + Price2


E=− ∗
Price2 − Price1 Quantity1 + Quantity2
5200 − 5000 20 + 18 200 38
E=− ∗ =− ∗ ≈ .373
18 − 20 5000 + 5200 −2 10400
The market for gizmos is inelastic, as a price drop of about 10% only in-
creases the market by about 4%. To increase revenue, I should charge the
higher price. □
Checking my work by computing the revenue at the two points, the first
point, with the higher price and lower quantity produces $100,000, while the
second point, with a lower price and higher quantity produces $93,600 in rev-
enue.
We can use elasticity to approximate change in revenue form a change in
price.
Example 5.3.3 Elasticity in terms of per cent change. The short-term
elasticity for gadgets is 0.6. What is the percentage change in revenue if the
price is raised by 5%?
Solution. An alternate formula for elasticity is:

%change in quantity
E=− .
%change in price

Thus we see the % change in quantity is −(0.6) ∗ 5% = −3%. Thus the


new price is 1.05 times the old price and the new quantity is 0.97 times the old
quantity.

NewRevenue = NewPrice ∗ NewQuantity


= (1.05 ∗ OldPrice) ∗ (0.97 ∗ OldQuantity)
= 1.0185 ∗ OldRevenue

Thus raising the price by 5% will raise revenue by 1.85%. □


CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS243

5.3.3 Reading Check


1. Reading check, 5.3, Elasticity.This question checks your reading com-
prehension of the material is section 5.3, Elasticity, 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 Arc elasticity is computed from two points.


B Elasticity of demand is a concept from economics that looks at rel-
ative rate of change rather than rate of change.
C When demand is inelastic (E is less than 1), we raise revenue by
raising price.
D We say elasticity is low we cannot easily change the price without
changing the demand.
−dQ P (Q0 )
E The formula for Point elasticity is dP ∗ Q0 .

F Elasticity of demand is the relative rate of change with respect to


price.

G When demand is elastic (E is greater than 1), we raise revenue by


lowering price.
H We say elasticity is high if we can easily change the price without
changing the demand.

I None of the above

5.3.4 Exercises: Elasticity Problems

Exercise Group. For the given demand-price function and quantity:


• Find the price associated with the given quantity.

• Find the elasticity for the given quantity.


• State which pricing strategy, raising, lowering, or holding steady on
prices, increases revenue.
• Find the price and quantity that maximizes profit.
Quantity
1. Price = 30 − 50 ; Quantity = 300.
Solution.
300
• Price = 30 − = 30 − 6 = 24
50
−dQ P (Q0 ) −1 P (Q0 ) −1 24 50 ∗ 24
• E= ∗ = = = =
dP Q0 dP /dQ Q0 −1/50 300 300
4

• E > 1 so demand is elastic, which means we raise revenue by


lowering prices.
• We can maximize revenue by finding the price and quantity when
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS244

E = 1 (unit elastic). We want

−1 P (q)
1=E=
dP /dQ q
30 − q/50 1500 − q
1 = 50 =
q q

First solve for q:

q = 1500 − q =⇒ 2q = 1500 =⇒ q = 750.

Next find the price:


Quantity 750
Price = 30− , Price(750) = 30− = 30−15 = 15.
50 50

Hence we have a maximum revenue when Quantity = 750 and


Price = $15. (The actual maximum revenue is Revenue =
Quantity ∗ price = 750 ∗ 15 = $11, 250.)
Quantity
2. Price = 40 − 75 ; Quantity = 1600.
Quantity
3. Price = 50 − 100 ; Quantity = 2500.
Solution.
q 2500
• price = 50 − = 50 − = 50 − 25 = $25
100 100
−dQ P (Q0 ) −1 P (Q0 ) −1 25 2500
• E= ∗ = = = =
dP Q0 dP /dQ Q0 −1/100 2500 2500
1
• When E = 1 we have unit elasticity and the revenue is at a
maximum. Hence we want to leave the price as is.
• The maximum revenue occurs when E = 1, so we want q = 2500
and P = $25.
Quantity
4. Price = 30 ∗ (0.9) 100 ; Quantity = 400.
Quantity
5. Price = 20 ∗ (0.95) 50 ; Quantity = 800.
Solution.

• Price = 20 ∗ (.95)(800/50) = $8.80



−dQ P (Q0 ) −1 P (Q0 )
E= ∗ =
dP Q0 dP /dQ Q0
dP 1
= 20 ∗ (.95)quantity/50 ln(.95) ∗
dQ 50
dP 1
= 20 ∗ (.95)800/50 ln(.95) ∗ = −0.009
dQ 95 50
−1 P (Q0 ) −1 8.80
E= = = 1.22
dP /dQ Q0 −0.009 800

• E > 1, so we raise revenue by lowering the price.


CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS245

• We can maximize revenue by finding the price and quantity when


E = 1 (unit elastic). We want

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

And hence ln(.95)q = −50, so q = −50/ ln(.95) ≈ 975. When


q = 975, we have that price = 20 ∗ (.95)(975/50) = $7.36.
Quantity
6. Price = 40 ∗ (0.8) 50 ; Quantity = 300.

Exercise Group. For the given demand-quantity points:


• Find the elasticity for the given pair of points.
• State which price-point, increases revenue.
7. First price-quantity point = ($50,1000) Second price-quantity point
= ($51,900).
Solution.

(q2 − q1 ) (p1 + p2 )
E=− ∗
(p2 − p1 ) (q1 + q2 )
(900 − 1000) (50 + 51) 10100
=− ∗ = = 5.32
(51 − 50) (1000 + 900) 1900

• E > 1, So the market is elastic and we should choose the lower


price. ($50, 1000)
8. First price-quantity point = ($5.00,387) Second price-quantity point
= ($4.95,410).
9. First price-quantity point = ($1.99,2500) Second price-quantity point
= ($2.01,2385).
Solution.


(q2 − q1 ) (p1 + p2 )
E=− ∗
(p2 − p1 ) (q1 + q2 )
(2500 − 2385) (1.99 + 2.01) 460
=− ∗ =
(1.99 − 2.01) (2500 + 2385) 57.7

• E > 1, So the market is elastic and we should choose the lower


price. ($1.99, 2500)
10. First price-quantity point = ($783,455) Second price-quantity point
= ($792,442).
11. List 3 items where you would expect the demand price to be elastic
and 3 items where you would expect the demand price to be inelastic.
Explain why you have put each item into its category.
Solution. Hint:
Elastic (E > 1) The book mentions an elastic market points to
something that can be easily substituted and where revenue goes up
CHAPTER 5. DIFFERENTIATION TECHNIQUES AND APPLICATIONS246

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

Functions of Several Variables

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:

(1) Evaluate the function at a particular point with Excel.


(2) Make a table of values at a series of points with Excel.
(3) Make a reasonable graph from a table of values.
(4) Zoom in on a graph until it looks like a straight line.

(5) Find the slope of the tangent line.


(6) Give a formula for the tangent line at a point.
(7) Identify the places where the tangent line is flat.
(8) Find local extrema for the function.

(9) Find global extrema for the function.


(10) Learn applications of the derivative.
We would like to look at how to extend these tasks to functions of several
variables. Most of this chapter simply notes how to modify the rules we learned
for functions of a single variable to the multivariable case.

247
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 248

6.1 Evaluating and Graphing Functions of Sev-


eral Variables
Link to worksheets used in this section1
When we were evaluating functions of a single variable we had to replace
the variable with a cell reference. We do the same for functions of several
variables. We simply have to use several cell references.
Example 6.1.1 Bank balances.

Standalone

Figure 6.1.2 Bank Balance Video


Find the amount of money I will have in the bank in 10 years if I deposit
$1000 and the bank pays 5% interest, compounded quarterly. Set the problem
up in Excel so that I can use the worksheet for similar problems with different
numbers.
Solution. We use the formula for future value of a single deposit.
 years∗ppy
rate
FutureAmount = InitialDeposit ∗ 1 + .
ppy

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.

Figure 6.1.3 Show formulas


version
Figure 6.1.4 Unshow formulas
version
At the end of 10 years, we have $1,643.62 in the bank. By simply changing
values in the worksheet, I find that compounding the interest annually reduces
the final amount on 10 years to $1.628.89, while compounding weekly increases
the final amount to $1,648.33. □
In this example we have four variables. We could vary the initial deposit,
the rate, the number of periods per year and the interest rate. In previous
chapters we have a variable (say q) and the function (such as profit) that
depends on q. Such a function might be written as something like Profit(q) =
−3q 2 + 500q − 1000.
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/

Section-6-1-Examples.xlsx
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 249

If we simplify the notation a little bit in this example so that we have


 (y∗p)
r
FA(d, r, p, y) = d ∗ 1 + ,
p

where FA is the future amount, and this is a function of four variables d


(deposit), r (interest rate), p (number of payments), and y (number of years).
Example 6.1.5 Demand price defined by 2 points.

Standalone

Figure 6.1.6 Function from 2 points video


Find the revenue for 500 widgets if I know that the demand price for 100
widgets is $20, the demand price for 200 widgets is $18.75, and that the demand
price is a linear function. Set the problem up in Excel so that I can use the
worksheet for similar problems with different numbers.
Solution. To make our worksheet easier to read, we use named cells. We first
have to find an equation for the demand price formula. We compute a slope
and intercept for this line from the points (100, 20) and (200, 18.75). Once we
have this function, we find that the demand price is $15 when quantity is 500.
We then compute revenue as price times quantity.

In this problem, revenue is a function of 5 variables: Demand1, Demand2,


Price1, Price2, and NewDemand. □
The next task to consider is making a table of values for a function of several
variables. Since our screens have 2 dimensions, we first look at the case when
we allow two values to change. When we made a table for a single variable,
we had to use both absolute and relative cell reference to distinguish between
constant values used for all entries and variables that changed in each case.
With functions of two variables our table will have rows where one variable
is held constant and columns where the other is held constant. We note that
quick filling a formula with the reference $A5 will keep the column, A, constant
but allow the row to change. Similarly with the reference A$5 the column can
change, but the row is constant.
Example 6.1.7 Building a table with two variables.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 250

Standalone

Figure 6.1.8 Video of table with two variables example


I want to produce a table that shows how much I need to put in the bank
to have $100,000 at some point in the future. I will assume that interest is
compounded annually. I want interest rate and number of years to be treated
as variables with interest rate ranging from 5% to 6% and the length of time
to vary from 5 to 40 years.
Solution. We use the formula for present value of a single deposit. Since the
interest is compounded annually, the formula simplifies.

FutureAmount
PresentAmount = .
(1 + rate)years

As we build the table, the future amount will be a constant, so it needs to


be given as an absolute reference. The number of years will be down the left
side of the table and will be constant across a row, so its reference should have
a dollar sign before the letter. The interest rate will be listed across the top of
the table, so its reference should have a dollar sign before the number.

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

Figure 6.1.11 Video presentation of mortgage payments


I want to produce a table that shows the monthly payment on a $100,000
mortgage with a range of interest rates and lengths of the mortgage.
Solution. We use the PMT command to find the monthly payment.

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

Figure 6.1.13 Video Producing a graph from a table


I have a company that produces two products, widgets and gizmos. The
two demand functions are:

PriceGizmo = 10 − QuantityGizmo/50
PriceWidget = 20 − QuantityWidget/40.

Produce a table and a graph for revenue as a function of the quantity of


gizmos and widgets produced.
Solution. We need to start by producing a formula for revenue. To shorten
the equations we will abbreviate the terms or use initials. We need formulas
for revenue for each of our products:
 
QG QG2
RevG = PriceG ∗ QG = 10 − QG = 10QG −
50 50
 
QW QW2
RevW = PriceW ∗ QW = 20 − QW = 20QW − .
40 40

Putting the equations together gives an equation for revenue.

QG2 QW2
Revenue = RevG + RevW = 10QG − + 20QW − .
50 40
Next we build a build a table for the function as we have done above.

Figure 6.1.14 First table


Finally, we would like to see a graph of the function. We notice that the
3D plots in Excel have a number of drawbacks. The plots do not label the
input variables. These first plots also don’t tell us what values of the variables
correspond to particular points on the graph. Some of these drawbacks can be
overcome, but only with more work than we wish to expend in this course. We
will only add one non-intuitive option to make the graphs work better.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 253

Figure 6.1.15 Second table


We will move the names of the variables out of the upper left corner of the
chart and into the row above and to the side of the data. We leave the corner
cell blank. This will let us see the values of the variables in the graphs. In
the table, we select the data we would like to graph. In this example we select
from cells B4 through M12. Finally, we select a chart to insert. The charts
we are interested in are surface charts. The types of interest are 3-D Surface,
Wireframe 3-D, and contour. Each of these chart types highlights some useful
information.
The 3-D Surface gives a fast picture. It is useful in seeing local minimums
and maximums.

Figure 6.1.16 Surface chart


The Wireframe 3-D chart emphasizes that we can build a reasonable picture
from the curves obtained by treating either x or y as a constant. It lets us
understand a function of 2 variables by putting together a collection of several
functions of one variable. This point of view will be useful when we try to take
derivatives.

Figure 6.1.17 Wire frame chart


The Contour chart emphasizes the level curves. The rate of change will be
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 254

fastest in a direction perpendicular to the level curves.

Figure 6.1.18 Contour chart


Another alternative for seeing a graph is to use Wolfram Alpha. Unfortu-
nately variable names in Alpha seem to be limited to a single letter, or a letter
followed by a digit. Thus we change the formula to one using the names g and
w.


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

A Wolfram Alpha will plot functions of two variables.


B All functions have a single input variable, x
C Excel easily graphs functions of three variables.
D In the text, the demand price of an object was discussed as a func-
tion of 5 variables, 2 given demands with associated prices and the
demand quantity in question.
E The book showed how to make a table for functions of two variables.
F In the text, bank balance was discussed as a function of 4 variables.

G None of the above

Exercises: Evaluating and Graphing Functions of Several


Variables Problems
Exercise Group. For the following exercises, set up an Excel notebook, and
evaluate the given function of several variables at the indicated values. T he
workbook should be set up so that the input values can be changed and the
formula will re-compute with the new values.
1. Evaluate the function f (x, y) = x2 + 3xy + 4y 2 , when x = 4, and
y = −2.
Solution. Setting this up so that the values of x and y can be easily
changed we define x and y in separate cells and then enter the function
that computes f (x, y).

Excel commands and general setup Excel output


2. Evaluate the function f (x, y, z) = x2 + 3xy + 4y 3 + 5xyz, when x = 3,
y = 5, and z = 7.
3. Express cost as a function of quantity, initial cost, and per-unit cost,
when the initial cost is $2,000, the per-unit cost is $25, and the quan-
tity is 75.
Solution. The function we would have is
Cost = Initial cost + per unit cost ∗ Quantity.
We can set this up as a general Excel worksheet that allows us to
vary all three givens.

Excel commands and general setup Excel output


CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 256

4. Express revenue as a function of two quantity demand-price pairs


and quantity, assuming that demand price is a linear function, where
the quantity demand-price pairs are (0, $20) and (100, $18) and the
quantity is 300. (You may find it useful to have intermediate com-
putations that find the coefficients of the demand price function, and
the demand price.)
5. Express revenue as a function of two quantity demand-price pairs and
quantity, assuming that demand price is an exponential function, here
the quantity price pairs are (0, $20) and (100, $18) and the quantity is
300. (You may find it useful to have intermediate computations that
find the coefficients of the demand price function, and the demand
price.)
Solution. To get the price equation we can solve the system of equa-
tions we get by evaluating the exponential function P = P0 ekq at the
two given points:

(0, 20) gives us 20 = P0 e(k∗0)


(100, 18) gives us 18 = P0 e(k∗100) .

Then P0 = 20 (from the first equation) , and 18 = P0 e(k∗100)


implies 18 = 20e(k∗100) so that e(k∗100) = 18/20.
Hence 100 ∗ k = ln(18/20). Solving for k:

k = 1/100 ln(18/20) ≈ −0.0011.

Alternatively we can use Excel. Remember that if we have only


two points we need to add one of the pairs twice so that Excel can
graph the points correctly in a scatter plot.

In Excel we have the Price equation as

P = 20e(−0.001q) .

The difference between the symbolic and numerical answers is a


matter of how many decimals / significant digits we choose to keep.
The simplest answer would be to treat Price as a function of quan-
tity. But this is a section about multivariable functions. So what if
we wanted a more general setting where we were given the following:

• Two points (0, P0 ) and (q1 , P1 )


• A quantity Q
The Price function would be
( ( ) )
1 P
ln P1 q
P = P0 e q1 0 .
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 257

In Excel we could set up a table that would allow us to change P0 ,


P1 , q1 and q
( ( ) )
1 P
ln P1 q
Revenue(P0 , P1 , q1 , q) = q ∗ P0 e q1 0 .

Excel commands and general setup Excel output


6. Express profit as a function of two quantity demand-price pairs, quan-
tity, initial cost, and per-unit cost, assuming that demand price is a
linear function, where the quantity demand-price pairs are (100, $30)
and (200, $28), the quantity is 300, the initial cost is $3000, and the
per-unit cost is $8. (You may find it useful to have intermediate com-
putations that find the cost and revenue.)
7. Express the future value of a deposit as a function of the initial deposit,
the annual interest rate, the number of years the deposit is held, and
the number of times per year that the interest is compounded, where
the deposit of $10,000 is held for 20 years at 3% interest, compounded
monthly.
Solution.
 years∗ppy
rate
FutureAmount = InitialDeposit ∗ 1 + .
ppy

Excel commands and general setup Excel output


For the rate, you should either make sure the cell is formatted as
a percentage. Or you can just enter the decimal 0.03. The display
formula allows you to check that the number is formatted correctly.
We do want Excel to use the value of 0.03 in the formula, not 3.
8. Express the future value of a regular series of deposits as a function of
the periodic deposit amount, the annual interest rate, the number of
years the deposits accumulate, and the number of times per year that
the deposits are made, where the deposit of $200 is deposited weekly
for 20 years at 3% interest, compounded weekly.
9. Express the current value of a bond as a function of the final value,
the annual interest rate, and the number of years the bond is held,
where the final value of the bond is $10,000, held for 15 years at 3.5%
interest, compounded monthly.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 258

Solution.
 −years∗ppy
rate
InitialDeposit = FutureAmount ∗ 1 + .
ppy

Excel commands and general setup Excel output


So, to have $10,000 after 15 years we need to invest $5,920.08 now.

Exercise Group. For the following exercises, set up an Excel notebook


to produce a table for the given function as a function of the two specified
variables and the other parameters. The workbook should be set up so that
the input values can be changed and the formula will recompute with the new
values.
10. Create a table for the function f (x, y) = 3x2 +xy+5y 2 , with x ranging
from −10 to 10, and y ranging from −5 to 15.
11. Create a table for the function f (x, y, z) = xyz + x2 y − y 2 + 5z, with
x ranging from −10 to 10, and y ranging from −5 to 15, with z = 2.
Solution. We need different types of absolute references. If the x
values are entered in column A, and the y values are entered in row 4,
and z is stored in Cell B2:
• When using x, we want to fix the column reference.
• When using y, we want to fix the row reference.
• When using z we want to fix the cell reference.

In table form we get:

We can always check our work by double clicking a value in the


table. This will highlight the calls called upon to compute the entry.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 259

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.

How much detail should you give? Imagine working at a bank.


What would be a good spreadsheet to share with a colleague, boss, or
costumer? It should be adequately labeled and it should be easy to
read.
14. Create a table that expresses the future value of a regular series of
deposits as a function of the annual interest rate and the number of
years the deposit accumulate, with the amount of the deposits and
the number of times per year that the interest is compounded being
treated as parameters, where a deposit of $2,000 is made monthly, and
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 260

the deposits accumulate for 20 to 40 years at interest rates ranging


from 3% to 5%.
15. Create a table that expresses the current value of a bond as a function
of the number of years the bond is held and the interest rate, where
the final value of the bond is $10,000, the number of years the bond
is held runs from 5 to 40 and the interest rate runs from 2% to 6%.
Solution. The entries in the cell look like this:

We can easily read off what our initial investment needs to be if


we want to earn $10,000.
16. 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:
QuantityGizmos QuantityWidgets
PriceGizmos = 50 − −
40 300
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 261

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

Solution. Let x be Gizmo, and x be Widget, then


x y
PriceX = 60(0.9) 100 −
200
y x
PriceY = 40(0.85) 100 −
100
Revenue = xPriceX + yPricey
x y y x
Revenue = x60(0.9) 100 − + y40(0.85) 100 − .
200 100

18. Use either Excel or WolframAlpha to produce a graph of the function


described in Exercise Group 6.1.10–17.

6.2 Wire Frames, Partial Derivatives, and Tan-


gent Planes
Link to worksheets used in this section1
A standard technique in mathematics courses is to try to break a com-
plicated problem into smaller and easier problems. For functions of several
variables this can be done by looking at the variables one at a time, and treat-
ing the other variables as constants. Then we are back to considering functions
of a single variable.

6.2.1 Wire frames


We start by returning to Example 6.1.12 from Section 6.1, and seeing what
information can be obtained by looking at one variable at a time.
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/

Section-6-2-Examples.xlsx
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 262

Example 6.2.1 Optimizing Revenue with Two Products.

Standalone

Figure 6.2.2 Video presentation this example


I have a company that produces two products, widgets and gizmos. The
two demand functions are:
QuantityGizmos QG
PriceGizmos = 10 − = 10 −
50 50
QuantityWidgets QW
PriceWidgets = 20 − = 20 − .
40 40
This gives me the following revenue function:

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

Thus, when we treat either QW or QG as a constant we effectively are


looking at one of the wires of the wire frame. To illustrate this, we will look at
the wires corresponding to QW = 400 and QG = 300. When QG = 300, our
revenue function simplifies to

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.

Figure 6.2.3 Wire mesh

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

Similarly, when QW = 400,

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

6.2.2 Partial Derivatives


The procedure we used in the first example of replacing one variable with a
constant and then taking the derivative of the resulting single variable function
is a bit cumbersome. We can simplify the process by taking the derivative of the
original function with respect to one variable while treating the other variables
as constants. This is referred to as taking a partial derivative. There is also
a change in notation. The familiar derivative of f with respect to x uses the
d ∂
symbol dx f , while the partial derivative with respect to x uses the symbol ∂x f,

or fx . Similarly, the partial derivative with respect to y uses the symbol ∂y f,
or fy .
Example 6.2.4 Finding and Interpreting Partial Derivatives. Find the
partial derivatives of f (x, y) = x2 + 2xy + 3y 2 − 4x − 3y at (x, y) = (3.5, −0.5).
Explain what the partial derivatives mean in terms of the graph.
Solution. It is useful to look at a picture with the graph, the two curves
obtained by keeping x = 3.5 and y = 1.5, and the tangent lines to those
curves.

We also want to look at the slices corresponding keeping x = −3.5 and


y = .5.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 265

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

6.2.3 Tangent Planes and Linear Approximation


For functions of one variable, we had two main uses of the derivative. One was
to identify candidate points for maxima and minima. We will look at critical
points and extrema in the next section. The other use of the derivative was to
produce a linear approximation or tangent line. We can generalize the tangent
line for one variable to a tangent plane for two variables. For a function f (x),
we used the value of the point, (x0 , f (x0 )) and the slope f (x0 ) to get the
equation of the tangent line approximation near x0 .

Tangent line.

Linear f (x) = f ′ (x0 )(x − x0 ) + f (x0 ).

For a function, f (x, y), of two variables, we simply use partials for the
slopes.

Tangent Plane.

Linear f (x, y) = fx (x0 , y0 )(x − x0 ) + fy (x0 , y0 )(y − y0 ) + f (x0 , y0 ).


CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 266

Example 6.2.5 Approximating with a Tangent Plane. The general


Cobb-Douglas production function determines the Production (P), in terms of
the variables Labor (L) and Capital (C):

Production(Labor,Capital) = cLaborα Capitalβ ,

or using short-hand notation:

P (L, C) = cLα C β ,

where c, α, and β are constants. For our widget factory, this becomes

Production(Labor,Capital) = 10L0.75 C 0.25 ,

with labor production and capital in the appropriate units.


Find Production(81, 16). Use a linear approximation to estimate
Production(85, 14).
Solution. We answer the first question by substituting the values into the
equation.

Production(81, 16) = 10 ∗ 810.75 ∗ 160.25 = 10 ∗ 27 ∗ 2 = 540.

To produce the tangent plane we take the partial derivatives and evaluate
them at our base point.

ProductionLabor (Labor, Capital) = 10 ∗ .75Labor−0.25 Capital0.25


ProductionLabor (81, 16) = 10 ∗ .75(1/3) ∗ 2 = 5
ProductionCapital (Labor, Capital) = 10 ∗ 0.25Labor0.75 Capital−0.75
ProductionCapital (81, 16) = 10 ∗ .25 ∗ 27(1/8) = 8.4375.

This gives us our tangent plane:

Production(Labor, Capital) ≈ 5(Labor − 81) + 8.4375(Capital − 16) + 540.

Substituting in values gives our estimate.

Production(85, 14) ≈ 5(85 − 81) + 8.4375(14 − 16) + 540 = 543.125.


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.

Linear Approximations of Functions of More than Two Variables. In


this section we have focused on functions of 2 variables since their graphs are
surfaces in 3 dimensions, which is a familiar concept. For real world functions,
we are often concerned with functions of many variables. The concept of partial
derivative easily extends, with one variable and multiple parameters. Finding
the linear approximation also extends without difficulty. We simply have a
linear term for each variable.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 267

6.2.4 Reading Check


1. Reading check, Wire Frames, Partial Derivatives, and Tangent
Planes.This question checks your reading comprehension of the material
is section 6.2, Wire Frames, Partial Derivatives, and Tangent Planes, 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 Partial derivatives are not defined for functions of three variables.



B The partial derivative of f with respect to x is represented as ∂x f .

C A partial derivative is obtained by treating all but one variable as a


constant.
D A tangent plane can be used for a linear approximation of a function
of two variables.
E Partial derivatives give the slope of the tangent line for the curve
obtained by holding one variable constant.
F The partial derivative of f with respect to x is represented as fx .
G We cannot graph functions of two variables.
H None of the above

6.2.5 Exercises: Wire Frames, Partial Derivatives, and


Tangent Planes Problems
Exercise Group. For the given functions and points P1 and P2 :
(a) Give the 2 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 tangent plane through P1 .
(e) The approximation at P2 obtained from the tangent plane.
1. The function is f (x, y) = x2 +3xy +4y 2 , P1 = (4, 2), and P2 = (3, 2.5).
Solution.
(a) Give the 2 functions of one variable through P1 obtained by
holding each variable constant.
f (4, y) = 16 + 12y + 4y 2
f (x, 2) = x2 + 6x + 16.

(b) Find the partial derivatives of the original function.


fx (x, y) = 2x + 3y
fy (x, y) = 3x + 8y.

(c) Evaluate the partial derivatives at P1 .


fx (4, 2) = 8 + 6 = 14
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 268

fy (4, 2) = 12 + 16 = 28.

(d) Give the equation of the tangent plane through P1 .


We need f (4, 2) = 16 + 24 + 16 = 56 for the equation of the
tangent plane.

Linear f (x, y) = fx (x0 , y0 )(x − x0 ) + fy (x0 , y0 )(y − y0 ) + f (x0 , y0 )


Linear f (x, y) = 14(x − 4) + 28(y − 2) + 56.

(e) The approximation at P2 obtained from the tangent plane.

Linear f (3, 2.5) = 14(3 − 4) + 28(2.5 − 2) + 56


= −14 + 14 + 56 = 56.
2. The function is f (x, y) = (x + 3y)/(x2 + y 2 ), P1 = (2, 3), and P2 =
(3, 2.5).
3. The function is f (x, y) = (x2 )(x + 2y ), P1 = (3, −1), and P2 = (3, 0).
Solution.
(a) Give the 2 functions of one variable through P1 obtained by
holding each variable constant.

f (3, y) = 9(3 + 2y )
1
f (x, −1) = (x2 )(x + 2−1 ) = x3 + x2 .
2

(b) Find the partial derivatives of the original function.

fx (x, y) = (2x)(x + 2y ) + (x2 )(1 + 0) (product rule)


= 2x2 + 2x2y + x2 = 3x2 + (2x)2y
∂ 2
fy (x, y) = (x )(x + 2y ) ( Take partial derivative wrt y)
∂y
∂ 3
= (x + x2 2y ) (Simplify the expression)
∂y
= x2 2y ln(2) (x is treated as a constant so the x3 term drops out).

(c) Evaluate the partial derivatives at P1 .

fx (3, −1) = 27 + (6)2−1 = 27 + 3 = 30


1 9
fy (3, −1) = 9 ∗ ln(2) = ln(2).
2 2

(d) Give the equation of the tangent plane through P1 .


We need f (3, −1) = 9 ∗ 7
2 = 63
2 for the equation of the tangent
plane

Linear f (x, y) = fx (x0 , y0 )(x − x0 ) + fy (x0 , y0 )(y − y0 ) + f (x0 , y0 )


9 63
Linear f (x, y) = 30(x − 3) + ln(2)(y + 1) + .
2 2

(e) The approximation at P2 obtained from the tangent plane.


9 63 9 63
Linear f (3, 0) = 30 ∗ (0) + ln(2) ∗ (1) + = ln(2) + .
2 2 2 2
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 269

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

This function gives us information about the revenue in terns of


Widgets near a production level of 400 widgets and 800 gizmos.
We can use Wolfram Alpha to graph this. Assuming there are
800 gizmos the widget influence on the revenue looks like this:
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 270

The slope is about m = 4.


QG 44QG
Revenue(QG, 400) = 30QG(0.95)( 100 ) +8, 000(0.9)( 15 ) −
40
.
15

The revenue generated by the gizmos assuming the number of


widgets equals 400 and the number of gizmos is near 800 gives
the following picture:

The slope is about m = 8.


(b) Find the partial derivatives of the original function.
In part a we saw that the revenue function seems to be growing
faster for the gizmo variable, then for the widget variable. To
get more information we can compute the partial derivatives (b)
and then evaluate them at P1 (c).

∂ 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

(c) Evaluate the partial derivatives at P1 .


 
800 ln(0.95)
( 800
) (
RevenueQG (800, 400) = 30(0.95) 100 + 24000(0.95) 100 )
100
8800
− ≈ 5.86898
1500
 
400 ln(0.9)
( 400
) (
RevenueQW (800, 400) = 20(0.9) 150 + 20QW(0.9) 150 )
150
4400
− ≈ 4.99164.
1500

The estimates we observed in part a were fairly close to the


actual rates of change.
(d) Give the equation of the tangent plane through P1 .

Linear Revenue(QG, QW) = RevenueQG (QG0 , QW0 )(QG − QG0 )


+ revenueQW (QG0 , QW0 )(QW − QW0 ) + Revenue(QG0 , QW0 ).

We need to find Revenue(800, 400). Using Wolfram Alpha (or


calculator) we get

Revenue(800, 400) = 19, 615.88


Linear Revenue(QG, QW) = 5.86898(QG − 800) + 4.99(QW − 400) + 19, 615.88.

(e) The approximation at P2 obtained from the tangent plane.


The estimated revenue when P2 = (750, 425) is given by

Linear Revenue(750, 425) = 5.86898(−50)+4.99(25)+19, 615.88 = 19, 300.63.

In this case the change in production would result in a loss in rev-


enue. This is mainly due to the impact of the lower production
in gizmos.
6. The function is the Cobb-Douglas production function in a widget
factory,

Production(Labor, Capital) = 10Labor0.8 Capital0.2 ,

where labor is in workers, capital equipment is in units of $20,000,


and production is in units of 200 widgets produced per month. In the
(Labor, Capital) plane, let P1 = (100, 30), and P2 = (110, 25).
7. The function is the Cobb-Douglas production function in a country,
Production(Labor, Capital) = 10Labor0.74 Capital0.26 ,
where labor is in millions of workers, capital equipment is in units
of billions of dollars, and production is in units of billions of dollars
per year. In the (Labor, Capital) plane, let P1 = (300, 30), and P2 =
(310, 32).
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 272

Solution.

(a) Give the 2 functions of one variable through P1 obtained by


holding each variable constant.

Production(300, C) = 10 ∗ 3000.74 C 0.26 = 680.879C 0.26


Production(L, 30) = 10L0.74 300.26 = 24.2132L0.74 .

Hence both cross sections are exponential function.


(b) Find the partial derivatives of the original function.


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 .

Then we have that


L0.74
ProductionC (L, C) = 2.6 .
C 0.74

(c) Evaluate the partial derivatives at P1 .

7.4300.26
ProductionL (300, 30) = ≈ 4.07
3000.26
3000.74
ProductionC (300, 30) = 2.6 0.74 ≈ 14.29.
30

(d) Give the equation of the tangent plane through P1 .

Production(300, 30) = 10 ∗ 300.74 300.26 ≈ 1648.62


Linear Production(L, C) = P rodL (L0 , C0 )(L − L0 ) + P rodC (L0 , C0 )(C − C0 ) + P rod(L0 , C0 )
= 4.07(L − 300) + 14.29(C − 30) + 1648.62.

(e) The approximation at P2 obtained from the tangent plane.

Linear Production(310, 32) = 4.07(310−300)+14.29(32−30)+1648.62 = 1717.9.

So as both L and C increase, so does the production. Specif-


ically increasing L by 10 million workers and C by 2 bil-
lion dollars would give an estimated increase in production of
1717.9 − 1648.62 = 69.28 billions of dollars worth of units.

Exercise Group. For the given functions and points P1 and P2 :


CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 273

(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

(c) Evaluate the partial derivatives at P1 .


(−4 + 9 + 1 − 36 − 8) 38 19
fx (2, 3, −1) = 2
=− =−
(4 + 9 + 1) 196 98
12 − 27 + 3 − 12 − 12 −36 −9
fy (2, 3, −1) = =− =−
196 196 49
−8 − 18 + 2 + 4 + 18 2 1
fz (2, 3, −1) = =− =− .
196 196 98
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 274

(d) Give the equation of the linear approximating function through


P1 .

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

(e) The approximation at P2 obtained from the function in d.


 
13 19 9 1 1
Linear f (3, 2.5, 0) = − (1) − − − (1)
14 98 49 2 98
13 ∗ 7 −19 + 9 − 1 91 − 11 80 40
= + = = = .
14 ∗ 7 98 98 98 49
10. The function is f (x, y, z) = (x2 z)(x + 2y + z 3 ) P1 = (3, −1, 1), and
P2 = (2, 0, 1).
11. The function is the revenue function for selling widgets, gizmos, and
gadgets with demand price functions
QuantityGizmos QuantityWidgets QuantityGadgets
PriceGizmos = 30 − − −
50 300 500
QuantityWidgets QuantityGizmos QuantityGadgets
PriceWidgets = 20 − − −
40 500 400
QuantityWidgets QuantityGizmos QuantityGadgets
PriceGadgets = 40 − − − ,
45 600 300
and in (QuantityGizmos, QuantityWidgets, QuantityGadgets) space,
P1 = (1000, 500, 700), and P2 = (1050, 575, 625).
Solution. We can do the entire problem in terms of gadgets, gizmos
and widgets, but for notation sake we will replace them (alphabeti-
cally) as follows:
x = gadgets, y = gizmos, z = widgets.
We need the revenue function and we have the price functions, so
we have that
Revenue = R(x, y, z) = x Pricex +y Pricey +z Pricez
 z y x   y z x 
= x 40 − − − + y 30 − − −
 45 600 300  50 300 500
z y x
+ z 20 − − −
40 500 400
x2 11xy 89xz y2 2yz z2
=− − − + 40x − − + 30y − + 20z.
300 3000 3600 50 375 40
(Note: the last step/simplification was done in Wolfram Alpha)
(a) Give the 3 functions of one variable through P1 obtained by
holding each variable constant.
1
R(x, 500, 700) = (−3x2 + 18775x + 8895000)
900
1
R(1000, y, 700) = (−9y 2 + 10170y + 9500000)
450
1
R(1000, 500, z) = (−9z 2 − 2660z + 16140000),
360
so the cross sectional function are all quadratic (parabolas) that
open downwards.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 275

(b) Find the partial derivatives of the original function.


Finding the partial derivatives when dealing with three variables
is very similar to the procedure we use when we have two vari-
ables. We treat the other variables as constants.
x 11y 89z
Rx (x, y, z) = − − − + 40
150 3000 3600
11x y 2z
Ry (x, y, z) = − − − + 30
3000 25 375
89x 2y z
Rz (x, y, z) = − − − + 20.
3600 375 20

(c) Evaluate the partial derivatives at P1 .

1000 5500 89(700) 511


Rx (1000, 500, 700) = − − − + 40 =
150 3000 3600 36
11000 500 1400 13
Ry (1000, 500, 700) = − − − + 30 =
3000 25 375 5
89000 1000 700 76
Rz (1000, 500, 700) = − − − + 20 = − .
3600 375 20 18

(d) Give the equation of the linear approximating function through


P1 .
246700
R(1000, 500, 700) = .
9
Then the linear approximation is given by

Linear Revenue(x, y, z) = R(1000, 500, 700)


+ Rx (1000, 500, 700)(x − 1000)
+ Ry (1000, 500, 700)(y − 500)
+ Rz (1000, 500, 700)(z − 700)
246700 511 13
= + (x − 1000) + (y − 500)
9 36 5
763
− (z − 700).
18

(e) The approximation at P2 obtained from the function in d.


246700 511
Linear Revenue(1050, 575, 625) = + (50)
9 36
13 763
+ (75) − (−75) = 31, 495.
5 18

6.3 Critical Points and Extrema


6.3.1 Critical Points
Link to worksheets used in this section1
With functions of one variable we were interested in places where the deriv-
ative is zero, since they made candidate points for the maximum or minimum
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/

Section-6-3-Examples.xlsx
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 276

of a function. If the derivative is not zero, we have a direction that is downhill


and moving a little in that direction gives a lower value of the function. Simi-
larly, with functions of two variables we can only find a minimum or maximum
for a function if both partial derivatives are 0 at the same time. Such points
are called critical points.

The point (a, b) is a critical point for the multivariable function


f (x, y), if both partial derivatives are 0 at the same time.
In other words,

f (x, y)|x=a,y=b = 0
∂x
and

f (x, y)|x=a,y=b = 0.
∂y

Example 6.3.1 Finding a Local Minimum of a Function.

Standalone

Figure 6.3.2 Video of finding local minimum


Use the partial derivatives of f (x, y) = x2 + 2xy + 3y 2 − 4x − 3y to find the
minimum of the graph.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 277

Solution.

Critical Point In the previous section, we already computed


by Algebra

f (x, y) = 2x + 2y − 4
∂x

f (x, y) = 2x + 6y − 3.
∂y
We need to find the places where both partial derivatives
are 0. With this simple system, I can solve this system al-
gebraically and find the only critical point is (9/4, −1/4).

0 = 2x + 2y − 4
0 = 2x + 6y − 3.

Subtract the equations to eliminate x:

0 = 0 − 4y − 1.

Solve for y:

4y = −1
y = −1/4.

Substitute back and solve for x:

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.

Figure 6.3.3 Critical point setup


To get solver to set both partials to 0 at the same time,
I ask it to solve for fy = 0, while setting fx = 0 as a
constraint. Make sure to uncheck the box that makes
unconstrained variables non-negative.

Figure 6.3.4 Critical point setup


This finds our critical point within our error tolerance.

Critical Point We can also use Wolfram|Alpha to find the solution to


by CAS our system of equations.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 279

Determining We thus get a critical point at (9/4, −1/4) with any of


the Critical the three methods of solving for both partial derivatives
Point is a being zero at the same time. Once we have a critical point
Minimum we want to determine if it is a maximum, minimum, or
something else. The easiest way is to look at the graph
near the critical point.

It is clear from the graph that this critical point is a local


minimum.

It is easy to see that f (x, y) = x2 + y 2 has a critical point at (0, 0) and that
that point is a minimum for the function. Similarly, f (x, y) = −x2 − y 2 has
a critical point at (0, 0) and that that point is a maximum for the function.
For some functions, like f (x, y) = x2 − y 2 , which has a critical point at (0, 0),
we can have a maximum in one direction and a minimum in another direction.
Such a point is called a saddle point. We note that we can have a saddle
point even if the x and y slice curves both indicate a minimum.
Example 6.3.5 A Saddle Point at a Minimum on Both Axes.

Standalone

Figure 6.3.6 Video presentation of this example


Show that f (x, y) = x2 − 3xy + y 2 has a critical point at (0, 0), which is a
minimum of both slice curves, but is not a local minimum.
Solution. We look at the two partial derivatives, and notice they are both
zero at the origin.

f (x, y) = 2x − 3y
∂x

f (x, y) = −3x + 2y.
∂x
We then see that both slice curves are parabolas that bend up, with a
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 280

minimum at 0.

f (x, 0) = x2
f (0, y) = y 2 .

However if we take the slice with x = y, we get a parabola bending down,


so we don’t have a minimum.

f (x, −x) = x2 − 3xx + x2 = −x2 .

Looking at the graph, we see that this graph does not have a minimum.

6.3.2 Second Partial Derivatives


With only first derivatives, we can just find the critical points. To check if a
critical point is maximum, a minimum, or a saddle point, using only the first
derivative, the best method is to look at a graph to determine the kind of
critical point. For some applications we want to categorize the critical points
symbolically.
With functions of one variable we used the second derivative to test if a
critical point was a maximum or minimum. In the two variable case we need
to define the second derivatives and use them to define the discriminant of a
function to test if a critical point is a minimum, maximum, or saddle point.
We first need to define second partial derivatives.

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

f (x, y) = x2 + 3xy + 5y 3 − 7x − 11y.


CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 281

Solution. We start by computing the first partial derivatives.


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

As expected, the mixed partials are the same. □

6.3.3 Using the Discriminant to Test Critical Points


To test if a critical point is a maximum, minimum, or saddle point we compute
the discriminant of the function.
Discriminant.

D(f (x, y)) = fxx fyy − fxy


2
.

Example 6.3.8 Finding the Discriminant of a Function. Find the


discriminant of
f (x, y) = x2 + 3xy + 5y 3 − 7x − 11y.

Solution. We have already computed the second partial derivatives.

fxx = 2, fxy = 3, fyy = 30y.

Substituting into the formula,

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.

Example 6.3.9 Using the Discriminant to Classify Critical Points.


Based on the information given, classify each of the following points as a local
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 282

maximum, local minimum, saddle point, not a critical point, or not enough
information to classify.

p fx fy fxx fxy fyy


A 0 0 0 0 1
B 0 1 3 2 4
C 1 0 0 2 3
D 0 0 1 2 0
E 0 0 -1 2 3
F 0 0 -3 1 -2
G 0 0 3 3 3

Solution. We need to compute the discriminant and apply the test.

p fx fy fxx fxy fyy Discriminant Classification


A 0 0 0 0 1 0 Not enough information
B 0 1 3 2 4 8 Not a critical point
C 1 0 0 2 3 -4 Not a critical point
D 0 0 1 2 0 -4 Saddle point
E 0 0 -1 2 3 -7 Saddle point
F 0 0 -3 1 -2 5 Maximum
G 0 0 3 3 3 0 Not enough information

Example 6.3.10 Finding and Classifying Critical Points. Let f (x, y) =
x3 − 3x + y 3 − 3y 2 . Find the critical points and classify them using the dis-
criminant.
Solution. We start by computing the first partial derivatives.

fx = 3x2 − 3 = 3(x − 1)(x + 1)


fy = 3y 2 − 6y = 3(y − 2)(y).

Then we compute the second partial derivatives and the discriminant.

fxx = 6x, fxy = 0, fyy = 6y − 6, D = (6x)(6y − 6) − 02 = 36xy − 36x.

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.

6.3.4 Reading Check


1. Reading check, Wire Frames, Critical Points and Extrema.This
question checks your reading comprehension of the material is section 6.3,
Critical Points and Extrema, 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 If the discriminant of f is positive , and fxx is negative, then we


have a local maximum.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 283

B The point (a, b) is a critical point for the multivariable function


f (x, y), if both partial derivatives are 0 at the same time.
C If the discriminant of f is positive at a critical point, and fxx is
positive, then we have a local minimum.

D We cannot have a maximum if the discriminant is zero.


E If the discriminant is negative at a critical point, then we have a
saddle point.
F If a function is a minimum in both the x and y directions, then it is
a minimum.
G The formula for the discriminant of f (x, y) is is fxx fyy − fxy
2
.
H A saddle point has a minimum in one direction and a maximum in
a different direction.

I None of the above

6.3.5 Exercises: Critical Points and Extrema Problems


Exercise Group. For the given functions and region:
• Find the partial derivatives of the original function.
• Find any critical points in the region.
• Produce a small graph around any critical point.
• Determine if the critical points are maxima, minima, or saddle points.
1. The function is f (x, y) = x2 + 2xy + 4y 2 + 5x − 6y, for the region
−10 ≤ x ≤ 10, and −10 ≤ y ≤ 10.
Solution.

fx (x, y) = 2x + 2y + 5
fy (x, y) = 2x + 8y − 6.

• Set the partial derivatives equal to 0 and solve for x and y.


fx (x, y) = 2x + 2y + 5 = 0
fy (x, y) = 2x + 8y − 6 = 0.

We can use either the method of substitution (solve for x or


y in one equation and substitute into the other and solve), or
method by elimination (multiply both equations by carefully cho-
sen numbers and add/subtract the equations from each other.)
We will demonstrate method of elimination:
−1×(2x + 2y + 5 = 0) gives − 2x − 2y − 5 = 0
1×(2x + 8y − 6 = 0) gives 2x + 8y − 6 = 0.
Adding the two equations gives 6y − 11 = 0; hence, y = 11/6.
Pick one of the equations to solve for x (it does not matter which
one):
2x + 2y + 5 = 0 and y = 11/6
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 284

implies that 2x + 2(11/6) + 5 = 0 so x = (2(11/6) + 5)/(−2) =


−13/3.
We can also solve this system of equations using Wolfram Alpha:

• The command in Wolfram Alpha is:

It is worth looking at both the 3D Plot and the Contour Plot.

3D Plot Contour Plot


• The 3D plot suggests a minimum, and this is confirmed by the
contour plot which shows they typical view of a local minimum.
As an alternative we can find the discriminant.

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.

Since D > 0 and fxx (x, y) > 0 we have a local minimum.


2. The function is f (x, y) = x2 + 7xy + 2y 2 + 4x − 3y, for the region
−10 ≤ x ≤ 10, and −10 ≤ y ≤ 10.
3. The function is f (x, y) = −x2 + 2xy − 4y 2 + 8x − 11y, for the region
−10 ≤ x ≤ 10, and −10 ≤ y ≤ 10.
Solution.

fx (x, y) = −2x + 2y + 8
fy (x, y) = 2x − 8y − 11.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 285

• Set the partial derivatives equal to 0 and solve for x and y.

fx (x, y) = −2x + 2y + 8 = 0
fy (x, y) = 2x − 8y − 11 = 0.

Adding the equations −6y − 3 = 0, and so y = −1/2.


Substituting in the first equation give −2x + 7 = 0, and so
x = 7/2.
Hence we have a critical points at (7/2, −1/2).
• For (x, y) = (2, 1):

• From the picture we conclude that the critical point is a maxi-


mum. As an alternative we can find the discriminant.

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.

Since D > 0 and fxx (x, y) < 0 we have a local maximum.


4. The function is f (x, y) = x3 − 12x + y 3 − 3y, for the region −10 ≤
x ≤ 10, and −10 ≤ y ≤ 10.
5. The function is the revenue function for selling widgets and gizmos
with demand price functions
QuantityGizmos QuantityWidgets
PriceGizmos = 25 − −
50 200
QuantityWidgets QuantityGizmos
PriceWidgets = 30 − −
45 300
for the region 0 ≤ QuantityWidgets ≤ 1500, and 0 ≤
QuantityGizmos ≤ 1500.
Solution. To solve this problem we will rename Gizmos x and Wid-
gets y. This will make using Wolfram Alpha slightly easier, and sym-
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 286

bol manipulation a tad more straight forward.


x y
PriceX = 25 − −
50 200
y x
PriceY = 30 − −
45 300
Revenue(x, y) = x ∗ PriceX + y ∗ PriceY
h x y i h y x i
= x 25 − − + y 30 − −
50 200 45 300
−36x2 − 15xy + 45000x − 40y 2 + 54000y
= .
1800

−24x − 5y + 1000
Revenuex (x, y) =
600
−3x − 16y + 10800
Revenuey (x, y) =
360

• Using WolframALpha, the critical point is at


(62000/123, 23800/41) ≈ (504, 580.5).

• Using WolframAlpha we get:

• From the picture we conclude that the critical point is a maxi-


mum.
As an alternative we can find the discriminant.
1
fxx (x, y) = −
25
1
fxy (x, y) = −
120
4
fyy (x, y) = −
25
D = fxx (x, y)fyy (x, y) − fxy (x, y)2 > 0.

Since D > 0 and fxx (x, y) < 0 we have a local maximum.


CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 287

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.

p fx fy fxx fxy fyy


A 1 2 3 4 5
B 0 0 0 0 0
C 0 1 2 5 3
D 0 0 2 2 2
E 0 0 1 2 3
F 0 0 0 1 0
G 0 0 0 -1 0

Solution. Add a column for D and classify.

p fx fy fxx fxy fyy D Classification


A 1 2 3 4 5 -1 Not Critical
B 0 0 0 0 0 0 Not Enough Info
C 0 1 2 5 3 -19 Not Critical
D 0 0 2 2 2 0 Not Enough Info
E 0 0 1 2 3 -1 Saddle Point
F 0 0 0 1 0 0 Not Enough Info
G 0 0 0 -1 0 0 Not Enough Info
8. 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.

p fx fy fxx fxy fyy


A 1 2 3 4 5
B 0 0 0 0 0
C 0 1 2 5 3
D 0 0 2 2 2
E 0 0 1 2 3
F 0 0 0 1 0
G 0 0 0 -1 0
9. Using polynomials of the form f (x, y) = ax3 + bx4 + cy 3 + dy 4 , produce a
function that has a critical point at (0, 0), of each type.
(1) A local maximum.
(2) A local minimum.
(3) A saddle point where the function f(x,0) has a local maximum and
f(0,y) has a local minimum.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 288

(4) A saddle point where the function f(x,0) and f(0,y) both have inflec-
tion points.

Solution. It helps to consider the question with only one variable.


f (x) = ax3 has an inflection point at x = 0 and neither a max nor a
minimum.
f (x) = ax4 has minimum at x = 0 if a > 0 and a maximum if a < 0.
Since all terms are of degree at least three, all second partial derivatives
are zero at the origin, so the discriminant test fails.

(1) A local maximum: (x, y) = −x4 − y 4 . Both x4 and y 4 are nonneg-


ative, so the function is negative everywhere except at the origin
where it is 0.
(2) A local minimum: f (x, y) = x4 +y 4 . Both x4 and y 4 are nonnegative,
so the function is positive everywhere except at the origin where it
is 0.

(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

6.4 Optimization and Best Fitting Curves


Link to worksheets used in this section1
In the last section we looked at using the partial derivatives to find the
maximum or minimum of a function in several variables. This is an extension
of the optimization problems we did with functions of a single variable. It is
worthwhile to take another look at best fitting curves or trendlines, a process
Excel has been doing throughout the course and see that it is a particular
example of optimization. This will let us to best fitting curves that use models
other than the ones used by the trendline command.

Definition of Best Fitting Curve.

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.

Now that we have a definition we want to look at fitting a line to a simple


data set in three ways. We will start with the data set of three points:
x 2 4 8
y 1 15 15
We want to start with the familiar method, using the trendline command
from a graph. Then we want to use solver to minimize the sum of squared
errors. Finally, we want to look at the function for sum of squared errors to
see how we find the line using partial derivatives. After we have looked at
all three approaches for this first example, we will consider more complicated
examples.

Standalone

Figure 6.4.1 Video presentation of the first two examples>


Example 6.4.2 Finding a Best-Fit Curve with Trendline. Use the
trendline command to find the best fitting line for the data:
x 2 4 8
y 1 15 15
Solution. We start by making a table adding a scatterplot and adding a
trendline to the graph. We remember to select the option to make the formula
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 290

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

Solution. We need to add the predicting equation to use solver . We start


with a randomly chosen slope and intercept for our prediction line. Our table
has a PredictedY column, which gives the value that would be on the line with
our slope and intercept. We add in the error, which is the difference between
the predicted y and the actual y, and the square of the error. We then take
the sum of the squares of the errors.

Our use of Solver is similar to when we were looking for a minimum of a


function of one variable. We need to designate the cell with the value we want
to minimize. We select the button to minimize. Recall that Solver selects the
”Make unconstrained variables non-negative” and we want to uncheck that box.
We now designate two cells that represent variables we can change.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 291

Solver produces the same answer. The best fitting line is

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.

Point x y Predicted-y error error 2


P1 2 1 m∗2+b m∗2+b−1 (m ∗ 2 + b − 1)2
P2 4 15 m∗4+b m∗4+b-15 (m∗4+b-15)
P3 8 15 m∗8+b m∗8+b-15 (m ∗ 8 + b − 15)2

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

SumErrorSq(m, b) = 84m2 + 28mb + 3b2 − 62b − 364m + 451.

We take the partial derivative of this function with respect to the slope m
and the intercept b.

SumErrorSqm (m, b) = 168m + 28b − 364


SumErrorSqb (m, b) = 28m + 6b − 62.

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

Example 6.4.5 Use the Solver Method on a larger Data Set.

Standalone

Figure 6.4.6 Video presentation of this example


The table below gives census data for a collection of 10 states. Find the
best fitting line to predict 2010 population based on 2000 population.

Pop 2000 Pop 2010


Wyoming 493,782 563,62
Delaware 783,600 897,934
Maine 1,274,923 1,328,361
Nevada 1,998,257 2,700,551
Iowa 2,926,324 3,046,355
Kentucky 4,041,769 4,339,367
Arizona 5,130,632 6,392,017
Washington 5,894,121 6,724,540
New Jersey 8,414,350 8,791,894
California 33,871,648 37,253,956

Solution. We set up a spreadsheet in the same way we set it up in the last


example. For an initial slope we will start with 1.1 for 10% growth. For a
starting point we will guess an intercept of 0. As we did in the last example,
the predicted population in 2010 is the slope times the population in 2000 plus
the intercept. We add extra columns for the predicted population, the error
between the prediction and the actual population, the square of the error. At
the bottom of the last column, we add the squared errors. This gives the value
we want to minimize.

When we use solver, the best fitting line is

2010population = 1.096 ∗ 2000population + 98, 154.


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:

TotalValue(time) = CashAmount + DepositAmount ∗ ratetime .

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

Figure 6.4.8 Video presentation of this example


We are given the following data on the value of a portfolio over time:

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

TotalValue(time) = CashAmount + DepositAmount ∗ ratetime .


CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 294

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

Figure 6.4.10 Video presentation of this example


We are managing a wood harvesting business. The number of trees available
in a plot is modeled as constrained growth. That means we expect it to be
modeled by a logistic equation.

AvailableTrees(time) = Capacity/(1 + C ∗ e(−rate∗time) .

We have the following information. Find the best fitting curve.

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

Strengths and weaknesses of the three methods of fitting curves. We


have examined three methods for finding a best fitting curve. From Chapter 1,
we reviewed the method of plotting points and adding a trendline. Using the
sum of least squared error definition of best fit, we looked at creating an error
function and using Solver to minimize the error. We also looked at using partial
derivatives to find critical points of the error function. It is worthwhile to look
at some of the strengths and weaknesses of each method.
The method of graphing points and using the trendline command has the
advantage of being the simplest method when it works. The biggest disadvan-
tage of this method is that it only works with a small collection of mathematical
models. (We can use this method if our desired equation is linear, y = mx + b,
logarithmic, y = a log(x) + b, polynomial of degree no more than 6, power,
y = axb , or exponential, y = aebx .) As we have seen in this section, it is
not hard to find situations where some other model should be used. This
method also has the disadvantage of simply giving an answer without showing
intermediate steps that might provide other useful information.
The method of using partial derivatives has the advantage of being mathe-
matically clear. It shows us what is going on when we find a best fitting curve.
However, in all but the simplest cases, this method has the disadvantage of
involving a daunting flood of computations. This method is good for informing
us about how the method works, but not a method we want to use in practice
for most realistic problems.
The middle method, using Solver, is a hybrid of the other two methods.
We start by deciding on the mathematical model that should fit our situation.
As we saw, the method is straightforward to adapt to any kind of equation. It
is straightforward to explicitly build our error function. This method also has
the advantage of making the error attributed to each point visible. We can see
if another curve is almost as good as the solution we find.
The disadvantages of the Solver method are the standard disadvantages
of using Solver to find a minimum. Recall that Solver simply finds a local
minimum from a starting point. Since solver uses numerical methods it looks
for places where the partial derivatives are within our tolerance bounds of
zero. We cannot expect Solver to give an answer that is more precise than the
tolerance bounds. With all of the methods we should be aware that we need
enough points to get a reasonable fit of the curve. Intuitively, a small change
in any point should not cause a big change in the curve.
As a general rule, we will use the trendline command when it works with
the kind of equation we have decided to use as our model.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 296

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.

A Solver always find the global minimum of a function.


B The method of graphing points and using the trendline command
has the advantage of being the simplest method when it works.

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.

H None of the above

Exercises: Optimization and Best Fitting Curves Prob-


lems

Exercise Group. For the given data sets:


(1) Plot the points and add a linear trendline. Show the equation of the line.
(2) Create a spreadsheet to compare the data to a linear function.

(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

Solution. With trendlines we get the best fitting line:


CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 297

The line that gives us the best fitting curve is y = 2.5x + 1.


Using the least square error method we have the following values.
We can set the information up as rows or as columns. Using the
rows form the initial problem we have:

Next we use Solver to minimize the sum of the errors.

We started with m = 2 and b = 5 (somewhat arbitrary choices).


We unchecked the constraint that the variables should be non-negative
(m and/or b could theoretically be negative).

The least square method gives us the function y = 2.5x + 1.


(Comment: this shows that the least squares method gives the
same answer as the trendline method. The Least Square method is a
more general technique however and can be used in cases where the
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 298

trendlines are not sufficient. )


2. The given points are:

x -2 0 6
y 24 10 20
3. The given points are:

x -3 -1 1 3
y -2 6 10 10

Solution.

We would define m and b and use these to create

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:

Setting up Solver as shown above we get m = 2 and b = 6.


4. The given points are:
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 299

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:

Amount(time) = InitialAmount ∗ ratetime .

With the data:


Time 0 2 5 10 15 20
Amount $5000 $5600 $6700 $9000 $12000 $16000
Find the best fitting curve of the given model.
Solution. A scatter plot of the data will help us find some good
initial guesses for the initial amount and the rate.

The y-intercept is about $5000. This occurs when time = 0, so


the initial guess for the initial amount will be 5,000. The graph is an
increasing function, so we know rate > 1.
Choosing rate = 1 will cause problems (the base of an exponential
function should not be 1). Assuming this is a reasonable investment
problem we will assume 5$ growth, so r = 1.05.
The initial set-up looks like this. We have included a graph of the
data given versus the predicted numbers. The initial guesses are not
bad, but clearly we can do better.
CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 300

After using Solver we determine that the best model function for
our data is as follows:

Amount(time) = 5, 013.11 ∗ (1.06)time .


Notice that the data is now indistinguishable from the model function
in the graph.
Remark: If we use Trendlines to find a exponential function that
fits the data, we would get y = 5001e0.0583∗time . The least square
error analysis shows that this is not as good of an approximation as
the one we just found using Solver! The least squares error for the
trendline is approximately 30% greater than for the value we found
using Solver.
6. Fred has put some of his money in a cash account that pays no interest
and the rest of his money a single account that compounds the return
back into the account. Thus, the model we want to use for the amount
is

Amount(time) = CashAmount + InvestmentAmount ∗ ratetime .

With the data:


Time 0 2 5 10 15 20
Amount $10000 $11000 $14000 $19000 $27000 $39000

Find the best fitting curve of the given model.


7. Mary has put some of her money in an investment that pays simple in-
terest and the rest of her money into a single account that compounds
the return back into the account. Thus, the model we want to use for
the amount is

Amount(time) = Amount1 + Return1 ∗time + Amount2 ∗rate2 time .

With the data:


CHAPTER 6. FUNCTIONS OF SEVERAL VARIABLES 301

Time 0 2 5 10 15 20 30 40
Amount $10000 $11300 $13500 $18300 $24700 $33500 $62600 $118800

Find the best fitting curve of the given model.


Solution. The function we are looking for has a linear component
(Amount1 + Return1 ∗|time), and an exponential component. There
is no trendline that would do this for us.
What do we know about these values?
• We have $10,000 at the very beginning and this is split into two
different investments, so Amount 1 + Amount 2 = $10,000.
• What is Return 1? It should be the return on the first part of
the investment. So it should be some amount we receive on an
investment of at most $10,000. A first guess would be that the
value is in the hundreds of dollars, but maybe close to $150 or
$200?
• The rate is our final parameter. This is the growth due to inter-
ests. We will start with a guess of rate = 1.05.
The Excel commands used to generate the table are as follows:

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

The solution is:


Amount 1 3317.59
return 1 163.19
rate 1.07

Hence Amount2 = 10, 000 − 3, 317.59 = 6, 682.41, and we have that

Amount(time) = $3, 317.59 + $163.19 ∗ time + $6, 682.41 ∗ (1.07)time .

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:

Amount(time) = Amount1 ∗ratetime


1 + Amount2 ∗rate2time .

With the data:

Time 0 2 5 10 15 20 30 40
Amount $10000 $11500 $14000 $20000 $29000 $41500 $87000 $183500

Find the best fitting curve of the given model.


Chapter 7

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

In other words, the cost function is the accumulation of the derivative


(the marginal cost). Graphically, the cost function corresponds to the area
underneath the marginal cost function.
We want to consider the accumulation of continuous functions. In the
language of calculus this is called finding an integral.

7.1 Approximating Definite Integrals as Sums


Link to worksheets used in this section1
The standard approach to accumulation is to reduce the problem to an
area problem. If we let f (t) be a velocity function, then the area under the
y = f (t) curve between a starting value of t = a and a stopping value of t = b
is the distance traveled in that time period. In the easiest case, the velocity is
constant and we use the simple formula

distance = velocity ∗ time.


Example 7.1.1 Distance with Constant Speed. Find the distance trav-
eled if I go 60 mph from 12:30 until 3:00.
Solution. This problem is easy to do without any calculus. If we graph the
velocity function

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.

Similarly we could get a better estimate by looking at 8 subintervals and


seeing that the area under the parabola is no more than 12.5.
CHAPTER 7. INTEGRATION 306

If we continue the process with 100 subintervals, our estimate is down to


10.83. From the picture, it looks like a fairly good estimate.

We can change the number of subdivisions with the interactive below.

Figure 7.1.3 GeoGebra: Upper sum approximation


While this process would be very long and tedious by hand, the process of
finding the area of each of 100 rectangles and adding the areas is rather easy
in Excel. Before going to Excel, we want to make a small adjustment in our
method. The method we used always gives an overestimate. It also requires
that we know where the function reaches a maximum on each subinterval. It
will be easier if we estimate area by always taking the height of the rectangle
at the right end of the subinterval. With 4 subintervals this gives an estimate
of 10 for our area.
CHAPTER 7. INTEGRATION 307

When we increase the number of subintervals to 100, we once again get a


fairly good estimate of the area. From the picture, it is hard to see difference
between the area defined by the curve and the area defined by the rectangles.


Example 7.1.4 Approximating an Area with a Riemann Sum with
Excel.

Standalone

Figure 7.1.5 Riemann Sum with Excel Video


Find the area under the curve y = x ∗ (4 − x) with x between 0 and 4 with
Excel
Solution. We will approximate the area with 100 rectangles. We set up a
worksheet to find the area of the first rectangle.
CHAPTER 7. INTEGRATION 308

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

Figure 7.1.9 Video presentation of this example


The estimated current value of the revenue stream, in billions of dollars, of
a company being bought out is f (x) = exp(−0.06 ∗ x) ∗ 0.235. The present
value of that revenue stream is the area of the region under the curve y = f (x)
from x = 0 to x = 15. Use 500 intervals to estimate the present value.
Solution. Although the data in the question for this example is quite different
from the previous example, the setup for the worksheet to evaluate the Riemann
sum is the same.
CHAPTER 7. INTEGRATION 310

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.

A We can approximate the area under a curve with a sum of rectan-


gular areas.
B One of the examples in the section looked at finding the present
value of a revenue stream.

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.

E One of the examples in the section looked at finding the volume of


a solid of revolution.
F This sections gave a list of formulas of definite integrals of nice func-
tions.

G The limit of a Riemann Sum is a Definite Integral.


H None of the above

Exercises: Approximating Definite Integrals as Sums Prob-


lems
1. Let f (x) = 4x+5. Estimate the area under f (x) on the interval 0 ≤ x < 7
using 100 rectangles and a right hand rule.
Solution. The Excel commands are:

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

The area is approximately 133.98.

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.

The area underneath the curve is approximately 193.228 according to


the Excel computation.

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

Solution. A set-up similar to the one in problems 1 and 3 gives us an


approximation for the area of 42.69.

6. Let f (x) = x exp(−0.7x). Estimate the area on the interval 1 ≤ x < 5


under f (x) using 100 rectangles and a right hand rule.
7. Let f (x) = (5x + 3) exp(−0.7x). Estimate the area under f (x) on the
interval 0 ≤ x < 5 using 100 rectangles and a right hand rule.
Solution. The area underneath the curve is approximately 12.92

8. Consider the area under the line y = 5x + 7 on the interval 1 ≤ x ≤ 5.


(a) Using only what you know about areas of rectangles and triangles,
find the exact area.

(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

(d) If error < 10−6 . Then 13.5


N < 10
−6 N
. Then 13.5 > 1, 000, 000, and
hence N > 13, 500, 000.
10. You have a natural gas well. You have been told that as gas is extracted
and the pressure in the well lessens, the rate of extraction also decreases.
The weekly production is 10000 exp(−0.01t) cubic feet per week.

(a) Estimate the production in the first year.


(b) Estimate the production in the third year.
11. Sales of your new gadget are estimated at 500 ∗ 2.08t units per month.
(a) Estimate the total sales in the first year.

(b) Estimate the total sales in the fourth year.


(c) Estimate the total sales over the first 5 years.

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

So the total sales is $8,762.22


(b) Estimate the total sales in the fourth year.
We need to adjust the computation so that the sales added corre-
spond to the sales of the fourth year only. This would be from
month 36 to 48. We can just adjust the values in the Excel table
above!

So the total sales in the fourth year are $64,503.12


(c) Estimate the total sales over the first 5 years.
This will be a much larger range. We will add the sales for the first
5 years. In other words: the first 60 months. Note that this means
we want to change N to 60 (we want to do the computation for each
month). The rows from 13 to 65 have been hidden from views to
create a smaller size image for this solution manual:
CHAPTER 7. INTEGRATION 315

The total sales for the first 5 years is $248,947.41


12. You run a low cost, high volume widget manufacturing plant. For reports,
you write your reports in terms of millions of units. When measured in
units of one million widgets and one million dollars, the marginal profit
function is p(x) = −1 + 10x − x2 .

(a) Find the profit from making 12 million widgets.

(b) What quantities have 0 marginal profit?


(c) What is the maximum profit to be made manufacturing widgets?

7.2 The Fundamental Theorem of Calculus


Link to worksheets used in this section1 Rb
In the last section we defined the definite integral, a f (t)dt, the signed
area under the curve y = f (t) from t = a to t = b, as the limit of the area
found by approximating the region with thinner and thinner rectangles. We
also saw that we can easily find a reasonable approximation to the area using
Excel by finding such a sum with a fairly large number of rectangles.
In the trivial case where we have a constant function f (t) = c, we can find
Rb
the area of the area with a simple formula, a c dt = c(b − a) = cb − ca. If we
define an area function, F (x), as the area under the curve y = f (t) from t = 0
to t = x, then the area function in this case is F (x) = c ∗ x. We would like
to be able to evaluate more integrals with a process like this, where we have a
simple area function.
Remark 7.2.1 Note on variables used. We shifted the independent vari-
able from t for the function f to x for the function F because we have two
independent variables in our discussion and we want to keep them separate
to avoid confusion. We will consider f as a function of t, and want to find
the area under the graph of f (t). We will consider F as a function of x, and
understand it as the area under the curve y = f (t) from some starting point
t = a to t = x.
We start by exploring cases where we can justify an area function without
using calculus. We will then look at some cases where we can experimentally
verify the area function with Excel. Finally we will give the general rule for
the area function, the Fundamental Theorem of Calculus, and will give some
justification.
Example 7.2.2 Area function for constant by geometry. Let f (t) = c.
For a constant function, f (t) = c, the area under the curve will be the area of a
rectangle of height c and width b − a. The obvious area function is F (x) = c ∗ x.
Then Z b
cdt = F (b) − F (a) = c ∗ b − c ∗ a = c(b − a).
a

It is worth noting that this formula gives “signed area.” If c or b − a is


negative, the “area” is negative.
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/

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.6 Trendline to area function Video


Repeat the last example, finding the area under f (x) = 6x, with Excel.
Solution. With a linear function we have use the following to produce an
area function.
CHAPTER 7. INTEGRATION 318

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

Figure 7.2.9 Video presentation of this example


CHAPTER 7. INTEGRATION 319

Find the area function when f (t) = 6t2 .


Solution. For this problem we essentially repeat the work of the previous
example with a quadratic function for f (t).

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

Figure 7.2.11 Video presentation of this example


Find the area when f (x) = 6x3 .
Solution. Once again, we can use Excel to produce an area function. The
area function seems to be F (x) = 1.5x4 .
CHAPTER 7. INTEGRATION 320


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

But if h is small, F (x + h) − F (x) is approximately the area of a rectangle


of height f (x) and width h, so then F ′ (x) = f (x). We then note that any two
anti-derivatives of a function differ by a constant.
Example 7.2.14 Redoing an old area problem by the FTC. In Exam-
ple 7.1.4 in the previous section, we used Riemann sums with 100 and 1000
intervals to approximate the area under y = x ∗ (4 − x) with x between 0 and
4. Find the area using the fundamental theorem of calculus.
Solution. We rewrite the curve as f (x) = 4x − x2 and note that one anti-
derivative of f (x) is F (x) = 2x2 − x3 /3. Then
Z 4  
64 2
f (x) dx = F (4) − F (0) = 32 − − (0) = 10 .
0 3 3


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,

F ′ (x) = (2x + 2)(−e−x ) + (x2 + 2x + 2)(e−x ) = x2 e−x = f (x).

The area is

F (2) − F (0) = 10(−e−2 ) − 2(e0 ) = −2 − 10/e2 = −3.3534.


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

We are thus suspicious that the anti-derivative should be a cubic polynomial.


We need
6t2 = d/dt(at3 + bt2 + ct + d) = 3at2 + 2bt + c.
Setting coefficients equal for each power, we see a = 2 and b = c = 0. Thus
our area function has the form F (t) = 2t3 + d. Since F (0) is the area of a
region between t = 0 and t = 0, we conclude d = 0 and our area function is
F (t) = 2t3 . □
Example 7.2.17 Verifying the best fitting function for area under a
cubic function. Find the area when f (x) = 6x3 .
Solution. Using Excel we guessed the area function F (x) = 1.5x4 . We can
now verify that the derivative of F (x) is f (x), so we have found an anti-
derivative. □
It is worth noting that using the fundamental theorem to evaluate integrals
requires us to be able to find an anti-derivative of a function. Finding an
anti-derivative may be quite hard or even an impossible task. The method we
have just used is often referred to as the “guess and check” method of finding
anti-derivatives. We will look at methods of finding anti-derivatives in the next
several sections.

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.

A Let f (x) be a continuous function on the interval [a, b]. Suppose


d
F (x) is any continuous,
Rx differentiable function with dx F (x) = f (x).
Then F (x) = a d(t) dt = F (b) − f (a)
B Let f (x) be a continuous function on the interval
R x [a, b]. On that
interval, define an area function by F (x) = a d(t) dt. Then
d
dx F (x) = f (x).

C The two versions of the fundamental theorem of calculus are inter-


changeable.
D The fundamental theorem of calculus says we can use antiderivatives
to find the area under a curve.
CHAPTER 7. INTEGRATION 323

E The fundamental theorem can be used to evaluate the area under


any function,

F We can use guess and check to verify antiderivatives.


G None of the above

Exercises: The Fundamental Theorem of Calculus Prob-


lems
1. Let f (x) = 4x + 5. We are told that F (x) = 2x2 + 5x + 7 is an anti-
derivative.
(a) Verify that f (x) is a derivative of F (x).
R5
(b) Use the fundamental theorem of calculus to evaluate 1 f (x) dx.
R5
(c) Approximate 1 f (x) dx, using Riemann sums and 100 intervals.

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

(c) The midpoint sum gives us an approximation of 68.

2. Let f (x) = 6x2 + 3. We are told that F (x) = 2x3 + 3x − 2 is an anti-


derivative.
(a) Verify that f (x) is a derivative of F (x).
R4
(b) Use the fundamental theorem of calculus to evaluate −2
f (x) dx.
R4
(c) Approximate −2
f (x) dx, using Riemann sums and 100 intervals.
3. Let f (x) = 5/x. We are told that F (x) = ln(x5 ) + 9 is an anti-derivative.
(a) Verify that f (x) is a derivative of F (x).
R 20
(b) Use the fundamental theorem of calculus to evaluate 1 f (x) dx.
R 20
(c) Approximate 1 f (x) dx, using Riemann sums and 200 intervals.

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.

(a) Verify that f (x) is a derivative of F (x).


R 10
(b) Use the fundamental theorem of calculus to evaluate 0 f (x) dx.
R 10
(c) Approximate 0 f (x) dx, using Riemann sums and 100 intervals.

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

(c) The midpoint sum with N = 100 gives an approximation of 38.06


CHAPTER 7. INTEGRATION 325

6. Explain why, if F (x) is an anti-derivative of f (x), then F (x) + 7 is also


an anti-derivative of f (x).
7. Using an area function from Riemann sums and best fitting curves we
have guessed that a quadratic function will have a cubic anti-derivative.
(a) Find an anti-derivative of f (x) = −x2 + 6x − 2

(b) Use the fundamental theorem of calculus to evaluate


Z 3
• f (x) dx
0
Z 4
• (x) dx
−2

Solution.
(a) The anti-derivative should be a cubic, so something of the form

F (x) = ax3 + bx2 + cx + d,

and the derivative should be f (x) = −x2 + 6x − 2.


We can “guess and check”: F (x) = −1/3x3 + 3x2 − 2x + 0 and sure
enough, the derivative is f (x).
If you are not comfortable with that method note that

F ′ (x) = 3ax2 + 2bx + c,

so 3a = −1,2b = 6, and c = −2.


Hence a = −1/3, b = 3, and c = −2.
There are no conditions on d, so that coefficient can be anything.
We picked 0 to keep things simple. But then

F (x) = ax3 + bx2 + cx + d = −1/3x3 + 3x2 − 2x.

(b) Use the fundamental theorem of calculus to evaluate


Z 3
• f (x) dx = F (3) − F (0) = (−9 + 27 − 6) − (0) = 12
0

Z 4
(x) dx = F (4) − F (−2)
−2
= (−64/3 + 48 − 8) − (8/3 + 12 + 4) = −24 + 40 − 16 = 0.
CHAPTER 7. INTEGRATION 326

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.

(a) Find an anti-derivative of f (x) = x3 + 9x2 + 7x − 3.


R5
(b) Use the fundamental theorem of calculus to evaluate 1
f (x) dx.
2x
9. I am interested in finding an anti-derivative for f (x) = e .
(a) Using Excel and 100 subintervals of 0 ≤ x ≤ 2, compute an approx-
imate area function for f (x). Find a best fitting curve that fits the
data well. (It may help to use a secondary axis for the area data.)
(b) Based on your best fitting curve, use guess and check to find the
anti-derivative.

Solution.
(a) A quick computation gives the total area:

The area under the curve is approx. 26.8.


The area under the curve looks like an exponential curve.
A curve fitting using the Trendline gives us that

F (x) = 0.1618e2 .739x.

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

F ′ (x) = Ae2 x(2) + 0 = 2Ae2 x + 0 = e2 x.

Hence A=0.5 and we may choose B to be any constant we want.


Then
F (x) = 1/2e2 x + B.

That shows us where the problem is in our estimate. Excel’s best


fitting routine does not allow for constants in exponential functions.
CHAPTER 7. INTEGRATION 327

Since F (0) = .5 + B, and Area(0) = 0, we need to add .5 to the


area to get a good best fit curve. Then the best fit line works.

10. I am interested in finding an anti-derivative for f (x) = e−5x .


(a) Using Excel and 100 subintervals of 0 ≤ x ≤ 2, compute an approx-
imate area function for f (x). Find a best fitting curve that fits the
data well. (It may help to use a secondary axis for the area data.)
(b) Based on your best fitting curve, use guess and check to find the
anti-derivative.
11. I am interested in finding an anti-derivative for f (x) = 1/x.
(a) Using Excel and 100 subintervals of 1 ≤ x ≤ 5, compute an approx-
imate area function for f (x). Find a best fitting curve that fits the
data well. (It may help to use a secondary axis for the area data.)
(b) Based on your best fitting curve, use guess and check to find the
anti-derivative.

Solution.
(a)

The cumulative function looks like a logarithmic function.


The Trendline approximation gives the equation y = 0.9913ln(x) +
0.0167.
We can make the fit better when we realize that we are evaluating
at the midpoint of each interval but taking the are to the end of the
interval. We want to look at an adjusted x at the right side of each
interval.
CHAPTER 7. INTEGRATION 328

F (x) = ln(x).

(b) We would say that the anti-derivative is F (x) = ln(x) + constant.


And we have seen before that
d d 1
F ′ (x) = ln(x) + constant = .
dx dx x

7.3 Basic Antidifferentiation


In the last section we looked at the fundamental theorem of calculus and saw
that it could be used to find definite integrals. We saw:

Fundamental Theorem of Calculus (second version).

Let f (x) be a continuous function on the interval [a, b]. Suppose


d
F (x) is any continuous, differentiable function with dx F (x) = f (x).
Rb
Then a f (t) dt = F (b) − F (a).

We thus find it very useful to be able to systematically find an anti-derivative


of a function. The standard notation is to use an integral sign without the
Rb
limits of integration to denote the general anti-derivative. Thus, a f (t)dt is
referred to asR the definite integral of f (x) from a to b, and it is a number.
In contrast, f (x)dx is the indefinite integral of f (x), and it is a function.
We use indefinite integrals or anti-derivatives to evaluate definite integrals or
areas.
We find anti-derivatives by starting with the differentiation formulas of
basic functions and manipulating them so the derivative is aR nice function.
Elementary Anti-derivative 1 — Find a formula for xn dx.
d n
We start with the closest differentiation formula dx x = nxn−1 , and ma-
nipulate it so xn is on the right hand side. We first replace n with n + 1
d n+1
to get dx x = (n + 1)xn . We then divide both sides by n + 1 to obtain
n d n+1
x = dx x /(n + 1). Finally, we note that adding a constant C does not
d
change the derivative, so xn = dx (xn+1 /(n + 1) + C). Since we have divided
by n + 1, we need to insist that n + 1 ̸= 0. Using the notation of indefinite
integrals we obtain our power rule formula:
CHAPTER 7. INTEGRATION 329

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)

Sum, Difference, and Constant Multiple rules — The rules we had


for taking derivatives of sums, differences, and constant multiples of functions
translate into similar rules for integrals.
d d d
The derivatives of a sum rule, dx (f (x) + g(x)) = dx f (x) + dx g(x), becomes
the
Integral of a Sum Rule.
Z Z Z
(f (x) + g(x)) dx = f (x) dx + g(x) dx

The derivatives of a difference rule, d


dx (f (x) − g(x)) = d
dx f (x) − d
dx g(x),
becomes the
Integral of a Difference Rule.
Z Z Z
(f (x) − g(x)) dx = f (x) dx − g(x) dx
CHAPTER 7. INTEGRATION 330

Integral of a Constant Multiple Rule.


Z Z
cf (x)dx = c f (x) dx

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.

Since we can use any anti-derivative, we simplify by setting C = 0 and


choosing the anti-derivative F (x) = 2x3 + 2x.
Z 3
6x2 + 2 dx = F (3) − F (1) = 60 − 4 = 56.
1

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

Find the production over the first 5 years.


Solution. The total production for 5 years will be the definite integral of the
production function for the first 60 months. We first use Excel to find a best
fitting exponential function.
CHAPTER 7. INTEGRATION 332

The production function (P ) in terms of the number of months (x) is given


by
P (x) = 1043e−0.03945x .
We would like to take an anti-derivative, but we don’t have a formula for
this anti-derivative yet. However, we note

e−0.03945x = (e−0.03945 )x = 0.9613x

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.

Total P (60) = Antideriv P (60) − Antideriv P (0)


= (−2467) − (−26438) = 23962.

Thus over 5 years the well will produce 23,962 barrels. □


Another application for anti-derivatives is solving an initial value problem.
In that case we want to a particular anti-derivative that has a particular value
for a specified x. In this situation we may not set C to zero. In fact, part of
the problem will be to find the appropriate value of C.
Example 7.3.7 Finding a value of C to match initial conditions. The
marginal cost (MC) of producing a certain quantity (q) of widgets is given by
MC(q) = 5 − 0.002q.
The cost of producing 1000 widgets is $6,000. Assume that the derivative
of the cost function is approximated closely enough by the marginal cost to be
used interchangeably. Find a cost function for producing widgets.
Solution. Since Cost is an anti-derivative of the Marginal Cost we have
Cost(q) = 5q − 0.001 ∗ q 2 + C. We also know Cost(1000) = 6000. Plugging
that in gives
Cost(1000) = 5 ∗ 1000 − 0.001 ∗ 10002 + C = 6000.
Solving for C gives C = 2000. Thus our cost function is
Cost(q) = 5q − 0.001 ∗ q 2 + 2000.

CHAPTER 7. INTEGRATION 333

Example 7.3.8 Building a profit function form data. Experience tells


me that the marginal profit of producing gadgets is a linear function. My
start-up costs are $2 million. I have the following data with my units being
thousands of dollars per millions of units.

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.

Excel tells me the marginal profit function is

MP(x) = −397.4x + 3991.8.

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

P (x) = −198.7x2 + 3991.8x + C.

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.

So our profit function is

P (x) = −198.7x2 + 3991.8x − 2000.

We saw that MP(x) = 0, when x = 10.0448. The maximum profit is the


computed by evaluating P (x) at x = 10.0448. A quick computation shows that
the maximum profit is $18,049 thousands of dollars, or a bit more than $18
million. □

It is worthwhile summarizing our list of integration formulas.


CHAPTER 7. INTEGRATION 334

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

A word of warning — The anti-differentiation formulas we have produced


only work for the functions given, allowing
R for changes in variables. At this
point the
R only way we have for finding (3x + 5)2 dx is expand the integrand
2
getting (9x + 30x + 25)dx before applying our rules. In general, the process
of finding anti-derivatives symbolically is an art form that we only begin to
work with in this course.

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

Exercises: Basic Antidifferentiation Problems

Exercise Group. Find antiderivatives for the given functions.


CHAPTER 7. INTEGRATION 335

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

Exercise Group. Evaluate the definite integrals by first finding an anti-


derivative.
7. Z 5
x + 7 dx.
0

Solution. The anti-derivative is: F (x) = x2 /2 + 7x (with these


definite integrals we may choose the constant to be 0.)
Z 5
25 95
(x + 7)dx = F (5) − F (0) = + 35 − 0 = .
0 2 2
8. Z 10
1
dx.
1 x
9. Z 10
5
3x + dx.
2 x

Solution. The anti-derivative is: F (x) = (3x2 )/2 + 5 ln |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

Solution. The anti-derivative is: F (x) = ex + ex.

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

Exercise Group. Solve the Initial value problem.


13. Let f (x) = 4x+3. The function F (x) is an antiderivative, and F (0) =
7.
Solution. The anti-derivative is: F (x) = 2x2 + 3x + C.
F (0) = 7 implies that F (0) = 0 + C = 7, so C = 7
Then F (x) = 2x2 + 3x + 7.
14. Let f (x) = 3x2 − 6x + 5. The function F (x) is an antiderivative, and
F (3) = 17.
15. Let f (x) = 100(0.95)x . The function F (x) is an antiderivative, and
F (5) = 9.
Solution. The anti-derivative is:
100(0.95)x
F (x) = + C.
ln(0.95)

F (5) = 9 implies that

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

≈ −11672.81 + 19495.73 = 7822.91.


18. A firm has a marginal profit function of M P (x) = 50 − 3x in thousands of
dollars per thousands of units. How much is profit increased if production
is shifted from 10 to 15 thousand units?
19. After the first year, the rate of sales of a fad product are sales(t) = 1000
| t|
with time in years. How many units are sold from the end of the first year
to the end of the tenth year?
Solution.
Z 10
1000
sales = dt = 1000 ln(t)|t=10
t=1
1 t
= 1000(ln(10) − ln(0))
= 1000 ln(10) ≈ 2302.58.
20. A software company allows your company to expand the number of li-
censes your company owns by charging a marginal rate of MR(licenses) =
√ 200 . How much does it cost to increase your license from 1000 to
licenses
2000 licenses?
21. The production function for a given oil well is rate(t) = 400(0.9)t with
time measured in years and production measured in millions of barrels of
oil.
(a) How much oil is produced in the first year?
(b) How much oil is produced in the tenth year?
(c) If I need to produce 75 thousand barrels of oil per year for the well
to be financially viable, what is the life of the well?
(d) How much oil will the well produce before being shut down?

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.

(d) Use Goal seek:


75 = 400(0.9t )
t ≈ 15.8881.
CHAPTER 7. INTEGRATION 338

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

How much do I expect to receive over the next 10 years?


23. From experience, I expect the marginal revenue for my firm to be a qua-
dratic function. I have the following data on revenue at a variety of levels,
with production in thousands of units and marginal profit in millions of
dollars.
Production $4.90 $7.04 9.00 11.03 14.00
MProfit 7.40 9.12 9.90 9.89 8.40

What is the expected change in revenue as I increase production from 15


to 20 thousand units?
Solution. Using trend line, my function for MarginalProfit is

MarginalProfit = −0.01 Production2 +2 Production +0.11.

Integrating from 15 to 20,


Z 20
Profit = −0.01x2 + 2x + 0.11 dx
15
x=20
0.01 3
=− x + x2 + 0.11x ≈ 160.133.
3 x=15

The profit is approximately $160.133 million.

7.4 Integration by Change of Variables or Sub-


stitution
At the end of the last section, we warned that the symbolic integration tech-
niques we have developed only work for problems that exactly fit our formulas.
When we tried integrating an exponential function where the exponent was a
constant times t, we had to change the base to get a function with only t in
the exponent. We want to develop one more technique of integration, called
change of variables or substitution, to handle integrals that are pretty close to
our stated rules. This technique is often called u-substitution and is related to
the chain rule for differentiation.

7.4.1 Change of variables for indefinite integrals


We start by exploring some examples where we can get the desired result by
the guess and check technique.
R
Example 7.4.1 Power of a linear by guess and check. Find (3x+5)7 dx.
Solution. We could do this problem by rewriting the integrand as an explicit
seventh degree polynomial and then using the power and sum rules, but that is
too much work. Instead, I will notice the integrand looks almost like a power,
and thus guess an answer of 18 (3x + 5)8 + C. I then check by differentiating.
CHAPTER 7. INTEGRATION 339

Using the chain rule,

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

4 ∗ 2x(x2 + 5)3 ∗ 8x − (x2 + 5)4 ∗ 8


,
8x
which is not what we want. The key is to start by recalling the chain rule:

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

7.4.2 Change of variables for definite integrals


In the definite integral, we understand that a and b are the x-values of the
ends of the integral. We could be more explicit and write x = a and x = b.
The last step in solving a definite integral is to substitute the endpoints back
into the antiderivative we have found. We can either change the variables for
the endpoints as well, or we can convert the antiderivative back to the original
variables before substituting. Consider the following example.
Example 7.4.7 A definite integral with change of variables. Evaluate
R 3 2x+5
1
e dx.
Solution 1. Solution 1: Convert everything to u. The obvious candidate
for u is 2x + 5. Then du = 2 dx. For the lower endpoint, x = 1 becomes
u = 2(1) + 5 = 7. For the upper endpoint x = 3 becomes u = 2(3) + 5 = 11.
Substituting,
Z 3   Z 3
1
e2x+5 dx = (2) e2x+5 dx) (Add needed factors.)
1 2 1
Z
1 3 2x+5
= e (2 dx) (Make u and du explicit.)
2 1
Z u=11
1
= eu du (Do the substitution.)
2 u=7
11
1 u
= e (Find the antiderivative.)
2 7
1 1
= e11 − e7 . (Evaluate.).
2 2

Solution 2. Solution 2: Keeping, but labeling, the endpoints. We have the


same u and du, but do not convert the endpoints. To reduce confusion we
make sure to label the variable when we are using both x and u. Thus,
Z 3 Z 3
1
e2x+5 dx = e2x+5 (2 dx) (Make u and du explicit.)
1 2 1
Z x=3
1
= eu du (Do the substitution.)
2 x=1
x=3
1 u
= e (Find the antiderivative.)
2 x=1
x=3
1 2x+3
= e (Convert back.)
2 x=1
1 11 1 7
= e − e . (Evaluate.).
2 2

It should be noted that when we change variables we may find ourselves
looking at an integral from a to b where the b < a. We do not change the order
of the endpoints.
Example 7.4.8 A second definite integral with change of variables.
R1 2
Evaluate −2 xe(x ) dx
Solution. (Convert everything to u.) The obvious candidate for u is x2 .
Then du = 2x dx. For the lower endpoint, x = −2 becomes u = (−2)2 = 4.
CHAPTER 7. INTEGRATION 342

For the upper endpoint x = 1 becomes u = 12 = 1. Substituting,


Z 1 Z 1
2 1 2
xe(x ) dx = e(x ) (2x dx) (Make u and duexplicit.)
−2 2 −2
Z 1
1
= eu du (Do the substitution.)
2 4
1
1 u
= e (Find the antiderivative.)
2 4
1
= (1 − e4 ). (Evaluate.).
2

7.4.3 Exercises: Integration by Change of Variables or


Substitution Problems
1. Reading check, Integration by Change of Variable or Substitu-
tion.This question checks your reading comprehension of the material is
section 7.4, Integration by Change of Variable or Substitution, 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 For the method of substitution, we want to make both u and du


explicit.
B Substitution for integration is related to the chain rule for integra-
tion.

C We can pick any expression for u when doing substitution.


D We can also do change of variables with definite integrals.
E One of the methods in this section is called Guess and Check.

F None of the above

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.

Solution. Let u = 5x + 3. Then du = 5dx.


Z Z
(u)4 du
(5x + 3)4 dx =
5
5
u
= +c
25
(5x + 3)5
= + c.
25
3. Z
(7x − 9)11 dx.
CHAPTER 7. INTEGRATION 343

4. Z
(x/5 − 2)2/3 dx.

Solution. Let u = x/5 − 2. Then du = dx/5.


Z Z
(x/5 − 2)2/3 dx = 5 u2/3 du

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.

Solution. Let u = 8x − 3. Then du = 8dx.


Z Z
(8x − 3) dx = 1/8 u1/2 du
1/2

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.

Solution. Let u = 0.06t − 5. Then du = 0.06dt.


Z Z
1
100e0.06t−5 dt = 100eu du
0.06
100eu
= +c
0.06
100e0.06t−5
= + c.
0.06
9. Z
150(1/2)t/5 dt.

10. Z
(2x + 5)(x2 + 5x + 3)5 dx.

Solution. Let u = x2 + 5x + 3. Then du = (2x + 5)dx.


Z Z
(2x + 5)(x2 + 5x + 3)5 dx = u5 du

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. Let u = 3x + 1. Then du = 3dx.


Z 3 Z u=10
3x+1
e dx = eu du
0 u=1
u=10
1
= eu
3 u=1
1 10
= (e − e1 ).
3
15. Z 1
0100e−0.04t dt.
0
16. Z 5
e(−0.05(t+1)) dt.
0

Solution. Let u = −0.05(t + 1). Then du = −0.05dt.


Z 5 Z u=−0.3
1
e−0.05(t+1) dt = − eu du
0 0.05 u=−0.05
u u=−0.3
= −20e |u=−0.05
−0.3 −0.05
= −20(e −e ).
17. Z 3
(2x + 5)−2 dx.
1
18. Z 6 p
x 3x2 + 7dx.
1
CHAPTER 7. INTEGRATION 345

Solution. Let u = 3x2 + 7. Then du = 6x dx.


Z 6 Z
2 1/2 1 u=115 1/2
x(3x + 7) dx = u du
1 6 u=10
u=115
1 3/2
= u
9 u=10
1
= (115 − 103/2 ) ≈ 133.51.
3/2
9
19. Z 2
3
x2 e(1−0.2x ) dx.
0
20. Find an antiderivative F (x) for f (x) = x2 (x3 + 7)3 such that F (0) = 5.
Solution. Let u = x3 + 7. Then du = 6x2 dx.
Z Z
2 3 3 1
(x )(x + 7) dx = u3 du
6
u4
= +c
24
(x3 + 7)4
= +c
24
(7)4
F (0) = 5 = +c
24
(7)4
c=5− 4
24
3 4
(x + 7) (7)4
F (x) = +5− .
24 24
21. Find an antiderivative F (x) for f (x) = (4x3 + 5) exp(x4 + 5x − 9) such
that F (0) = 2.
22. An investment stream pays out at a rate of $10,000 per year. In computing
present value, I assume an investment return rate of 5% compounded
continuously. What is the present value of the first 10 years of the payout?
Solution.
Z 10
Value = 10000e−0.05t dt
0
10
−10000e−0.05t
=
0.05 0
−10000 −0.5
= (e − 1) ≈ 78693.87.
0.05
23. My gas well is returning a payout of $10,000. The well output is expected
to decay exponentially with half as much output in 7 years. How much
do I make over the next 10 years?
24. The sales rate on a book is s(t) = 1000t exp(−t2 /4), with time in years.
(a) What are the total sales over 10 years?
(b) When does the sales rate drop to 10?

(c) What is the maximum sales rate?

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.

(c) At t = 1.454, sales are approximately 857.4


(100q)
25. The marginal profit on an item is M p(q) = (q 2 +1) − 2, measured in thou-
sands of dollars per thousands of units.

(a) How much should I produce to maximize profits?


(b) What is my profit function if my start up cost is $60,000?
(c) What is the maximum profit?

7.5 Integration using Computer Algebra


Recall that the fundamental theorem of calculus states that if F (x) is a function
Rb
with its derivative equal to f (x) on the region a ≤ x ≤ b, then a f (x) dx =
Rb
F (b) − F (a). We say a f (x) dx is the definite integral of f (x) from a to b. If
f (x) is a derivative of F (x), then F (x) is an anti-derivative of f (x), and any
anti-derivative
R of f (x) has the form F (x) + c, for some constant c. We use the
symbol f (x) dx, without limits of integration, for the indefinite integral.
In Section 7.1 we looked at approximating definite integrals with a Riemann
sum that added up the area of a bunch of rectangles. In Section 7.2 we saw that
the fundamental theorem of calculus lets us use an antiderivative or indefinite
integral to evaluate a definite integral. In Section 7.3–7.4 we saw how to
compute indefinite integrals by hand for a limited number of functions. In this
section, we will look at how to use computer software at a web site to find
antiderivatives.
We start with Wolfram|Alpha, available at http://www.wolframalpha.com.
We can give Wolfram|Alpha the question we want solved in plain English. In
our case we would like to find the antiderivative of xn with respect to x.

The Alpha provides an answer.


CHAPTER 7. INTEGRATION 347

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.

It is worth noting that Wolfram|Alpha is connected with Mathematica, so


it will understand questions in Mathematica syntax. On the right side to the
screen there is a link for related links. In particular, there will be a link for
the related command in Mathematica.
CHAPTER 7. INTEGRATION 348

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.

We should note that Wolfram|Alpha will easily find antiderivatives that we


would find very hard to do or beyond the scope of this class.

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.

In Chapter 4, we found a derivative calculator. Similarly we can find an


integral calculator (http://www.integral-calculator.com/) that will show steps.
CHAPTER 7. INTEGRATION 350

For problems of at the level of difficulty we have been doing, Wolfram|Alpha


also produces plots of the integral.

7.5.1 Definite integrals


One of the reasons we wanted to find antiderivatives was to be able to use
them to evaluate definite integrals. We can ask Wolfram|Alpha for the definite
integral directly. In that case, Wolfram|Alpha will give the numeric answer and
will also produce the relevant graph. (Symbolab will also do definite integrals.)

This is particularly useful when finding the antiderivative is beyond the


CHAPTER 7. INTEGRATION 351

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.

Another example when we can easily set up integrals we cannot solve by


hand occurs when we are trying to find the current value of a revenue stream.
A value, V , that we get t years in the future, has a present value of V exp(−rt)
where r is an investment return rate. Thus Rb the current value of a revenue
stream, V (t), from time a to time b, is a V (t) ∗ e(−r∗t) dt. However we only
have a rule for finding the antiderivative when V (t) is either a constant or
exponential function. With a CAS program it is straightforward to compute
such integrals for a broad range of value stream functions.

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.

7.5.2 Initial value problems


We often want to choose a particular antiderivative of a function. We typically
do this when we have the value of the antiderivative for some value. We simply
plug that value into the general antiderivative and solve for C.
CHAPTER 7. INTEGRATION 352

Example 7.5.1 Finding the antiderivative, then the constant. The


rate of change profit with respect to quantity is given by P ′ (q) = −q 2 + 5q + 50
and the break-even point occurs when q = 5. Find the formula for profit as a
function of q. Find the maximum profit.
Solution. We can do this by putting together things we have already done.
First we use Wolfram|Alpha to find an antiderivative.

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.

Thus the maximum profit is $145.83, and it occurs when q = 10. □


Example 7.5.2 The previous example in one step. The rate of change
profit with respect to quantity is given by P ′ (q) = −q 2 + 5q + 50 and the
break-even point occurs when q = 5. Find the formula for profit as a function
of q. Find the maximum profit.
Solution. We can also do this with Wolfram|Alpha bysetting up the bound-
ary value problem. We give the alpha bot the derivative we want integrated
and the fixed value of the original function. (Notice that the answer does not
include a +C, since we have computed a particular constant.)
CHAPTER 7. INTEGRATION 353

We then ask Alpha to maximize the function.

This gives the same answer of $145.83. □


This first example could easily have been done by hand. We can repeat the
process with an example that could not be easily been by hand.
Example 7.5.3 A more complicated initial value problem. The rate of
change of profit with respect to quantity is given by P ′ (q) = q 2 exp(−q/10) −
q/10 and a break-even point occurs when q = 5. Find the formula for profit as
a function of q. Find the maximum profit.
Solution. In structure, this example is very similar to the first example. How-
ever, where in the first example, the function would have been easy to do by
hand, in this case, the problem is very hard to do by hand. We use Wolfram/
Alpha to find the antiderivative.

P (q) = exp(−q/10) ∗ (−10 ∗ q 2 − 200 ∗ q − 2000) − q 2 /20 + C.


We then use Excel to find C, noting that if we use P (q) without the C,
then C is the value of −P (5) = 1972.474.

We plug in 5 and note P (5) = 0 = C − 1972.474, thus C = 1972.474. We


use solver to maximize and find the maximum profit of $1675.17 occurs at
q = 64.72775.
CHAPTER 7. INTEGRATION 354

7.5.3 Riemann Sums


We can also use Alpha to do Riemann sums. We need to give a starting and
ending point and the number of intervals.
Example 7.5.4 Riemann sums with Wolfram|Alpha. Find the current
value of a revenue stream V (t) = 2000 + 5t for 10 years with an investment
rate of r = 1.03, assuming payments are made daily.
Solution. We approximate the current value with the integral
Z stop Z 10
CurrentValue = r−t V (t)dt = 1.03−t (2000 + 5t) dt.
start 0

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

7.5.4 Reading Check


1. Reading check, Integration Using Computer Algebra.This ques-
tion checks your reading comprehension of the material is section 7.5,
Integration 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.

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

D The section uses Symbolab as a computer algebra system that will


do integration.

E Wolfram|Alpha will also do definite integrals.


F The section uses GeoGebra as a computer algebra system that will
do integration.
G None of the above

7.5.5 Exercises: Integration using Computer Algebra Prob-


lems

Exercise Group. Find the antiderivative of the given function.


1.
f (x) = x ln(x).

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)

Exercise Group. Evaluate the definite integral.


11. Z 10
t2 e−0.06t dt.
0

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π

Exercise Group. Do the initial value problem.


17.
P ′ (q) = −q 2 + 3q + 5 and P (3) = 5. Find P (q).

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

P (q) = 16(7q − 700 + 75ln(100)) − 12qln(q)


P (2981) = 16(7 ∗ 2981 − 700 + 75ln(100)) − 12 ∗ 2981ln(2981) = 42021.7.
24. Our marginal cost function is M C(q) = 10q ln(q) and the startup costs
are $23,000. Produce a cost function.

7.6 The Normal Distribution: An extended nu-


meric example
Link to worksheets used in this section1
We want to look at an extended example where we realistically want to
find a definite integral, but need to use numerical methods rather than solving
for the antiderivative and using the fundamental theorem of calculus. Most
students are familiar with the concept of a course that is graded on a curve.
Formally, that means that there is a preset distribution of grades available in
the class, with a certain percentage of the students getting an A, a certain per-
centage getting a B, and so forth. Most college students are also familiar with
the ACT, SAT, or other standardized tests, where the score typically follow a
normal or ”bell” curve. The result we pull from more advanced mathematics
is that many phenomena such as height, weight, and hat size, also follow a bell
curve. In a business setting, we are often concerned whether or not a portion
of a market will be big enough to support a specialty store. We also want to
know how much of my production should be allocated to a range of sizes of a
product. This question often boils down to finding the area under a specified
portion of the normal curve.

1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/

Section-7-6-Examples.xlsx
CHAPTER 7. INTEGRATION 358

7.6.1 Background from probability


We want to pull some definitions and results from the theory of probability. In
particular we want a description of the function we are finding the area under
and also of the related area function.
Definition 7.6.1 A Probability Density Function is a function that
spreads the area 1 over the entire real line, with the obvious understanding
that no value can have a negative probability.
In calculus terms, a Probability Density Function
R∞ is a function f (x)
defined for −∞ < x < ∞ such that f (x) ≥ 0 and −∞ f (x) dx = 1. ♢
A probability density function is also called a continuous distribution func-
tion. The probability density function that is of most interest to us is the
normal distribution. The normal density function is given by
 
1 −(x − µ)2
f (x) = √ exp
σ 2π 2σ 2

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

Figure 7.6.4 Video presentation of this example


In the United States, the height of men follows a normal distribution with
a mean of 70 inches (5’ 10”) and a standard deviation of 3 inches. I want to
set up a specialty shop for men who are at least 6’ tall, but no more than 7’
tall. In an area with 100,000 adult men, how big is my potential market?
Solution.
• Set up.
 
My distribution function is 3√12π exp −(x−70)
2

2∗33 . Since I have a popula-


tion of 100,000 and am interested in the men who are between 72 and 84
inches tall, my potential market is
Z 84  
1 −(x − 70)2
100000 √ exp dx.
72 3 2π 2 ∗ 32

As an alternative, I can convert the problem so it is expressed in terms


of standard deviations. Then I use the standardized normal distribution
and my limits of integration are

low bound in SD = (low bound − mean)/(SD) = (72 − 70)/3 = 2/3


upper bound in SD = (upper bound − mean)/(SD) = (84 − 70)/3 = 14/3.

Then my potential market is


Z 14/3
1
100000 √ exp(−x2 /2)dx.
2/3 2π

• Using Excel and Riemann Sums.


I want to set up a spreadsheet to find the area under the curve. Since I
think I may do this for several problems, I want to set up the worksheet
as a template that I can simply fill in. It will make my life easier if I
recast the problem in terms of standard deviations. My potential market
R 14/3
is 100000 2/3 √12π exp(−x2 /2)dx. I am ready to set up a Riemann sum
worksheet as we did in Section 7.1.
CHAPTER 7. INTEGRATION 360

In cells F3 through F5 we convert the lower bound, upper bound, and


del x to standard deviations. We recall that we get better accuracy by
evaluating the rectangles with a midpoint. The midpoint of the nth
rectangle is (n-0.5)∗del x above the lower bound. As we did in previous
sections, we use the offset command to bring our answer into the top
region. When we look at the numbers we see that the potential market
is 25,249.

• Using Excel Statistics Commands.


By this point in the course you should expect that if we claim a compu-
tation is important and done by business many times, that there is an
Excel command to do the computation.
The function we are interested in is

NORM.DIST(x, mean, standard deviation, cumulative).


.
Where x, mean, and standard deviation have the obvious meanings. The
cumulative parameter is either true or false. If it is true we get the cumu-
lative distribution function. If it is false we get the probability density
function. If we are working with the standardized normal distribution,
where the mean is 0 and the standard deviation is 1, the command is
NORM.S.DIST(x, cumulative).
(If you are using older versions of Excel, the syntax of the command is a
little different. Check the appropriate help page if you are using an older
version of Excel.) With these commands, our spreadsheet is noticeably
simpler.

When we look at the values, we get a target population of 25,249. This


agrees with our estimate to 5 significant figures.
CHAPTER 7. INTEGRATION 361

• Using Wolfram alpha.


Once I have reduced the problem to evaluating a definite integral, I can
find a numeric solution with a CAS package like Wolfram|Alpha.
Z  
84
1 −(x − 70)2
100000 √ exp dx
72 3 2π 2 ∗ 32

becomes
100000*integrate(exp(-(x-70)^2/(2*3^2))/(3*sqrt(2*pi))) from 72 to 84.

We get our familiar answer of 25,249.

When we compute a target population, we sometimes want to include


the tail of the distribution. We might, for example be concerned with all
women who are 5 feet tall or less. This sets up an integral over an infinite
interval, which we can’t do as a Riemann sum. The first workaround
notes that the tails are very small. If all humans who have ever lived are
normally distributed, less than 1 is more than 7 standard deviations from
the mean. Taking the integral down to −7 will practically be the same
as integrating down to −∞. The second workaround uses the symmetry
of the normal distribution.
Z a Z 0 Z a Z a
SN D(x)dx = SN D(x)dx+ SN D(x)dx = .5+ SN D(x)dx.
−∞ −∞ 0 0


Example 7.6.5 Finding short women.
CHAPTER 7. INTEGRATION 362

Standalone

Figure 7.6.6 Video presentation of this example


In the United States, the height of women follows a normal distribution
with a mean of 64 inches (5’ 4”) and a standard deviation of 2.75 inches. I
want to set up a specialty shop for women who are no more than 5’ tall. In an
area with 500,000 adult women, how big is my potential market?
Solution.
• Set up.
Using the reasoning as above, I want to estimate my market if it is 50%
of the population plus the percentage between 0 and (−4/2.75) standard
deviations below the mean.
• Using Excel and Riemann Sums.
One advantage of having set up the first exercise well, is the Riemann
sum problem is now a matter of changing the parameters and subtracting
from 0.5 before multiplying by the market size.

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

Once again, we get a potential market of 3,645 women.



While the normal distribution spreads a population over the real numbers,
most objects come in discrete sizes. Depending on the kind of shoes, the sizes
are either whole or half numbers. You can’t buy a shoe of size 8.764. The
CHAPTER 7. INTEGRATION 363

normal procedure is to divide the population at the middle between the sizes.
Example 7.6.7 Women’s shoes.

Standalone

Figure 7.6.8 Video presentation of this example


In the United States, the shoe sizes of women follows a normal distribution
with a mean of 8 and a standard deviation of 1.5. I want to order 1000 pairs
of shoes. If the shoes are only available in full sizes, how many pairs should I
order of size 7?
Solution. I want the portion of the population between size 6.5 and 7.5. I
fit it into my worksheet for Riemann sums.

Of the 1000 pairs of shoes, 211 should be size 7. □


We have looked at three methods for finding a portion of a normally distrib-
uted population, which we describe as Excel with Riemann sums, Excel with
statistics commands, and CAS. It is worthwhile to consider the advantages
and disadvantages of the methods. The Riemann sums method takes the most
work to set up. It is also conceptually the most straightforward and the most
flexible. It is the easiest to adapt if we are doing some nonstandard distribu-
tion of a population. It also shows intermediate values if we have a less sharp
question and are trying to see what is going on and are still deciding on the
business question we want to ask. The Excel with statistics command approach
requires us to learn special commands. It is also less work. It would probably
be the favored method if we were doing a lot of these computations. It should
be noted that Excel has corresponding commands for the other standard prob-
ability distributions. The CAS method does not require special commands,
but it takes us out of our Excel environment. It does not let us leave a work-
sheet that is well documented and that can be easily modified by someone else
asking similar questions.

7.6.3 Reading Check


1. Reading check, The Normal Distribution: An Extended Nu-
meric Example.This question checks your reading comprehension of the
material is section 7.6, The Normal Distribution: An Extended Numeric
Example, of Business Calculus with Excel. Based on your reading, se-
lect 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.
CHAPTER 7. INTEGRATION 364

A One method in the sections was described as Statistical Averaging.


B One method in the sections was described as Integration by parts.
C The section uses Symbolab as a computer algebra system that will
do integration.

D One method in the sections was described as Excel with Riemann


sums.
E Each method described has advantages and disadvantages. C.
F One method in the sections was described as CAS.

G One method in the sections was described as Excel with formulas.


H The method of using CAS is always the best method.
I The method of using Excel with Riemann sums is always the best
method.

J None of the above

7.6.4 Exercises: Normal Distribution Problems


1. 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 in available
in full and half sizes. I plan to make 10,000 pairs of this style.

(a) Express, as an integral, the number of pairs I should make of size 9.


(b) How many pairs of size 9 shoes should I make?
(c) How do your answers change if the shoes are only to be made in full
sizes?

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.

(a) Express, as an integral, the number of pairs I should order of size


45.

(b) Express, as an Excel command, the number of pairs I should order


of size 45.
(c) How many pairs should I order of size 44? (Give a number, not an
equation.)
CHAPTER 7. INTEGRATION 365

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

(a) Express, as an integral, the number of dresses I should make of size


10.
(b) How many size 6 dresses should I make?

(c) How many size 10 dresses should I make?

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 number of suit coats I should make of


size 44.
(b) How many size 44 suit coats should I make?
5. A study of the size of male soldiers found the headband lengths were
normally distributed with a mean of 22.1 inches and a standard deviation
of 0.85 inches. Standard sized caps will fit headbands lengths of 20-25
inches.

(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

Population size * (NORM.DIST(High value, Mean, Standard Deviation, TRUE) - NORM.DIST(Low


CHAPTER 7. INTEGRATION 367

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

FailureDensity(x) = (3/5)(x/5)2 exp(−(x/5)3 ).

(a) Our warranty is for 10,000 hours of use. (This is approximately 1


year.) What percentage of drives get replaced under warrantee?
CHAPTER 7. INTEGRATION 368

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

7.7 Applications of the integral: Investment and


depreciation
Link to worksheets used in this section1
Having looked at several ways to evaluate definite integrals, we return to
practical problems that we can solve be evaluating an integral. We will break
our applications in this section into two groups. Problems in the first group
reduce to accumulation over time, and are analogous to finding the area under
a curve, or finding a definite integral. Problems in the second group ask you
to find a specific anti-derivative of a function. They are called boundary value
problems.

7.7.1 Basic Accumulation


The most straightforward problem for integration is one where I have a function
for some value, like an income stream, or materials produced, or a cost, and
I am interested if calculating how much accumulates in a specified interval.
We work through a series of examples where the accumulation function gets
progressively more complicated.
Example 7.7.1 Accumulating a constant function over time. Mary
runs a small shop that is temporarily disconnected from the power network. A
generator that provides power uses 2 gallons of fuel per hour. How much fuel
does she need to keep the shop running from 8 in the morning until 6 in the
afternoon.
Solution. We started with a problem that is easy to do without calculus to
give us confidence in our method. We solve it with algebra first. Mary wants
to run the generator for 10 hours and it consumes 2 gallons of fuel per hour.
She needs (10 hours)(2 gallons/hour) = 20 gallons of fuel.
To set the problem up for calculus, we use a 24-hour clock to put time on
a number line. We are accumulating FuelConsumption(t) = 2 from t = 8 to
t = 18. We need
Z 18
8 = (2 ∗ 18) − (2 ∗ 8) = 20.
2dt = 2t|18
8
gallons of fuel.
1 mathstat.slu.edu/~may/ExcelCalculus/external/Examples/

Section-7-7-Examples.xlsx
CHAPTER 7. INTEGRATION 369


Example 7.7.2 Accumulating marginal cost.

MarginalCost(Quantity) = 50 + Quantity/1000.

Find the increase in cost as production goes from 50,000 to 80,000.


Solution. Since the change in cost looks like a Riemann sum with 30,000
intervals, we will approximate the change in cost with the integral of the mar-
ginal cost. With this function we can easily find an antiderivative and evaluate.
The change in cost is
Z 80000   80000
q q2
50 + dq = 50q +
50000 1000 2000 50000
= (7, 200, 000) − (3, 750, 000) = 3, 450, 000.

The change in cost of production is $3,450,000.


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.

7.7.2 Boundary value problems


The accumulation problems asked you to find the area under a curve between
two specific points. For those problems, we are not interested in a formulation
of a general area function. A second set of applications starts with a derivative
and is interested in finding the particular anti-derivative that meets certain
initial conditions. (We use the conditions to find the correct value of ”+C”
in the general anti-derivative.) These problems are often solved once to find
the general anti-derivative for a particular kind of problem, and the general
solution is then used as a formula to find the constant C.
Example 7.7.5 Proportional growth and continuous reinvestment. I
put $20,000 in a retirement account that earns 4% interest compounded con-
tinuously. I reinvest all my earnings from the account back into the retirement
account. I would like a simple formula for the principal at sometime in the
future.
Solution. We already have the formula for continuous growth, but it is worth-
while to derive it again. We are told

Principal′ (time) = .05 ∗ Principal(time).


CHAPTER 7. INTEGRATION 371

or
Principal′ (time)
= .05.
Principal(time)
Integrating both sides with respect to time, we get

ln(Principal(time)) = .05 ∗ time + C.

Exponentiating both sides gives

Principal(time) = exp(0.05 ∗ time) ∗ exp(C) = eC e.05∗time .

Since we know that the Principal is $20,000 at time 0, we see that eC =


20000 and our equation simplifies to

Principal(time) = 20000e.05∗time .

This is the formula we took on faith in the last chapter. □

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.

Cost of fixed Asset − Residual Value


Annual Depreciation Expense =
Useful life of Asset (in years)

• The sum of digits method of depreciation.


Assumes the rate of depreciation is proportional to the expected remain-
ing useful life of the piece of equipment. For example with a sum of years
method and defining V (t) as the value, EL is the expected lifetime, k is
a constant, and t is time, we would have:

V ′ (t) = −k(EL − t)

• The declining balance depreciation.


This method assumes the rate of depreciation is proportional to the cur-
rent value, with the initial rate of depreciation twice the straight-line
rate, with depreciation stopping when the value is the scrap value. We
let N be the estimated life of the asset and we let the rate of depreciation
be: r
residual value
Depreciation rate = 1 −
N

cost of fixed asset


Example 7.7.6 Straight Line Depreciation. You buy a car for $18,000
and you want to depreciate it to $0 over 5 years. Find a formula for the value of
the car. We assume the value decreases a constant rate, so we use straight-line
depreciation. Give a simple formula to find the book value of the equipment
after 3.5 years.
CHAPTER 7. INTEGRATION 372

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.

Value(0) = 18000 and Value(5) = 0.

Taking slope as rise over run, the slope is −3, 600 and the intercept is 18,000.
Thus our equation is

Value(time) = 18000 − 3600 ∗ time


Value(3.5) = 5, 400.

Using calculus on the same problem we have

Value′ (time) = −k for some constant k,


Value(0) = 18000 and Value(5) = 0.

Integrating the first equation gives

Value(time) = −k ∗ time + C.

Thus, straight-line depreciation gives a value function, which is a straight


line. We now plug in known values to find the constants. We plug in for
time = 0 to see C = 18, 000. We plug in for time = 5 to see k = 3.600.
This gives us the same equation using calculus as we obtained using algebra.
The book value of the equipment at 3.5 years is $5,400 with this method of
depreciation.


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

0 = −k ∗ 25 + k ∗ 25/2 + 18, 000.

Solving this we get k = 1, 440. Our book value formula is then

Value(time) = −7, 200t + 720t2 + 18000.


CHAPTER 7. INTEGRATION 373

At 3.5 years the value will be

Value(3.5) = −7, 200 ∗ 3.5 + 720 ∗ 12.25 + 18000 = 1620.

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

Value(time) = 100000(1 − 2 ∗ .20)time = 100000(0.6)time .

However we need to find when the piece of equipment stops depreciating.


Solving
10000 = 100000(0.6)time ,
we get
0.1 = (0.6)time ,
or
time = ln(0.1)/ ln(0.6) = 4.508.
Since 3.5 is less than 4.5 years, the equipment is still depreciating. Its book
value is 100, 000 ∗ (0.6)3.5 = $16, 731.


CHAPTER 7. INTEGRATION 374

7.7.4 Reading Check


1. Reading check, Applications of the Integral, Investment and De-
preciation.This question checks your reading comprehension of the ma-
terial is section 7.7, Applications of the Integral, Investment and Depreci-
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.

A If we can set up the integral of an application, we can use CAS to


evaluate the integral.

B We can accumulate marginal cost over time to find change in cost.


C This section explained how to use calculus to predict the future value
of the stock market.
D to find the current value of a revenue stream we take the integral
of the revenue stream times a discounting functions that represents
how much a future payment is worth today.
E Accumulating a function over time is simply taking a definite inte-
gral.
F The example on oil production took the integral of an exponential
function.
G None of the above

7.7.5 Exercises: Applications of the integral: Investment


and depreciation Problems
1. The marginal costs for producing widgets is
q
MarginalCost(q + 1) = 20 − .
10000
Find the increase in cost in going from producing 60,000 units to producing
80,000 units.
Solution.
Z stop
increased cost = marginal cost dq
start
Z 80000
q
= (20 − ) dq
60000 10000
80000
q2
= (20q − )
20000 60000
= 1280000 − 1020000
= 260000
2. The marginal profit for producing gizmos is

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

3. The daily sales projections for a fad item are:

Daily Sales(t) = 100t2 e−t/5 .

Find the estimated total sales over the first 100 days.
Solution. We expect sales of about 25000 units.

4. The daily sales projections for a new item are:

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

8. A stream of revenue produces at a rate of 40,000+2, 000t dollars per year


with t measured in years. We assume that the risk free investment rate
is 3% per year. What is the current value of the revenue stream over 20
years?

7.8 Economics Applications of the Integral


Link to worksheets used in this section1
We have looked at the definite integral as the signed area under a curve.
This lets us compute total profit, or revenue, or cost, from the related mar-
ginal functions. We have looked at a number of applications where this was
interpreted as an accumulation over time, including total production of an oil
well and present value of a revenue stream. For some applications we want to
look at the area between two curves. For example, considering profit as the
area between the cost and revenue curves.
In this section we will look at more applications from finance and economics
where the concepts can easily be described in terms as of the area between
curves.

7.8.1 Consumer and Producer Surplus


When we looked at supply and demand curves we found an equilibrium point
where the amount being offered for sale was equal to the amount people wanted
to buy.

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:

supply price(Quantity) = 4 + Quantity


demand price(Quantity) = 106 − 2 ∗ Quantity.

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:

supply price(Quantity) = 5 + ln(Quantity + 10)

demand price(Quantity) = 10 + 100/(Quantity + 2).


Find the equilibrium price and quantity. Find the producer and consumer
surpluses when the shirts are sold at the equilibrium price.
Solution. We load the supply and demand price functions into excel and
use Goal Seek to find an equilibrium price. Rounding to the nearest unit
for quantity and cent for price, we have an equilibrium price of $10.45 for a
quantity of 222 shirts.

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

To evaluate these integrals we either use a Riemann sum approximation,


like the one found on the example worksheet, or use Wolfram Alpha. In either
case, rounded to the nearest dollar, we have a consumer surplus of $372 and a
producer surplus of $191.


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

If however, either the producers or consumers can organize and act as a


unit, they can form a cartel and limit the amount sold. If the producers form
a cartel, they can lower production and raise the price.

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:

supply price(Quantity) = 5 + ln(Quantity + 10)

demand price(Quantity) = 10 + 100/(Quantity + 2)


The store owner has a monopoly on campus and decides to limit the quan-
tity sold to 200 shirts and charge what the market will bear. Find the price, the
producer surplus, and consumer surpluses. Find these numbers if the owner
decides to limit sales to 50. How many shirts should the owner sell at what
price to maximize producer surplus? If producer surplus is maximized, how
much is the total social gain reduced?
Solution. The formulas involved for supply and demand are the same ones
we used in Example 7.8.2. With a slight modification if the worksheet from
that example we can set it to compute the Riemann sums approximating the
surpluses. In particular, we use the demand function for finding the height of
producer surplus. (See cell D7.)
CHAPTER 7. INTEGRATION 381

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.

7.8.2 Lorenz Curves and the Gini Index


A question that arises in economics looks at the equity of income or wealth
distribution in a country. In standard economic theories either too much or
too little equity indicates a lack of opportunity and is a hindrance to growth.
However, before being able to address the advantages or disadvantages of a
level of inequity we need to be able to quantify the level of equity or inequity.
The standard method is to use the Lorenz curve and the Gini index.
The Lorenz curve is defined by a function L(x), with 0 ≤ x ≤ 1, that
measures the proportion of something is held by the bottom x proportion of
the population. Thus, if L(0.2) = .1, for the Lorenz function for income in
a country, then the bottom 20% of the population earns 10% of the income
in the country. Since, under usual definitions, a person cannot have negative
income, the Lorenz functions are nonnegative and increasing. Since the Lorenz
functions are measured from the bottom, we also have L(x) ≤ x for all x.
We can make a few more observations. The population as a whole has the
entire income of the population. An empty set of the population has none of
the population’s income. Any bottom segment will have nonnegative income.
In formulas these observations become L(1) = 1, L(0) = 0, and L(x) ≥ 0, for
all x, respectively.
If we had perfect equity, our Lorenz function would be L(x) = x. Any
Lorenz curve we find for a real population will be below this curve. The Gini
index (or Gini coefficient) measures the percentage that a real Lorenz curve is
below the ideal curve.
CHAPTER 7. INTEGRATION 383

Computationally,
R1 Z
(x − L(x))dx 1
G= 0
R1 =2 (x − L(x))dx.
0
xdx 0

In practice this number is often multiply by 100, reporting the percentage


(0 to 100) rather than proportion (0 to 1) of the area under the ideal function
and above the measured function.
Example 7.8.4 Gini index with a formula for income distribution.
The Lorenz curve for income in a certain country is given by L(x) = .8x3 + .2x.
What proportion of the income is earned by the bottom half of the population?
Find the Gini index.
Solution. To find the proportion earned by the bottom half of the population
we substitute 0.5 in the equation.

L(0.5) = (0.8)(0.5)3 + (0.2)(0.5) = 0.1 + 0.1 = 0.2.

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.

Population %tile 0 20 40 60 80 90 100


Income %tile 0 3.4 12.0 26.7 50.0 78.5 100

Solution. We recall that the area of a trapezoid is (width)(average height).


We put the data into a spreadsheet.
CHAPTER 7. INTEGRATION 384

Then we evaluate the formulas.

In percentages, the Gini index is approximated at 45. □

7.8.3 Reading Check


1. Reading check, Economics Applications of the integral.This ques-
tion checks your reading comprehension of the material is section 7.8,
Economics Applications of the integral, 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 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.

D The example on oil production took the integral of an exponential


function.
E Accumulating a function over time is simply taking a definite inte-
gral.
F to find the current value of a revenue stream we take the integral
of the revenue stream times a discounting functions that represents
how much a future payment is worth today.
G None of the above

7.8.4 Exercises Business Applications of the Integral Prob-


lems

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

Solution. The two curves intersect at the point of market equilib-


rium, 1000 850
7 , 7 .

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

Solution. The two curve intersect at the point of market equilib-


rium, (37.958, 72.042).

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

TotalSocialGain = ProducerSurplus + ConsumerSurplus = 2460.137.


6. SupplyPrice(q) = q/2 and
(
200 q ≤ 10
DemandPrice(q) = .
250 ∗ .8 q/10
q > 10
7. Assume SupplyPrice(q) = 30 + q and DemandPrice(q) = 170 − q.

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

(c) The formula for the producer surplus at x is


Z x
DemandPrice(t) − SupplyPrice(x) dx.
0

In our case we get


Z x Z x
(170 − t) − (30 + x) dt = (140 − t − x) dt.
0 0

We note that x is a constant for our integration. Thus, thus we get


 x
t2 3x2
140t − − xt = 140x − .
2 0 2

The Maximum Producer surplus is 3266.67, achieved when q is 46.67


8. Assume SupplyPrice(q)= 10+q/2 and DemandPrice(q)= 110-q/3.

(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

9. Assume SupplyP rice(q) = 10 + q 2 and DemandP rice(q) = 210 − q 2 .

(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

(c) The formula for the producer surplus at x is


Z x
DemandP rice(t) − SupplyP rice(x) dx.
0

In our case we get


Z x Z x
(210 − t ) − (10 + x ) dt =
2 2
(200 − t2 − x2 ) dt.
0 0

We note that x is a constant for our integration. Thus, thus we get


 x
t3 4x3
200t − − x t 2
= 200x − .
3 0 3

To find the maximum producer surplus,√ we take the derivative of the


function above and see it is zero at √50. The maximum producer
surplus is 942.81, achieved when q is 50
10. Consider the Lorenz curve L(x) = 0.2x + 0.8x2 . Find the Gini index.
CHAPTER 7. INTEGRATION 388

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

Compute an approximation of the Gini index.


13. You research a country and find the following information on income share:

Population %tile 20 40 60 80 90 95 99
Income %tile 5 15 30 50 65 75 90

Compute an approximation of the Gini index.


Solution. We approximate the area by using straight lines between the
given point and using trapezoids for the area of section. We then need to
multiply by 2, since we want the percentage below the diagonal line, and
multiply by 100 to go from percentile to percents.

The Gini index is approximately 57.


14. Find data online on the income distribution in the United States.
Good sources are the Census Bureau, at http://www.census.gov/
hhes/www/income/data/historical/inequality/index.html2 , and http:/
/www.wealthandwant.com/issues/income/income_distribution.html3 .
Compute an approximation of the Gini index from your data.

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

Spreadsheet Skills introduced


in chapter 1

This appendix accumulates the spreadsheet skills introduced in chapter 1 of


this textbook.

A.1 From Section 1-3 - Entering and Copying


Formulas
Spreadsheet skills introduced in Section 1.3 Introduction to Excel Spread-
sheets 1.3

• Basic Arithmetic in a cell - Addition, subtraction, multiplication, and


exponentiation are done with +, 1 , *, /, and ^. The variable is replaced
by a cell reference. Multiplication needs to be explicit. (We need x*y)
rather than xy.) Raising to a power of e is done with the EXP() function.
One feture to remember is that Excel uses a slightly different order of
operations compared to what is used in all math classes. Excel interprets
-5^2 as (-5)^2 rather than -(5^2).
The Basic Arithmetic video 1.3.1 demonstrates basic arithmetic.
• Arithmetic with commands - Excel has commands for normal arit-
metic operations, SUM(), PRODUCT(), QUOTIENT(), and POWER().
In practice, we will only use SUM(), which cam be used on a list.
• Showing all the formulas on a page Under the Formulas tab, the
show formulas item from the show button shows all the formulas on the
page. An image of the button 1.3.2 is in the section.
• Quick fill Is used when we want to repeat a cell or collection of cells
many times. You select a group of cells, then position the cursor over
the dot in the lower right corner of the selection. The shape of the curve
will change. Click and drage to fill. Formulas are modified according to
the rules of relative and absolute references. A screencast is in the Basic
Arithmetic video 1.3.1
• Relative and absolute references - When Copying formulae from
one cell to another, either with copy and paste, or with quickfil, it is
important to understand relative and absolute cell references. Suppose

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.

A.2 From Section 1.4 Graphing Functions in a


Spreadsheet
• Graph a function We graph a function in Excel by first making a table
of input and output values. We then select the values for both the x
and y values, then select the button to insert a scatter plot. The most
common error is to only selct the output, in which case Excel assumes
the sequence 1, 2, 3, ... is the input. A screencast of the production of
a graph of a simple function. 1.4.1 An image of the table with selections
made. 1.4.3
• Graph multiple functions Two graph multiple functions we start with
a chart that has the input and the output of the multiple functions, Select
the column for the input and the outputs to be graphed and then insett
a scatterplot. If the input variable is not included, Excel will interpret
the first output varaiable as the input and give a very different graoph. If
the input and functions are not next to each other in the table, you need
to right click (control-click on a Mac) to select cells that are not adjacent.
A screencast of the production of a graph of with several function. 1.4.7
An image of the table with multiple functions selection made. 1.4.8

• 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

A.3 From Section 1.5 Adding and Using Best Fit


Curves (Trendlines)
• Add a trendline to a chart To add a trendline, we build a chart with
the data, select the data and add a scatterplot, then right-click on a
ploint and select ”Add Trendline” from the drop down menu 1.5.2. By
defualt, Excel will add the best fitting line. (pic AddTrendlineMenu )
• Find the equation of the trendline. We use the options pallette
to format the trendline. Scroll down and select the option to Display
Equation on Chart 1.5.3. If you do not make this selection when creating
the trendline, you can right-click (Control-click on a mac) to bring the
menu up again.
• Although Excel uses the term Trenline, twe can Find a best fit curve
for some non-linear models. Select the approriate option from the
Trendline Oprions Menu 1.5.3. Options will be grayed out if the trendline
model will not fit the given data. (E.g., we cannot make an exponential
fit for data that includes negative values.)
• When we try toadd the predicted function back to the chart we
need to translate from mathematical notation to Excel notation. (E.g.,
we need to use ∗ to make multiplication explicit and ^ to make exponan-
tiation explicit.)
• Sometimes we want to change the precision of the coefficients in
the trendline, particularly when using the equation to make prediction
far from the basepoint. You right-click (Control-click on a mac) on the
label to ”Format Trendline Label” 1.5.8. Choose Number, then category
Number or Scientific, and choose the number of digits.

A.4 From Section 1.6 Using Goal Seek


Goal Seek is a tool for What If Analysis. Given a formula f (x) = y, it asks
what value of x will produce a desired value of y. It should be noted that, by
defualt, it thinks values are equal if within 0.001 of each other.
• To find Goal Seek, select the ”Data” tab, then select the ”What-If
Analysis” menu and the ”Goal Seek” item. You need to identify an input
cell with a number in to be the variable to change. You also need to
identify an output cell to that contains a formula that depend on the
input cell.
In terms of screenshots we have a starting point 1.6.2 where the input is
A3 and the output is B3 and the mune is visible in the menu bar. After
choosing Goal Seek we are presented with a Goal Seek menu 1.6.3 where
we identify the input and output cells and the desired vaule of the output.
Excel responds with the desired results 1.6.4. There is also a screencast
of the Goal Seek example 1.6.1.
• We often want to use Goal Seek to find the intersection of two curves 1.6.5.We
simply define the difference of the fuunctions as a new formula and ust
it for the output.
• Avoiding traps of Goal Seek Since Goal Seek finds results numerically,
using a variant of Newton’s method, there are several cautions to keep
in mind:
APPENDIX A. SPREADSHEET SKILLS INTRODUCED IN CHAPTER 1392

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

A.5 Google Sheets Notes for Chapter 1 skills


This text was written with the assumption it would use Excel as the spreadsheet
tool. Other institutions may decide they want to do the same approach, but
using Google sheets. This section addresses the places where the spreadsheet
instructions differ.
Skills that work the same in Excel and Sheets

• Basic Arithmetic in a cell


• Arithmetic with commands
• Quick Fill
• Relative and absolute references

• Naming a Cell
• Graph multiple functions (Given the differences for graphing a single
function.)
• Graph functions with parameters in the definition.

• Add the predicted function back to the chart


• Using Goal Seek.
• Avoiding traps with Goal Seek.

• Finding the intersection of two curves with Goal Seek.

Skills that work differently in Excel and Sheets:

• Showing all the formulas on a page is found by selecting the ”view”


tab, then the ”Show” menu, and the ”formulas” item.
• Graph a function is found by selecting the ”chart” item from the in-
sert tab. Sheets defaults to a line graph. It brings up a chart editor.
Scatterplot is a chart type.

• Use a secondary axis. Double click on the graph to bring up the


”Chart Editor”. Use the ”Series” menu to selct the function that wiill
use the left axis for scale. Scroll down to find the ”Axis” menu. Choose
”Right Axis”.

• Formatting a chart. In Sheets, double click on a chart to bring up a


Chart editor. THere are a variety on menus. You need to scroll down to
see them all.
• Showing all the formulas on a page is found by selecting the ”view”
tab, then the ”Show” menu, and the ”formulas” item.
APPENDIX A. SPREADSHEET SKILLS INTRODUCED IN CHAPTER 1393

• Add a trendline to a chart In the ”Chart editor”, scroll down and


select the ”Trendline” option.
• Find a best fit curve for some non-linear models In the ”Chart
editor”, scroll down and make a selection from the ”Type” menu.

• Change the precision of the coefficients in the trendline, Google


Sheets does not seem to have a reasonable way to do this.
• Finding Goal Seek Goal Seek is an Extension. From the ”Extensions”
menu, select ”Add-ons”, then ”Get Add-ons”. Serch for and select ”Goal
Seek”.
Appendix B

Spreadsheet Skills Introduced


in Chapter 2

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:

• Multiplication need to be explicit with * rather then implicit putting


terms and numbers next to each other.
• Exponentiation uses ^

• Square root uses sqrt


• ex is EXP(x)
• x needs to be replaced by a cell reference
• In reading -A1^2, Excel interprets the minus sign as a negation symbol
which is evaluated as eponentiation. The normal meaning of −x2 required
parentheses, so -(A1^2)

We also introduce Discontinuous functions that are common in business


settings 2.3.2. There are a few details to keep in mind:

• Business transactions are generally in whole dollars or cents, so rounding


is common.ROUND and its variants round to a specified number of digits
before or after he decimal place.
• Transactions are often in terms of multiples of a unit size. (Eggs are
usually sold in dozens.) CEILING and FLOOR round up or down to multiples
of a given quatity.

• 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

Spreadsheet Skills introduced


in chapter 3

This appendix accumulates the spreadsheet skills introduced in chapter 3 of


this textbook.

C.1 From Section 3.1- Comparing Functions and


Related Marginal Functions
The spreadsheet skill in this section was to make a table and graph of a function
and its related marginal function. This was done several ways.

C.1.1 Marginal Functions with q increasing by 1


The easist contruction is to build a table where the value of q increases by
1 3.1.4 from one row to the next. Since M f (q + 1) = f (q + 1) − f (q), we
simply subtract values in successive rows 3.1.5. Screencast of eaxmaple using
this approach. 3.1.3

C.1.2 Marginal Functions using Columns


The next easist contruction is to build a table computing f (q + 1) and f (q) as
separate columns with the cell reference replaced by the reference plus 1 3.1.13.
Since M f (q + 1) = f (q + 1) − f (q), we simply subtract values in successive
columns. Screencast of eaxmaple using this approach. 3.1.3
In practice, students often make formula mistakes when using this ap-
proach.

C.1.3 Marginal Functions using Quick Fill


The preferred construction builds a template that is easy to reuse. We set up
successive colummes for , q, q+1, f(q) and f(q+1) 3.1.14. I then only have the
enter the formula for the function one, under f(q). Quick fill then provides the
correct formula for f(q+1). Screencast of eaxmaple using this approach. 3.1.12
The approach starts at the 3 minute markIn practice, students often make
formula mistakes when using this approach.

395
APPENDIX C. SPREADSHEET SKILLS INTRODUCED IN CHAPTER 3396

C.2 From Section 3.2- Comparing Functions and


Numeric Derivatives
The spreadsheet skill in this section was to make a table and graph of a function
and its derivative. We use a variety of approaches to find numeric derivatives.

C.2.1 Derivatives from the Intuitive Approach


We build a worksheet that plotsthe function and a secant curve with control
over del x 3.2.5. We then reduce del x until the the graphs appear to be the
same the graphs appear to be the same 3.2.6. Screencast of example using this
approach. 3.2.3

C.2.2 Derivatives from Numerical Limits


Without using graphs, we can also look at the slope of the secant line as del x
gets small. 3.2.7. from one row to the next. Screencast of example using this
approach. 3.2.3

C.2.3 Graphing a Function with its Numeric Derivative


To build a chart of a function and its derivative and to grpah the functions
together, we use a variant of the approach from the previous section. We set
up successive colummes for x, x+del x, x-del x, f(x), f(x+del x) f(x-del
x), and f'(x) 3.2.11. I then only have the enter the formula for the function
one time, under f(x). Quick fill then provides the correct formula for f(x+del
x) and f(x-del x). Screencast of example using this approach. 3.2.9
In practive, we usually set delx = 0.001.

C.2.4 Using Trendline to find Derivative Formulas


If the grpah of the numerical deerivative looks like a model we know, and one
that trendline will produce, we can try to obtaina formula useing Trendline.
Add a trendline and display the formula of the trendline and R2 If the model
is correct, R2 = 1. Screencast of example using this approach. 3.2.14

C.3 From Section 3.3- Building Linear Approxi-


mations
using skills from earlier sections, I compute f (a) and f ′ (a) for a given function
and value a> I then use the point-slope formula:

Linearf (x) = f ′ (a) ∗ (x − a) + f (a)

A screencast of linear approximation of square roots 3.3.3.

C.4 From Section 3.5 - An introduction to Solver 3.5


Solver can be thought of as a more powerful version of GoalSeek 1.6. If it is
installed, it will be on the Analysis section of the Data tab 3.5.3. If is is not
installed, it is easiest to google ”Install solver Excel” to get instructions that
work with your operating system and version of Excel
APPENDIX C. SPREADSHEET SKILLS INTRODUCED IN CHAPTER 3397

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.

C.5 Google Sheets Notes for Chapter 3 Skills


Solver works the same way on both Excel and Sheets. In Sheets, it is an Add-in.
If Solver is loaded, it is a choice in the ”Extensions” menu. If not it is added
by using the extensions item ”Add-Ons” and select ”Get Sdd-ons”
Appendix D

Spreadsheet Skills introduced


in chapter 6

This appendix accumulates the spreadsheet skills introduced in chapter 6 of


this textbook.

D.1 From Section 6.1 - Evaluating and graphing


functions of several varaibles
D.1.1 Evaluating a function of several variables
Formulas in a cell can refer to several cells 6.1.3, allowing you to create and
evaluate functions of several variables. You can see a screencast of the exam-
ple 6.1.2.

D.1.2 Making a table for a function of 2 variable


To make a table of values 6.1.9 I need to construck an array where one variable
is horizontal (Row 2 in the example), and the other variable is vertical (Column
A in the example). The variabkles are then semi-absolute in the formula, with a
dollar sign before either the row or column as needed. You can see a screencast
of the example 6.1.2.

D.1.3 Turning a table of a function of 2 variables into a


surface graph
Once we have made a table of of values for a function of two variables, we
would like to turn it into a 3-D graph. We start with a table like found
above 6.1.14.We then move the varable names out of the corner 6.1.15 into
adjacent rows and columns. Highlight the table, including the values of hte
cariables. Then insert a chart, choosing the appropriate chart type. You can
choose 3-D surface chart 6.1.16, a 3_D wire frame chart 6.1.17, or a contour
chart 6.1.18. You can see a screencast of the example 6.1.13.

398
APPENDIX D. SPREADSHEET SKILLS INTRODUCED IN CHAPTER 6399

D.2 From Section 6.3 - Critical points and ex-


trema
You can use solver to solve a system of equations. You need to set the
problem up with the set of input variables and the equation of the system 6.3.3.
Then you call Solver and use all but one of the fromulas as constraints on the
system 6.3.4. You can see a screencast of the example 6.3.2.

D.3 Google Sheets Notes for Chapter 6 Skills


Sheets does not seem to hae a reasonable way of producing 3-D graphs. For
the other spreadsheet skills in this chapter, Excel and Sheets behave the same
way.
Appendix E

Spreadsheet Skills introduced


in chapter 7

This appendix accumulates the spreadsheet skills introduced in chapter 7 of


this textbook.
The main skill in this chapter was to Construct a right-hand rule Rie-
mann sum template We recount the example from the section 7.1.4. In the
set-up of the example 7.1.6. We follow our standard practice of putting the
question and answer in labeled areas at the top of the worksheet. We want to
see the start a and end b of the interval, along with number of subintervals.
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,
a = 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 sum is taken from the top of the
block (with a semi-absolute reference) to the current row. 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 D2. A Screencast of the Riemann sum axample 7.1.5
is available.
The variant of right-hand Riemann summs is to Construct a midpoint
rule Riemann sum template We recount the example from the section 7.2.5.
In the set-up of the example 7.2.7 we added an extra colum for the midpoint.
The midpoint is the right hand edge of the interval minus half the length of
the subinterval. We then evaluate at the midpoint.
Excel and Sheets work identically with respect to setting up these tem-
plates.

400

You might also like