0% found this document useful (0 votes)
28 views294 pages

Full PDF IMPT Business Calculus Excel

Uploaded by

Hv Kumbo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views294 pages

Full PDF IMPT Business Calculus Excel

Uploaded by

Hv Kumbo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 294

BUSINESS CALCULUS

WITH EXCEL

Mike May, S.J. & Anneke Bart


Saint Louis University
Business Calculus with Excel
This text is disseminated via the Open Education Resource (OER) LibreTexts Project (https://LibreTexts.org) and like the hundreds
of other texts available within this powerful platform, it is freely available for reading, printing and "consuming." Most, but not all,
pages in the library have licenses that may allow individuals to make changes, save, and print this book. Carefully
consult the applicable license(s) before pursuing such effects.
Instructors can adopt existing LibreTexts texts or Remix them to quickly build course-specific resources to meet the needs of their
students. Unlike traditional textbooks, LibreTexts’ web based origins allow powerful integration of advanced features and new
technologies to support learning.

The LibreTexts mission is to unite students, faculty and scholars in a cooperative effort to develop an easy-to-use online platform
for the construction, customization, and dissemination of OER content to reduce the burdens of unreasonable textbook costs to our
students and society. The LibreTexts project is a multi-institutional collaborative venture to develop the next generation of open-
access texts to improve postsecondary education at all levels of higher learning by developing an Open Access Resource
environment. The project currently consists of 14 independently operating and interconnected libraries that are constantly being
optimized by students, faculty, and outside experts to supplant conventional paper-based books. These free textbook alternatives are
organized within a central environment that is both vertically (from advance to basic level) and horizontally (across different fields)
integrated.
The LibreTexts libraries are Powered by NICE CXOne and are supported by the Department of Education Open Textbook Pilot
Project, the UC Davis Office of the Provost, the UC Davis Library, the California State University Affordable Learning Solutions
Program, and Merlot. This material is based upon work supported by the National Science Foundation under Grant No. 1246120,
1525057, and 1413739.
Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not
necessarily reflect the views of the National Science Foundation nor the US Department of Education.
Have questions or comments? For information about adoptions or adaptions contact [email protected]. More information on our
activities can be found via Facebook (https://facebook.com/Libretexts), Twitter (https://twitter.com/libretexts), or our blog
(http://Blog.Libretexts.org).
This text was compiled on 02/01/2024
TABLE OF CONTENTS
Licensing

1: Functions Graphs and Excel


1.1: Linear Functions and Models
1.2: Functions in the Business Setting
1.3: Introduction to Excel Spreadsheets
1.4: Graphing Functions with Excel
1.5: Using Excel to find Best-Fit Curves
1.6: Finding Numerical Solutions with Goal Seek

2: Business Applications
2.1: Market Equilibrium Problems
2.2: Nonlinear Functions
2.3: Modeling Revenue, Costs, and Profit

3: Rate of Change and Derivatives


3.1: Marginal Functions and Difference Quotients
3.2: Numeric Derivatives and Limits
3.3: Local Linearity
3.4: Optimization
3.5: An Introduction to Solver

4: Symbolic Differentiation
4.1: Elementary Derivatives
4.2: Derivative Rules for Combinations of Functions
4.3: The Chain Rule
4.4: Differentiation Using Computer Algebra

5: Differentiation Techniques and Applications


5.1: Implicit Differentiation
5.2: Related Rates
5.3: Elasticity

6: Functions of Several Variables


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

7: Integration
7.1: Approximating Definite Integrals as Sums
7.2: The Fundamental Theorem of Calculus
7.3: Basic Antidifferentiation
7.4: Integration by Change of Variables or Substitution

1 https://math.libretexts.org/@go/page/83963
7.5: Integration using Computer Algebra
7.6: The Normal Distribution- An extended numeric example
7.7: Applications of the Integral- Investment and Depreciation
7.8: Economics Applications of the Integral

Index
Glossary
Detailed Licensing

2 https://math.libretexts.org/@go/page/83963
Licensing
A detailed breakdown of this resource's licensing can be found in Back Matter/Detailed Licensing.

1 https://math.libretexts.org/@go/page/115375
CHAPTER OVERVIEW

1: Functions Graphs and Excel


1.1: Linear Functions and Models
1.2: Functions in the Business Setting
1.3: Introduction to Excel Spreadsheets
1.4: Graphing Functions with Excel
1.5: Using Excel to find Best-Fit Curves
1.6: Finding Numerical Solutions with Goal Seek

This page titled 1: Functions Graphs and Excel is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike
May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is
available upon request.

1
1.1: Linear Functions and Models
We will start this chapter with a review of linear functions. In business there are quite a few examples of linear equations.
Examples include supply and demand functions. There are some standard concepts related to lines that we will review, including
the slope.
Following the conventions of microeconomics, we will often use the variables p and q, for price and quantity, 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 demand equilibrium will convince you this standard usage.)

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.

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 equations 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.
Solution

1.1.1 https://math.libretexts.org/@go/page/83910
F igure 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 P 1 = (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
y − y0 = (x − x0 )
x1 − x0

The 2-point form of a line


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
p − p0 = (q − q0 )
q1 − q0

The 2-point form of a line

 Example 1.1.3: Finding four versions of a line.

We find that we can sell 150 widgets a day if we sell them at $10. If we raise the price to $15, we can only sell 110 widgets a
day. Assume that there is a linear relationship between price and quantity sold. Find the equation of the line in all four forms.
Solution
Writing this using our variables p (price) and q (quantity of widgets) 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

1.1.2 https://math.libretexts.org/@go/page/83910
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

We just found the slope and we just need to pick a point (p , q ) to finish the problem. (Recall that p and q are the variables, so
0 0

we want to leave those as they are.) In this case lets pick (p , q ) = (150, 10). Then we get this simplified version, which is
0 0

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

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.3: 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.
1. Find the equation of the line.
2. Find the cost of making 200 widgets.
Solution
1. 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. The general formula for a line
with these variables will have the form \[ C=m q+b. \nonumber \nonumber \] In this example m = 11 and b = 400,
hence the equation of the line is

C = 11q + 400

2. Using the equation form part a) we see that the cost of producing 200 widgets is \[ C=11 (200)+400=\$2,600 \nonumber
\nonumber \]

 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.
1. Find the equation of the line.
2. How much is she paid if she works 56 hours in a week?
3. What is she paid for working 30 hours in a week?
Solution
1. For this example we will use “designer variables”. 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 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 \[ \text{Pay} = \text{variable pay} +
\text{Fixed pay}\text{.} \nonumber \nonumber \] This gives us

1.1.3 https://math.libretexts.org/@go/page/83910
P ay = m(hrs − 40) + 500 = 18 ∗ (hrs − 40) + 500.

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


3. 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 using the formulas.

Exercises 1.1.2Exercises 1.1 Linear Functions and models


For problems 1-6, given two points in the (q, p) plane and a value q 0:

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 q by the line.
0

 Exercise 1:

Points (2, 5) and (6, 17), with q 0 = 4.

Hint.
Find the slope and use the point-slope form

Answer
change in p 17−5
First find the slope: m = change in q
=
6−2
=
12

4
=3

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 − p = m(q − q ). We can choose either one of the points, so in this case
0 0

we will find the line using the point (q , p ) = (2, 5). This gives the equation p − 5 = 3(q − 2).
0 0

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

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

 Exercise 2:

Points (5, 7) and (10, 7), with q 0 = 20.

 Exercise 3:

Points (20, 10) and (40, 5), with q 0 = 12.

Answer
Just as in problem 1 we find the slope and then find the equation of the line.
change in p 5−10
First find the slope: m = change in q
=
40−20
=−
20
5
=−
1

1.1.4 https://math.libretexts.org/@go/page/83910
Using p = m(q − q 0) + p0 with (q 0, p0 ) = (20, 10) and m = − 1

4
, we get p = − 1

4
(q − 20) + 10. Solving for p we get
1
p =− q + 15
4

Evaluate at the given point. p(12) = − 1

4
(12) + 15 = 12

 Exercise 4:

Points (5, 62) and (115, 783), with q 0 = 415.

 Exercise 5:

Points (273, 578)and (412, 6), with q 0 = 309.

Answer
Just as in problem 1 we find the slope and then find the equation of the line.
change in p 578−6
First find the slope: m = change in q
=
273−412
=−
572

139

Using p = m(q − q ) + p with (q


0 0 0, p0 ) = (412, 6) and m = − , we get p = − (q − 412) + 6. (We can combine
572

139
572

139

the constant terms – the 6 and the − 572

139
∗ (−412), but leaving the equation in this form is acceptable.)

Evaluate at the given point. p(309) = − 572

139
(309 − 412) + 6 = −
572

139
(−103) + 6 = 429
119

139

 Exercise 6:

Points (509, 17) and (211, 132), with q 0 = 4.

For problems 7-12, 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 q . 0

c. Give the value of q for which the predicted value of p is 0.

 Exercise 7:

A slope of 3, passing through (6, 3), with q 0 = 4.

Answer
Using p = mq + b, we get 3 = 3(6) + b, so b = −15 and the equation of the line is p = 3q − 15
If q0 = 4, then p = 3q − 15 = 3(4) − 15 = −3
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.]

 Exercise 8:

A slope of −2, passing through (2, −5), with q 0 = 3.

 Exercise 9:

A slope of 12.7, passing through (22, 183), with q 0 = 46.

Answer
Using p = m(q − q 0) + p0 we get p = 12.7(q − 22) + 183.

1.1.5 https://math.libretexts.org/@go/page/83910
When q 0 = 46, we get that p = 12.7(46 − 22) + 183 = 12.7(24) + 183. And hence p = 487.8
The predicted value of p is 0, when 0 = 183 + 12.7(q − 22). Solving for q we get: 12.7(q − 22) = −183 This implies
. Therefore,
−183
(q − 22) =
12.7

183
q = 22 − = 7.59.
12.7

 Exercise 10:

A slope of −0.23, passing through (7.6, 19.7), with q 0 = 59.6.

 Exercise 11:

A slope of 0, passing through (12.3, 9.8), with q 0 = 74.

Answer
Using p = m(q − q 0) + p0 we get p = 0(q − 12.3) + 9.8 or p = 9.8.
When q = 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
0

we plug in.)
The predicted value of p is never 0, because the predicted value of p is always 9.8.

 Exercise 12:

Add exercises text here.

Answer
A slope that is undefined, passing through (6, 3), explaining why part b would not make sense.

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.

 Exercise 13:

3p + 2q = 6.

Answer
Solve for p so we can read off the slope more easily: p = −2/3q + 2. Hence the slope is m = −2/3
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
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)

 Exercise 14:
7p − 4q + 14 = 0.

1.1.6 https://math.libretexts.org/@go/page/83910
 Exercise 15:
y = 5.

Answer
The slope is 0
The y-intercept is y = 5. There is no x -intercept
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.

 Exercise 16:

x = 3.

 Exercise 17:

y = 4(x − 3) + 9.

Answer
The slope is 4
To get the y-intercept we set y = 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 = − 9

4
and x = 3 − 9

4
=
3

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

 Exercise 18:

112p + 257q = 4783.

 Exercise 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.

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

 Exercise 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.1.7 https://math.libretexts.org/@go/page/83910
This page titled 1.1: Linear Functions and Models is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by
Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is
available upon request.

1.1.8 https://math.libretexts.org/@go/page/83910
1.2: Functions in the Business Setting
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

Quadratic Functions.
Quadratic functions should be very familiar from previous mathematics courses. They are of the form y = ax
2
+ bx + c. These
are our standard parabolas.
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
2
\revenue = (mq + b) ∗ q = m q + 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.

F igure 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 = ax + bx + c the sign of the coefficient of x , a, will determine if we have a maximum or a minimum. If a is positive, the
2 2

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.
− − −−−−−
2
−b ± √ b − 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.

1.2.1 https://math.libretexts.org/@go/page/83911
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) = a nx
n
+ ⋯ + a1 x + a0 . In
such cases we remember that the number of turning points of the graph can be no more than n − 1.

Exponential functions.
The exponential model, with an equation of the form f (t) = p ∗ e . Sometimes the exponential function e is denoted by exp(t).
t t

Excel will use this format, so it is worth looking at the notation in this case. f (t) = p ∗ e can also be written as
rt

f (t) = p ∗ exp(rt)

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 ∗ e or f (t) = p ∗ exp(rt). However, in real world applications we tend to use A = pR and make the
rt t

equation f (t) = p ∗ R . (The reader is warned that R = e and both R and r are referred to as the rate. You will have to use the
t r

context to tell them apart.)


Exponential functions are used for proportional growth or decay. In business, compound interest is given as an exponential
function. In particular, if P is the principal and r is the interest rate “compounded continuously” (expressed as a decimal), then the
amount A after time t is given by A = P e t. The relationship (in general) between a future value (FV) and the present value
r

(PV) given an interest rate r per period, with t being the number of compounding periods is given by:
t
\FutureValue : F V = P V ∗ (1 + r)

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.
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) . The extra information tells us PV =
t

2000, and when t = 10 we know that F V = 2000 ∗ (1 + r) = 10, 000. This is enough information to solve for r. Dividing both
10

sides by 2000 shows that (1 + r) = 5.


10

To solve this equation we need rules of exponents. We obtain 1 + r = 5 , and hence r = 5


1/10
− 1 = 0.1746. This means that
1/10

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 ) . In general we can set up equations and solve for the unknown quantities.
t

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.

1.2.2 https://math.libretexts.org/@go/page/83911
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.

Normal Distribution Functions.


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

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

1.2.3 https://math.libretexts.org/@go/page/83911
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

2
−( m−m)
( ) 0
s
f (x) = ae = ae = 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.

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.

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

1.2.4 https://math.libretexts.org/@go/page/83911
class="

ExercisesExercises Functions in the Business Setting


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

 Exercise 1:

For a linear model, f (x) = ax + b, how do I get a graph with


1. A positive y -intercept?
2. A negative slope?

Answer
1. How to obtain a positive y-intercept. - The y-intercept is determined by b, so we just let b > 0.
2. How to obtain a negative slope. - The slope is determined by a in the formula above, so we let a < 0

 Exercise 2:

Suppose we are working with a quadratic model, f (x) = ax 2


+ bx + c

1. How do we get a graph, that points down? (i.e. a graph that has a maximum)?
2. How will we know if the graph of the function intercepts the x-axis at two positive values?

 Exercise 3:

For a quadratic model, f (x) = ax 2


+ bx + c, How do I get a graph where the vertex has x = 5?

Answer
2
−b±√b −4ac

Quadratics are parabolas and the zeros (if they exist) are at x = 2a
.

−b −b
The vertex is always located at x = . So if the vertex is to be at x = 5 we need to make sure
2a
= 5. There are many
2a

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.

 Exercise 4:

For a polynomial model, f (x) = a nx


n
+ ⋯ + a1 x + a0 , how do I get a graph that goes up at both ends?

1.2.5 https://math.libretexts.org/@go/page/83911
 Example 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.

 Exercise 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?

 Exercise 7:

For a logistic growth model, f (x) = M

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?

Answer
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

 Exercise 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?

 Exercise 9:
2
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.)

Answer
x−m
The high point of the graph occurs when s
= 0. This happens at x = 7, so this means that m = 7 as well.
2
7−7
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
2
x−7
f (x) = 20 exp(−( ) ).
s

If the value of f (4) is between 1 and 2, f (4) = 20 exp(−( 4−7

s
) ) is between 1 and 2. We can solve for s

2
4 −7
1 < 20 exp(−( ) ) <2
s

1.2.6 https://math.libretexts.org/@go/page/83911
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)
2
s

and hence
9
2.3026 < < 2.996
2
s

So s2
>
9

2.996
and s
2
<
9

2.3026
. Hence 1.734 < s < 1.977.

 Exercise 10:
2
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.)

 Exercise 11:

For the power model, f (x) = ax b


, how do I produce a graph with f (1) = 5 and f (3) = 1?

Answer
f (1) = 5 means that a1 b
= a = 5.

f (3) = 1 means that ax b


=5∗3
b
=1 hence 3 b
= 0.2 and hence ln(3 b
) = ln(0.2).

So b ln(3) = ln(0.2) which implies that b = ln(0.2)/ ln(3) ≈ −1.465.

 Exercise 12:

For the inversely proportional model, f (x) = a/x, how do I produce a graph with f (1) < 0 and f (3) = −5?

 Exercise 13:

For the logarithmic model, f (x) = a ln(x) how do I produce a graph with f (e) = 3?

Answer
f (e) = a ln(e) = a(1) = a, hence a = 3

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.

 Exercise 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.

 Exercise 15:
When looking at revenue, we can assume that sales will be linear function of the price of the object.

1.2.7 https://math.libretexts.org/@go/page/83911
Answer
Using a linear model we get \Sales = m ∗ \price + b.
Price is the free variable (the input) and sales is the dependent variable (the output)

 Exercise 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.

 Exercise 17:
The amount of time it takes an investment to double assuming a fixed interest rate.

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

 Exercise 18:

The amount of electricity needed for air conditioners in a Washington, D.C. at various times of the year.

 Exercise 19:
The amount of metal needed to build a fuel tank as a function of the amount of fuel to be stored.

Answer
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:
3/2
Amount of metal = K ∗ (V ) .

V is the input, the K is some constant and Amount of Metal is the output.

 Exercise 20:

The total length of booms needed to contain an oil spill as a function of the size of the spill.

 Exercise 21:

The monthly sales of a hot new electronic device in a country.

Answer
Sales will likely increase a lot initially, but then level out. So a logistic equation may be a reasonable model.
−rx
f (x) = M /(1 + ae ).

 Exercise 22:
The distribution of sales of pairs of pants by leg length.

1.2.8 https://math.libretexts.org/@go/page/83911
This page titled 1.2: Functions in the Business Setting is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by
Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is
available upon request.

1.2.9 https://math.libretexts.org/@go/page/83911
1.3: Introduction to Excel Spreadsheets
This book will rely heavily upon the use of Excel, since it is the standard mathematical tool 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 practice.” In a business environment, spreadsheets should be
written so that someone 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:
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.

Basic Arithmetic, show formulas and quick fill..

Excel-Examples1-3-a

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

1.3.1 https://math.libretexts.org/@go/page/83912
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.
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.

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.

1.3.2 https://math.libretexts.org/@go/page/83912
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 ‘
+ ’.

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, … .

Absolute and Relative Cell References.

1.3.3 https://math.libretexts.org/@go/page/83912
Excel-Examples1-3-b

F igure 1.3.2. 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 selected.

1.3.4 https://math.libretexts.org/@go/page/83912
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 new formula is =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.
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.
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 htis course.

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 documenting 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,

1.3.5 https://math.libretexts.org/@go/page/83912
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.

We can then use the names in formulas. In general, the formulas with nicely named variables are easier to read.

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.

1.3.6 https://math.libretexts.org/@go/page/83912
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.”

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 +, -, *, /, 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 −3 , which has a negative sign and an exponentiation. In all math
2

classes you have taken this is interpreted as −(3 ) or −9, with exponentiation done first. In Excel, this is interpreted as (−3)
2 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) .

1.3.7 https://math.libretexts.org/@go/page/83912
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 .
class="

ExercisesExercises Introduction to Excel Spreadsheets

 Exercise 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.

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

 Exercise 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.

 Exercise 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 automatically recomputed.

Answer

1.3.8 https://math.libretexts.org/@go/page/83912
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.

The spreadsheet should have entries as shown above.

 Exercise 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.

 Exercise 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.

Answer
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

1.3.9 https://math.libretexts.org/@go/page/83912
 Exercise 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?

This page titled 1.3: Introduction to Excel Spreadsheets is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated
by Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history
is available upon request.

1.3.10 https://math.libretexts.org/@go/page/83912
1.4: Graphing Functions with Excel
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. It is a skill worth developing however. 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 = x − 6x over −10 ≤ x ≤ 10. For the second example, we would like to
2

use parameters in the formula, for example, y = ax + bx + c, with specified values of a, b, and c, and have the ability to easily
2

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.

 Example 1.4.1: A Basic Graph.

Example1 4 1 - Graphing a function

F igure 1.4.2. Video presentation of this example


—Graphing y = x 2
− 6x over −10 ≤ x ≤ 10

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.

1.4.1 https://math.libretexts.org/@go/page/83913
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.

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

 Example 1.4.3: A Graph with Parameters.

1.4.2 https://math.libretexts.org/@go/page/83913
Example1 4 2 Graph with Parameters

F igure 1.4.4. Video presentation of this example


— Graphing y = x 2
− 6x as an example of y = ax
2
+ 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.

Now, we once again do a quick fill to complete the table, and then add a scatterplot.

The difference with this second example is that if I now want to look at the graph of y = −x
2
+ 3x + 10, I simply change the
values of the parameters a, b, and c.

1.4.3 https://math.libretexts.org/@go/page/83913
 Example 1.4.5: Controllling the Viewing Window.

Example1 4 3 Parameters for x- range

F igure 1.4.6. Video presentation of this example


— Graphing y = x − 6x as an example of
2
y = ax
2
+ 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 .

1.4.4 https://math.libretexts.org/@go/page/83913
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.

 Example 1.4.7: Graphing more than One Function.

Example1 4 4 Graph of 2 functions tog…


tog…

1.4.5 https://math.libretexts.org/@go/page/83913
F igure 1.4.8. 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) = (x – x)/10, and h(x) = x – x. We start by using the procedure given above to make a chart of values for the three
2 3

functions.

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

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

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.

1.4.6 https://math.libretexts.org/@go/page/83913
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.
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 Alpha. For
example to obtain a graph of the functions f (x) = x – 3x, as x ranges from −5 to 5, we simply type “
2

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.
class="

ExercisesExercises 1.4 Graphing functions with Excel

 Exercise 1:
Produce a worksheet that with a graph of the function f (x) = x 2
− 5x, with x going from -10 to 10 by 1.

1.4.7 https://math.libretexts.org/@go/page/83913
Answer
The entry in cell B2 is =A2^2-5*A2 ; remember to use quickfill to complete the table

 Exercise 2:

Produce a worksheet that with a graph of the function g(x) = (x − 5x)/(x + 7x + 10), with x going from -10 to 10 by 1.
2 2

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.

 Exercise 3:

Produce a worksheet with a graph of h(x) = x + ax + bx + c for x from -10 to 10, where the values of a, b, and c can be
3 2

changed and the graph will update automatically. For initial values, use a = −2, b = 1, and c = −11.

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

1.4.8 https://math.libretexts.org/@go/page/83913
 Exercise 4:

Produce a worksheet with a graph of k(x) = (x + ax + b)/(x + c) for x from -10 to 10, where the values of a, b, and c can
2

be changed and the graph will update automatically. For initial values, use a = −5, b = 2, and c = −11.

 Exercise 5:

Produce a worksheet with a graph of h(x) = x − 2x + x − 11 for x going from a to b, where the values of a and b can be
3 2

changed and the graph will update automatically. For initial values, use a = −5 and b = 5.

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

This page titled 1.4: Graphing Functions with Excel is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by
Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is
available upon request.

1.4.9 https://math.libretexts.org/@go/page/83913
1.5: Using Excel to find Best-Fit Curves
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 approach 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. (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 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.

 Example 1.5.1: Best Fitting Linear Curves.

Example1 5 1 Fit Line

F igure 1.5.2. Video presentation of this example


For a first example, we are running a widget factory and have the following data on employee performance:

1.5.1 https://math.libretexts.org/@go/page/83914
(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.

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.

1.5.2 https://math.libretexts.org/@go/page/83914
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.

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 projections from my equation. You should notice that the equation Excel produces in the chart is written in standard
mathematical notation, while the corresponding 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 variable, x.)

1.5.3 https://math.libretexts.org/@go/page/83914
 Example 1.5.3: Checking and Improving our Equations.

Example1 5 1b Fitting Proportion

F igure 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.

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.4 https://math.libretexts.org/@go/page/83914
 Example 1.5.5: Fitting the Consumer Price Index (CPI) to a best fitting curve; an Extended Example.

Example1 5 2 Exponential t, base year

F igure 1.5.6. 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.xlsx.

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.

1.5.5 https://math.libretexts.org/@go/page/83914
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 projected value of the index in the year 0. Another way of
thinking about this is that the values we are evaluating this exponential function at run in the thousands!.
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.
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 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.

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.6 https://math.libretexts.org/@go/page/83914
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 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.

Example1 5 2b Fixing domain with CPI d…


d…

F igure 1.5.7. Continued video presentation of this example


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.

1.5.7 https://math.libretexts.org/@go/page/83914
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 exponential model fits quite well over that period. Notice that
the exponent is quite different in the two periods.

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.8 https://math.libretexts.org/@go/page/83914
Exercises: Using Excel to find best fit curves

 Exercise 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

1. Find the best fitting linear function for the data.


2. Give the production value that function predicts for May.
3. Give the production value that function predicts for July.

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

 Exercise 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

1. Find the best fitting linear function for the data.


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

 Exercise 3:

We have the following data on gadget revenue:

1.5.9 https://math.libretexts.org/@go/page/83914
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.
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.

Answer
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.0006x^2 + 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.0006x^2 + 10.694x – 11586\text{,}\) and we get $13, 824 for the quadratic model.
[You can use Excel, a calculator or Wolfram Alpha to do these last computations.]

 Exercise 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 interested 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

1. Find the best fitting power function for the data.


2. Use your power function to estimate the weight of a tank that holds 40,000 gallons.
3. Find the best fitting linear function for the data.
4. Use your linear function to estimate the weight of a tank that holds 40,000 gallons.
5. 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.

 Exercise 5:

I am looking at sales figures for a new product, the gizmo. The sales figures seem to be growing at an exponential rate.

1.5.10 https://math.libretexts.org/@go/page/83914
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.

Answer
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.78e^{0.1459x}\)


b. To find the predicted units sold for July we would need \(x = 19\text{.}\)

Using Excel we see that the predicted number of units sold is 14,949.

Excel has a limited set of models that can be used for 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.

 Exercise 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) = M arketC ap/(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.

 Exercise 7:

1.5.11 https://math.libretexts.org/@go/page/83914
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 − M ean
sales(size) = M axP erSize ∗ exp (− ( ( ) )) . .
StandardDeviation

(Note we need an extra set of parenthesis to keep the order of operations 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 StandardDeviation to reasonably fit the data.

Answer
The initial plot shows that the distribution is normal:

The maximum is at x = 10. This suggests that M ean = 10.


2
x− 1 0
−(( ) )

If we use Sales(x) = M axP erSize ∗ e


STDev
, then if x = 10 we have Sales(10) = M axP erSize, and so
M axP erSize = 20, 000, hence we have that
2
x− 1 0
−(( ) )
STDev
Sales(x) = 20, 000 ∗ e .

2
−1
(( ) )

Let x = 11, then 12825 = 20, 000 ∗ e STDev


.

−1

Hence e STDev
2
= f rac128252000. T hen
ST Dev2
= ln(f rac1282520000)

−−−−−−−−−−−−−−−−− −
So ST Dev = √(−1/ ln(12825/20000))= 1.5002 so ST Dev = 1.5002
Comment: We will develop some methods to solve problems such as this using Excel in a section called Best Fit Curves
(Chapter 6)

 Exercise 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_population .)
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. Produce 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.

1.5.12 https://math.libretexts.org/@go/page/83914
 Exercise 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/ .)
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 revenue 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.

Projects:

 Exercise 10:

Find the data for the consumer price index and the Dow Jones Industrial 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.

 Exercise 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.

This page titled 1.5: Using Excel to find Best-Fit Curves is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated
by Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history
is available upon request.

1.5.13 https://math.libretexts.org/@go/page/83914
1.6: Finding Numerical Solutions with Goal Seek
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.

 Example 1.6.1: A Linear Example.

Example1 6 1 BasicGoalSeek

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

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.

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.66666667or 35/3, which we could also have found by simple algebra.

 Example 1.6.3: A Quadratic Example and Concern with Precision.

We move on to a quadratic example. We let f (x) = x and want to find f (x) = 2. The set up is similar, with an appropriate
2

change in the equation. However when I use Goal Seek, I don't get quite the correct answer.

Instead of finding a value with x2


= 2, I found a value with x
2
= 1.99999495.

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

1.6.1 https://math.libretexts.org/@go/page/83915
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 10 , times the error. We then use Goal Seek to make that value close to zero. We effectively reduce our error tolerance
6

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.

 Example 1.6.4: More Realistic Examples: Finding the Intersection of Two Curves, or Equivalently
Finding where Two Functions are Equal to one Another..

Example1 6 2 IntersectCurves

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:

Supply P rice(q) = ln(50 + 1000q) + q

Demand P rice(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.

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

1.6.2 https://math.libretexts.org/@go/page/83915
but that is not an easy problem.
Our last example for Goal Seek looks at financial computations.

 Example 1.6.6: Using Goal Seek for Financial Computations.

Example1 6 3 Retirement Result Goal …

Figure 1.6.7. 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\amp= Beginning Balance + deposits + Interest Earned

Interest Earned\amp= (Beginning\ Balance + Deposits) * Interest\ Rate

Beginning Balance\amp= previous\ year's\ ending\ balance.

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

(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 initial 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 solution without us having to reduce that 120-step computation to a single long formula.

 Example 1.6.8: 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.

1.6.3 https://math.libretexts.org/@go/page/83915
Example1 6 4 NewtonMethod

Figure 1.6.9. 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 x = 2 starting with a guess of
2

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

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.

1.6.4 https://math.libretexts.org/@go/page/83915
example1 6 5 Bad Goal Seek problems

Figure 1.6.10. 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) = x – 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.
3

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 x + 1 = 0. Since we know that all squares are non-negative, this does not
2

have an answer. Goal Seek will tell us that, but it will make some pretty wild guesses.

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/x = 0. 4

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.14798 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
4

graph of the function in question to make sure we are asking a reasonable question.

1.6.5 https://math.libretexts.org/@go/page/83915
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) = x – 50 ∗ x with an initial guess of x = 1, and ask Goal Seek to find when
3

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

Finding Numerical Solutions with Goal Seek


class="
Use Goal Seek to find where the given equation has the desired value.

 Exercise 1:
Let f (x) = −2x 2
+ 20x + 7. Find an x so that f (x) = 50.

Answer
Wolfram detects two solutions.

 Exercise 2:

1.6.6 https://math.libretexts.org/@go/page/83915
Let f (x) = −x 2
+ 4x + 5. Find an x so that f (x) = −5.

 Exercise 3:

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

Answer

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

 Exercise 5:

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

Answer
Note that next to the solution there is a button for “Approximate form”
We can use that to get a decimal approximation:

Note that we can get more digits if we want or return to the exact answer

 Exercise 6:

Let f (x) = 1000 ∗ (1/2) (x/7)


. Find an x so that f (x) = 50.

1.6.7 https://math.libretexts.org/@go/page/83915
Use Goal Seek to find the indicated number of points where the curves intersect

 Exercise 7:

Find an intersection point of f (x) = 5x + 7 and g(x) = 40– 2x.

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

Wolfram tells us that x = 33

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

7
,
214

7
).

 Exercise 8:
Find an intersection point of f (x) = 5x and g(x) = 9x/7.

 Exercise 9:

Find an intersection point of f (t) = exp(−0.05t) ∗ (3t + 5) and g(t) = t/10.

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

 Exercise 10:

Find an intersection point of f (t) = 20 ln(100t + 854) and g(t) = 0.02t.

 Exercise 11:

Find both intersection points of f (x) = 7 + 10x– x and g(x) = 0. 2

Answer
The y-coordinates must be 0. If we use the approximate form of the solution we get (−0.65685, 0)and (10.657, 0).

 Exercise 12:

Find both intersection points of f (x) = 15x + 200/x and g(x) = 20 + 25x.

 Exercise 13:

We have reason to believe that the profit function for widget manufacturing is modeled by a quadratic equation. We have the
following data for sales and profits.

Sales 100 250 350 500 600

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

1.6.8 https://math.libretexts.org/@go/page/83915
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.

Answer
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 approximate 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.

 Exercise 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 investment?
d. What is the second period of time when the two opportunities offer the same return?

 Exercise 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.

Answer
a. The entry in cell B2 is =(10*A2-1)*EXP(-A2)+2

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

This page titled 1.6: Finding Numerical Solutions with Goal Seek is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or
curated by Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit
history is available upon request.

1.6.9 https://math.libretexts.org/@go/page/83915
CHAPTER OVERVIEW

2: Business Applications
2.1: Market Equilibrium Problems
2.2: Nonlinear Functions
2.3: Modeling Revenue, Costs, and Profit

This page titled 2: Business Applications is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike May,
S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available
upon request.

1
2.1: Market Equilibrium Problems
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.
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 producers 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:
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.

2.1.1 https://math.libretexts.org/@go/page/83917
 Example 2.1.1: Starting With Formulas.

Example2 1 1 Equilibrium With Lines

Figure 2.1.2. Video presentation of this example


Suppose q denotes quantity, and the supply price for widgets is given by
q
Supply price = $6 + .
100

We are also told the demand price is given by


2q
Demand price = $18 − .
100

Find the equilibrium price and quantity.


Solution

Solution. 1(a)
We have started with an example that we can do by basic algebra without any technology. Subtracting the two equations, we see
that
\[ 0=\$12-\frac{3q}{100}\text{.} \nonumber \]

2.1.2 https://math.libretexts.org/@go/page/83917
Some straightforward algebra shows that the equilibrium quantity is 400. Substituting back into either equation gives an
equilibrium price of $10.

Solution. 2 (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\text{.}\)


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.

Example2 1 2EquilibriumFromData

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 scatterplot so that we can see the values.

2.1.3 https://math.libretexts.org/@go/page/83917
Next we add linear trendlines for both the supply and demand. We select the option to show the equations.

The projected equations are:


supply price\amp = 0.005 ∗ quantity + 10

demand price\amp = −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.

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.

2.1.4 https://math.libretexts.org/@go/page/83917
Example2 1 3 FullEqualibriumProblem

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.

The supply and demand functions are:

supply price\amp = .0032 ∗ quantity + 3.44

demand price\amp = −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.

2.1.5 https://math.libretexts.org/@go/page/83917
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.

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.
class="

Exercises 2.1 Equilibrium Problems


For problems 1-4, given the equations of the supply and demand curves:
a. Evaluate the curves at q .
0

b. Find the market equilibrium.

2.1.6 https://math.libretexts.org/@go/page/83917
 Exercise 1:
Given supply price = 3quantity + 10 and demand price = −2quantity + 30, with q 0 = 6.

Answer

a.

Entries in the cells before quick fill

Table with quantities ranging from 0 to 10


From the table we see that at q 0 =6 the supply price is $28 and the demand price is $18.

This page titled 2.1: Market Equilibrium Problems is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by
Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is
available upon request.

2.1.7 https://math.libretexts.org/@go/page/83917
2.2: Nonlinear Functions
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.

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

3 −−−−− other roots done as fractional


f (x) = √2x + 7 =(2*A1+7)^(1/3)
exponents

f (x) = x
4
=A1^4

Excel does negation before


f (x) = −x
4
=-(A1^4)
exponentiation

f (x) = ln(x) =LN(A1) Log base e or natural log

f (x) = log
10
(x) =LOG10(A1) Log base 10 or common log

f (x) = log (x)


2
=LOG(A1,2) Log to another base

f (x) = 1.06
x
=1.06^(A1)

f (x) = e
x
=EXP(A1)

Parentheses needed for correct


=EXP(-(A1^2))
2
(− x )
f (x) = e
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, we get the same increase in demand by cutting the price in half, or if from half price we give the product
away for free. 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.

2.2.1 https://math.libretexts.org/@go/page/83918
Example2 3 1 ExponentialEquilibrium

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.
(quantity/100)
Demand Price(quantity)\amp = 1000 ∗ (0.9)

(quantity/100)
Supply Price(quantity)\amp = 200 ∗ (1.2 ) .

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.

Example2 3 2 BreakEvenData

Figure 2.3.4. Video presentation of this example

2.2.2 https://math.libretexts.org/@go/page/83918
We have the following table of data for demand price and costs for our product.

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:
2
cost(q)\amp = −0.0028 q + 14.353q + 968.13
−0.453
price(q)\amp = 286.02 q .

Next, we follow our models to get equations for revenue and profit.
−0.453 0.547
revenue(q)\amp = q ∗ price(q) = q286.02 q = 286.02 q

0.547 2
profit(q)\amp = revenue(q) − cost(q) = 286.02 q + 0.0028 q − 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.

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

2.2.3 https://math.libretexts.org/@go/page/83918
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 5,10)
< 1, 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 digits 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 answer, 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.

Example2 3 Rounding

Figure 2.3.5. Video discussion of discontinuous functions in Excel

 Example 2.3.6: Raw Materials in Blocks.

2.2.4 https://math.libretexts.org/@go/page/83918
Example2 3 3 RawMaterialBlocks

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 constant, 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:
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.

2.2.5 https://math.libretexts.org/@go/page/83918
Example2 3 4 OvertimePay

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

 Example 2.3.10: Market Equilibrium with Discontinuous Supply Price.

2.2.6 https://math.libretexts.org/@go/page/83918
Example2 3 5 DiscontSupplyPrice

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:
demand price(q) = 4 − q/2

1q/2 + 1 q ≤2
supply price(q) = { .
1q/2 + 3 q >2

Find the market equilibrium price.


Solution
We would like to find the place where the two curves cross. However 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.

2.2.7 https://math.libretexts.org/@go/page/83918
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.
class="

ExercisesExercises 2.3 Nonlinear functions


For Exercise 2.3.1– 2.3.5, given the equations of the supply and demand curves:
a. Evaluate the curves at q .0

b. Find the market equilibrium.

 Exercise 1:

Given supply price = 20 ∗ (1.1) (q/10)


and demand\ price = 50 ∗ (0.95) (q/10)
, with q
0 = 10.

Answer

Formulas

Table
1. At q = 10, supply = $22, and demand = $47.50
0

2. Using Goal Seek we see that the equilibrium occurs at q = 62.5 and the price is $36.29

 Exercise 2:

Given supply price = 10 ∗ (1.05) (q/10)


and demand price = 60 ∗ (0.96) (q/10)
, with q 0 = 10.

 Exercise 3:
Given p s = 5 ln(q + 10) and p
d = 1000/(q + 10) − 2, with q
0 = 40.

Answer

2.2.8 https://math.libretexts.org/@go/page/83918
Formulas

Table

Goal Seek near


q = 40

1. At q = 40, supply = $19.56, and demand = $18


0

2. Using Goal Seek we see that the equilibrium occurs at q = 37 and the price is $19.25

 Exercise 4:

Given supply price = 10 ln(q + 2) and demand price = 60 ∗ (0.90) (q/100)


, with q 0 = 6000.

 Exercise 5:
Given
(q/10)
20 ∗ (1.1) q ≤ 50
supply price(q) = {
(q/10)
20 ∗ (1.1) q > 50

and
(q/10)
demand price(q) = 50 ∗ (0.095 ) ,

with q 0 = 40.

Answer
For this problem our supply price function changes at \(q = 50\text{.}\) This is indicated in the table by a thin blue column.

1. At \(q_0=40\text{,}\) supply = $29.28, and demand = $40.73


2. The equilibrium occurs somewhere between \(q = 60\) and \(q = 70\text{.}\) Using Goal Seek we find that the equilibrium
occurs for \(q = 62.43\)

For Exercise 2.3.6– 2.3.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.

2.2.9 https://math.libretexts.org/@go/page/83918
 Exercise 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.

 Exercise 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.

Answer

a. Using the trendline feature from Excel we get that


\begin{align*} \text{Supply} \amp= 0.0015x + 9.7518 \\ \text{Demand} \amp = 50.214e^{(-0.0001x)}\text{.} \end{align*}
b. See the tables below.
c. See the tables below.

Formulas entered

2.2.10 https://math.libretexts.org/@go/page/83918
Finding all valuers with
these formulas. The
yellow ones are the ones
we are looking for.

Using Goal Seek to find


the equilibrium values in
column E

 Exercise 8:

Given the data

Quantity 1009 1469 2041 2462 3002 3517 3979 3200

Supply price 98 106 112 120 1231 126

Demand
160 144 116 102 82
price

and the assumption that supply price is linear and demand price is exponential.
For Exercise 2.3.9– 2.3.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.)

 Exercise 9:

Let

ln(2x) x ≤ 50
f (x) = { .
200 exp(−x/10) x > 50

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

2.2.11 https://math.libretexts.org/@go/page/83918
d. The function is not continuous at \(x = 50\text{.}\) Note that the function drops from near 4.5 to about 1 rather suddenly.

 Exercise 10:

Let
− −−−− −
√ 2x + 21 x ≤ 50
f (x) = { .
10 sin(x/5) x > 50

 Exercise 11:

The cost of shipping an item is $2 per pound, or fraction thereof, with a minimal cost of $5.

Answer
1. The function is =MAX(2*A2,5)

2.

This page titled 2.2: Nonlinear Functions is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike May,
S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available
upon request.

2.2.12 https://math.libretexts.org/@go/page/83918
2.3: Modeling Revenue, Costs, and Profit
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.
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 ∗ demand price(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.

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.

2.3.1 https://math.libretexts.org/@go/page/83919
 Example 2.2.1: Finding Revenue From Linear Demand Price.

Example2 2 1DemandPriceRevenue

Figure 2.2.2. Video presentation of this example


We have determined that the demand price function for widgets is

demand price(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 supply price ∗ quantity.

2.3.2 https://math.libretexts.org/@go/page/83919
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.

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. They might include raw material for a manufacturer or the cost of
goods for someone in sales.
For our simplified model we assume that variable costs are proportional to quantity. This makes our cost function linear.
For our simplified model variable costs= unit costs*quantity.
Thus costs= fixed costs + unit costs*quantity.

 Example 2.2.3: Finding Linear Cost.

We can set up a small gizmo manufacturing 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 function. 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

2.3.3 https://math.libretexts.org/@go/page/83919
cost(2500) = 6000 + 14 ∗ 2500 = 41000.

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.

Example2 2 - 3and4 Pro tBreakEven

Figure 2.2.4. Video presentation of the next two examples

 Example 2.2.3: Finding Profit.

We are interested in selling widgets. The demand price function is


q
demand price = 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.

2.3.4 https://math.libretexts.org/@go/page/83919
\begin{align*} \text{revenue} \amp = \text{quantity}*\text{price}\\ \amp =q*(15-\frac{q}{1000})\\ \text{costs} \amp = \text{fixed
costs} + \text{variable costs}*\text{quantity}\\ \amp =10000+8*q\text{.} \end{align*}
Now we find profit as the difference of revenue and cost.
\begin{gather*} \text{profit} = q*(15-\frac{q}{1000})-(10000+8q)\\ profit= \frac{-q^2}{1000}+7q-10000\text{.} \end{gather*}
We then use Excel to make a chart of values and a graph.

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.

2.3.5 https://math.libretexts.org/@go/page/83919
The first break even point tells us that we need to lower our price to no more than $13.00 to 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 not be able to bring in enough
customers to make a profit.

 Example 2.2.7: Repeat, Starting With Data.

Example2 2 5StartWithData

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.

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

This produces the desired cost and price functions.

demand price\amp = −0.7796q + 17.478

cost\amp = 5.00251q + 20.162.

We enter these functions in new columns in the spreadsheet and then compute 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.3.6 https://math.libretexts.org/@go/page/83919
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.

 Example 2.2.9: Problems with Using Big Numbers.

Example2 2 6Signi cantDigits

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.

2.3.7 https://math.libretexts.org/@go/page/83919
As expected, a coefficient of each equation has been shifted by a factor of 1,000,000.
−7
demand price\amp = −8 ∗ 10 q + 17.478

7
cost\amp = 5.0251q + 2 ∗ 10 .

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 compute 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 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 select “Format Trendline Label”. Then change category
from general to number, and choose 10 decimal places. This gives us the equations:
demand price\amp = −0.0000007796q + 17.4782059302

cost\amp = 5.02506q + 20161700.

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

Exercises: Modeling Revenue, Costs, and Profit


class="
For Exercise 2.2.1– 2.2.8, given the equations of the cost and demand price function:

2.3.8 https://math.libretexts.org/@go/page/83919
a. Identify the fixed and variable costs.
b. Find the revenue and profit functions.
c. Evaluate cost, demand price, revenue, and profit at q . 0

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.

 Exercise 1:

Given demand price = −2quantity + 20 and cost = 3quantity + 10, with q 0 = 6.

Answer
a. Identify the fixed and variable costs.
The fixed cost is $10 (the constant/fixed part of the cost function), and the variable cost is $3 per item.
b. Find the revenue and profit functions
\begin{align*} \text{Revenue}\amp=\text{demand price}*\text{quantity}\\ \amp=(-2 q+20)*q=-2 q^2 +20 q
\end{align*}

2
Profit = revenue − cost\amp = −2 q + 20q − (3q + 10)

2
\amp = −2 q + 17q − 10.

This page titled 2.3: Modeling Revenue, Costs, and Profit is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated
by Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history
is available upon request.

2.3.9 https://math.libretexts.org/@go/page/83919
CHAPTER OVERVIEW

3: Rate of Change and Derivatives


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
3.2: Numeric Derivatives and Limits
3.3: Local Linearity
3.4: Optimization
3.5: An Introduction to Solver

This page titled 3: Rate of Change and Derivatives is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by
Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is
available upon request.

1
3.1: Marginal Functions and Difference Quotients
There are a number of industries where it is common for people to pay significantly 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 symphony. 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.

 Definition : 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 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 \Mcost(x + 1) is the change from \cost(x) to \cost(x + 1):

\Mcost(x + 1) = \cost(x + 1) − \cost(x).

\Mrev(x + 1) is the change from \revenue(x) to \revenue(x + 1):

\Mrev(x + 1) = \revenue(x + 1) − \revenue(x).

\Mprofit(x + 1) is the change from \profit(x) to \profit(x + 1):

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


For my widget company I have determined that the cost and demand price functions are:
2
\cost(q)\amp = 40 + 3q + q /10

\Dprice(q)\amp = 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)\amp = (\Dprice(q)) ∗ q

\profit(q)\amp = \revenue(q) − \cost(q).

I set up my worksheet to compute these values.

3.1.1 https://math.libretexts.org/@go/page/83924
I then create additional columns for the marginal functions.

Now we simply go back to values and see the values.

\Mcost(11)\amp = \cost(11) − \cost(10) = 85.1 − 80 = 5.1

\Mrev(11)\amp = \revenue(11) − \revenue(10) = 269.5 − 250 = 19.5

\Mprofit(11)\amp = \profit(11) − \profit(10) = 184.4 − 170 = 14.4

\amp

\Mcost(26)\amp = \cost(26) − \cost(25) = 185.6 − 177.5 = 8.1

\Mrev(26)\amp = \revenue(26) − \revenue(25) = 442 − 437.5 = 4.5

\Mprofit(26)\amp = \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.
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.3: Profit and Marginal Profit Together.

3.1.2 https://math.libretexts.org/@go/page/83924
Example 3.1.3Pro t and MP together

Figure 3.1.4. Video presentation of this example


The function \profit(q) = −q /20 + 100q − 1000 expresses the profit at my gadget factory. Plot both profit and marginal profit
2

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 ) is evaluated correctly. Since I suspect I will have to look at a
2

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 computation 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 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.5: Marginal Profit from Data.

3.1.3 https://math.libretexts.org/@go/page/83924
Example 3 1 4 MP from data

Figure 3.1.6. 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 \Pprofit(x). The obvious adjustment produces \Pprofit(x + 1). It is
then easy to compute the value of \Mprofit(x + 1).

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.

3.1.4 https://math.libretexts.org/@go/page/83924
When x = 80, the Marginal Profit turns negative. The maximum profit is $23,492.96, obtained by producing 80 widgets.

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.7: Rate of Change when Denominator is not 1.

Example3 1 5 Seasonal Diff quotient

Figure 3.1.8. Video presentation of this example


We have the following monthly sales data on gizmos.

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

3.1.5 https://math.libretexts.org/@go/page/83924
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\amp =
25 − 13

1298 − 1176 122


\amp = = ≈ 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.

An Excel Trick for Difference Quotients.

Example3 1 6 Excel trick for DIff quotient

Figure 3.1.9. 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 columns and the use of quick fill will
make our life easier.
Suppose my revenue function is rev(q) = −0.2 q
2
+ 20q − 5 and I want to compute marginal revenue. Then
rev(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 of forgetting to change one of the copies of q to q + 1.

One solution is to add an extra column for q +1 next to the column for q. Then the formula for rev(q + 1) is obtained by quick
filling form the formula for rev(q).

3.1.6 https://math.libretexts.org/@go/page/83924
This trick will be even more useful in the next section when we want to compute the values of rev(q), rev(q + 0.00), and
rev(q − 0.001).

class="

ExercisesExercises: Marginal Functions and Difference Quotients Problems

 Exercise 1:
If \revenue(q) = 5q, what is the marginal revenue from selling the 10th item?

Answer
The marginal revenue would be given by

\Mrev(10)\amp = \revenue(10) − \revenue(9)

\amp = 50 − 45 = 5.

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

 Exercise 2:

If \profit(q) = −100 + 5q − 0.01q 2


, what is the marginal profit from selling the 20th item?

 Exercise 3:

If \cost(q) = 100 + 7q, what is the marginal cost from selling the 30th item?

Answer
The marginal cost would be given by
\Mcost(30)\amp = \cost(30) − \cost(29)

\amp = 2200 − 2193 = 7

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

 Exercise 4:


If \revenue(q) = −500 + 7q − 0.01√q 3
, what is the marginal revenue from selling the 100th item?

 Exercise 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.
\(\Mcost(q+1)=\cost(q+1)-\cost(q)\)

Answer
\Mcost(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.

3.1.7 https://math.libretexts.org/@go/page/83924
 Exercise 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.)

For Exercise 3.1.7– 3.1.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.

 Exercise 7:

Let \cost(q) = 5000 + 23q.

Answer
a. Recall that \(\Mcost(q+1)=\cost(q+1)-\cost(q)\text{.}\)
The entries in the cells should be

(See part b for some of the values)

This page titled 3.1: Marginal Functions and Difference Quotients is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or
curated by Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit
history is available upon request.

3.1.8 https://math.libretexts.org/@go/page/83924
3.2: Numeric Derivatives and Limits
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 far, this process would give an instantaneous rate of change, or the derivative of the function at that
point.

 Definition : 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 lim x→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) = x 2
. We would like to find f ′
(1).

Example3 2 2 Understanding a numeri…


numeri…

Figure 3.2.3. Video presentation of this example


Solution
Solution. 1 Solution A
We start with our intuitive notion. We want to look at the graph of \(f(x)\text{,}\) zoomed in far enough that the graph looks like a
straight line. I set up a worksheet to look at the graph of \((x)=x^2\) near \(x_0=1\text{.}\) Since I want to be able to zoom in, I set

3.2.1 https://math.libretexts.org/@go/page/83925
up the graph so that it plots points that are multiples of \(\Delta x\) from \(x=x_0\text{.}\) I also want to plot the line connecting the
points \((x_0,f(x_0))\) and \((x_0,f(x_0+\Delta x))\) and notice that the slope of the secant line between them is
\[ \frac{f(x_0+\Delta x)-f(x_0 )}{\Delta x}\text{.} \nonumber \]
For this example \(x_0=1\text{.}\) If \(\Delta x=1\text{,}\) we can see that the function and the secant line are clearly distinct.

The worksheet is designed to make it easy to change the value of \(\Delta x\text{.}\)

As we can see, if we let \(\Delta x=1\text{,}\) 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 \(\Delta x=0.01\text{,}\) the slope is 2.01, and the graphs of the function and secant line seem to be the
same.

With some experimentation, taking both positive and negative values of \(\Delta x\text{,}\) we get the following table of values:

\(\Delta x\) slope \(\ \ \ \) \(\Delta x\) slope

1 3 \(\ \ \ \) -1 1

3.2.2 https://math.libretexts.org/@go/page/83925
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 \(\Delta x\) gets very small, the slope of the tangent line gets closer and closer to 2. Thus \(f'(1)=2\text{.}\)
Solution. 2 Solution B
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 \(\Delta x\text{.}\) We would like to create a worksheet that simply shows the values of the slope of the secant
line for values of \(\Delta x\) and takes the value that this approaches. We can set up a worksheet where each line takes \(\Delta x\)
from the previous line and divides by 10.

We get the same value whether we start \(\Delta x\) at 1 or -1. Once again, we find \(f'(1)=2\text{.}\)
Solution. 3 Solution C
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 \(\Delta 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 calculators when
they compute the derivative. They use a “balanced difference quotient” where we find the slope of the secant line between points \
(\Delta 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 \(\Delta x = 0.001\text{.}\)

3.2.3 https://math.libretexts.org/@go/page/83925
For our example this gives our familiar result that \(f'(1)=2\text{.}\)
We formalize this last approach.

 Definition : 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 approximation 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.

ExcelExamples3-2-4

Figure 3.2.5. Video presentation of the next two examples

 Example 3.2.6: A Function and its Derivative.

Compare the graph of f (x) = x − 2x + 1 and the graph of its derivative, using separate axes for the two graphs. What
2

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

3.2.4 https://math.libretexts.org/@go/page/83925
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 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.7: The Derivative of a More Complicated Function.

Compare the graph of f (x) = x (x − 36) and the graph of its derivative, using separate axes for the two graphs. What
3 2

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.

3.2.5 https://math.libretexts.org/@go/page/83925
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 function 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 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.8: Using Trendlines to get the Formula of a Derivative.

Example3 2 6 Finding a formula for a n…


n…

Figure 3.2.9. 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.

3.2.6 https://math.libretexts.org/@go/page/83925
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 R . The fact that R = 1, indicates the trendline we found exactly fits the data. In the workbook
2 2

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 using the term
\marginalf (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 marginal 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 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 understanding
The derivative of f (x), at x = x denoted as
0

f (x0 ), is the slope of the line obtained by zooming in on the graph at
(x , f (x )) until it looks like a straight line.
0 0

Formal definition
The derivative of f (x), denoted as f ′
(x), is defined as
f (x + Δx) − f (x)

f (x) = lim .
Δx→0 Δx

The calculator approximation


The derivative of f (x), can be approximated using the formula
f (x + .001) − f (x − 0.001)

f (x) ≈ .
.002

class="

Exercises: Numeric Derivatives and Limits


For each specified function and x-value, do the following:
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).

3.2.7 https://math.libretexts.org/@go/page/83925
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.

3.2.8 https://math.libretexts.org/@go/page/83925
 Exercise 1:

Use f (x) = x 2
+3 at x = 2.

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

This page titled 3.2: Numeric Derivatives and Limits is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by
Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is
available upon request.

3.2.9 https://math.libretexts.org/@go/page/83925
3.3: Local Linearity
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 seciton.

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

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

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

3.3.1 https://math.libretexts.org/@go/page/83926
Solution
We use the formula from above:
\[ \text{discrete linear profit}_a (x)=\profit(a)+\Mprofit(a+1)*(x-a)\text{.} \nonumber \]

Filling in the values from the problem yields:

discrete linear profit 10000(x)\amp = 487253 + 45 ∗ (x − 10000)

discrete linear profit 10000(10013)\amp = 487253 + 45 ∗ (13) = 487838.

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

 Example 3.3.2: Estimating Square Roots.

Example3 3 2 Local Linearity, square r…


r…

Figure 3.3.3. Video presentation of this example



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 derivative at 100. For the derivative we use the calculator approximation.

Thus the linear approximation is


\begin{align*} \linear f(x) \amp = f(100)+f'(100)(x-100)\\ \amp =10+(0.05)(x-100)\text{.} \end{align*}
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.

3.3.2 https://math.libretexts.org/@go/page/83926
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.

Example3-3-3 Linear approximation, r…


r…

Figure 3.3.5. Video presentation of this example


Use information about f (x) = 100/x near x 0 = 400 to estimate the reciprocals 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.

3.3.3 https://math.libretexts.org/@go/page/83926
Thus the linear approximation is
\begin{align*} \linear f(x) \amp = f(400)+f'(400)(x-400)\\ \amp =.25+(-0.000625)(x-400)\text{.} \end{align*}

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.

Example3 3 4 Local Linearity with Exp…


Exp…

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 r = 0 to estimate the exponential function for numbers near 0. Check the
0

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.

3.3.4 https://math.libretexts.org/@go/page/83926
Thus the linear approximation is
\begin{align*} \linear f(x) \amp = f(0)+f'(0)(r-0)\\ \amp = 1+(1)(r)\text{.} \end{align*}
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.

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, \(\Delta x\text{,}\) 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)\approx 1+r\) for \(0\le r\lt 0.15\text{.}\) 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.
class="

Exercises: Local Linearity


For Exercise 3.3.1– 3.3.5, for the given function and value for x 0:

a. Give the formula for the discrete linear approximation.


b. Evaluate the approximation at x .
1

 Exercise 1:

x0 = 10, f (10) = 50, mf (11) = 6, and x 1 = 15.

Answer
\begin{align*} f(x) \amp \approx f(10)+mf(11)*(x-10)\\ f(x) \amp \approx 50+6*(x-10)\text{.} \end{align*}

3.3.5 https://math.libretexts.org/@go/page/83926
Next we evaluate the linear approximation at 15:

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

 Exercise 2:

x0 = 15, \profit(15) = 50, \Mprofit(16) = 2, and x1 = 6.

 Exercise 3:

x0 = 20, f (19) = 191, f (20) = 200, f (21) = 210, and x 1 = 28.

Answer
\[ f(x)\approx f(20)+mf(21)*(x-20)\text{.} \nonumber \]

Note that we have to compute mf (21).


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

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

Next we evaluate the linear approximation at 28:

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

 Exercise 4:

x0 = 50, \revenue(49) = 1007, \revenue(50) = 1000, \revenue(51) = 994, and x 1 = 45.

 Exercise 5:

x0 = 100, cost(99) = 3740, cost(100) = 3743, cost(101) = 3754, and x


1 = 112.

Answer
\[ \cost(x)\approx \cost(100)+\Mcost(101)*(x-100)\text{.} \nonumber \]

Note that we have to compute \Mcost(101)


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

For Exercise 3.3.6– 3.3.10, for the given function and value for x 0:

a. Calculate the numeric approximation of the derivative at x . 0

b. Give the formula for the linear approximation at that point.


c. Evaluate the approximation at x .1

d. Evaluate the function at x and compute the accuracy of the approximation.


1

 Exercise 6:
f (x) = ln(x), x0 = 100, and x
1 = 105.

 Exercise 7:

3.3.6 https://math.libretexts.org/@go/page/83926

g(x) = √x , x0 = 81 and x 1 = 85.

Answer
a. \[ g(x)\approx g(81)+g'(81)*(x-81)\text{.} \nonumber \]

−−−−− −−−−−
g(81 + .001) − g(81 − .001) √81.001 − √80.999

g (81) ≈ = = .056.
0.002 0.002

This page titled 3.3: Local Linearity is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike May, S.J. &
Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon
request.

3.3.7 https://math.libretexts.org/@go/page/83926
3.4: Optimization
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.

 Example 3.4.1: Profit Function for Widgets.

Example3 4 1 Optimizing a Quadratic …

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
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\text{,}\) 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)\text{,}\) \((200, 35000)\) and \((500, -55000)\text{.}\) 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

3.4.1 https://math.libretexts.org/@go/page/83927
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\text{,}\) \
(q+.001\text{,}\) \(q-0.001\text{,}\) \(p(q)\text{,}\) \(p(q+.001)\text{,}\) \(p(q-0.001)\text{,}\) and \(p'(q)\text{.}\) 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.

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.

Example3 4 2 Optimizing a more4 co…


co…

Figure 3.4.4. Video presentation of this example


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

\profit(\quantity) = (10\quantity − 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.

3.4.2 https://math.libretexts.org/@go/page/83927
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. (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. (Similarly, 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 derivative. 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 maximum.

 Example 3.4.5: Gizmo Profit.

3.4.3 https://math.libretexts.org/@go/page/83927
Example3 4 3 Optimization Where ma…
ma…

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:
2
\profit(\quantity) = 4 \quantity − 1300\quantity + 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.

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 a functions that has been given to us as a
function of one variable. Sometimes we need to do a bit of work to get the function in that format.

 Example 3.4.7: Minimizing Material Costs.

3.4.4 https://math.libretexts.org/@go/page/83927
Example3 4 4 Minimizing Material Cos…
Cos…

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.
\begin{align*} \text{volume} \amp = \pi \text{radius}^2*\text{height}\\ \text{area} \amp =2 \pi \text{radius}^2+2
\pi*\text{radius}*\text{height}\text{.} \end{align*}
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 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.
\begin{align*} \text{height} \amp =1/( \pi \text{radius}^2)\\ \text{area} \amp =2 \pi \text{radius}^2+\frac{2}{\text{radius}}
\text{.} \end{align*}
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.

3.4.5 https://math.libretexts.org/@go/page/83927
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.

Example3 4 5 Optimizing function fro…


fro…

Figure 3.4.10. Video presentation of this example


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

3.4.6 https://math.libretexts.org/@go/page/83927
\[ \profit(q)=-1.002 q^2+477.22 q=6720.9\text{.} \nonumber \]

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.

Example3 4 6 Minimizing costs

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 widget press costs $10,000 to buy, and the operating expenses are $500 a year, and
the total repair costs are 300t over the first t years. What is the optimal length of time to use a widget press before replacing it?
2

Solution
My annual cost equation is total cost divided by \(t\text{.}\) This annual cost is:
\[ \AnnualCost(t)=10000/t+500+300t\text{.} \nonumber \]

3.4.7 https://math.libretexts.org/@go/page/83927
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.
class="

Exercises: Optimization
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

 Exercise 1:

f (x) = −2 x
2
+ 17x + 23 on the interval 0 ≤ x ≤ 50.

Answer
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)\text{,}\)and \(f'(x)\)
Once you enter \(f(x)\text{,}\) doing a right quick fill easily finds \(f(x+.001)\) and \(f(x-.001)\text{,}\) and then \(f'(x)\)
is easy to compute.
Once you graph \(f\) and \(f'\text{,}\) it is usually a good idea to graph the derivative using the secondary axis: double
click on the derivative 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.

This page titled 3.4: Optimization is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike May, S.J. &
Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon
request.

3.4.8 https://math.libretexts.org/@go/page/83927
3.5: An Introduction to Solver
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.

Example3 5 1 Interesting points on a p…


p…

Figure 3.5.2. Video presentation of this example


Let f (x) = 9x − x 2
+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\text{.}\) We also see that the x-intercepts are close to \
(x=-0.5\) and \(x=9.5\text{.}\)
Next, we want to make sure that Solver is installed. It should be on the Analysis section of the Data tab.

3.5.1 https://math.libretexts.org/@go/page/83928
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)\text{.}\) I chose the one that has \(f(x)\) closest to the desired result.)

Solver finds a solution with \(x=-0.72015\text{.}\) 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\text{.}\)
However, the reason we introduce Solver, is that 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\text{.}\)

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\le x\le 15\text{.}\) 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 \(\ge 0\text{.}\)

3.5.2 https://math.libretexts.org/@go/page/83928
In a similar manner, we add the constraint that A7 15 and ask solver for a minimum.

Since we started the search for the minimum at \(x=0.5\text{,}\) Solver finds the minimum at \(x=0\text{.}\) 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\text{.}\)
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. 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.

 Example 3.5.3: A Deceptive Graph.

3.5.3 https://math.libretexts.org/@go/page/83928
Example3 5 2 Solver with deceptive gr…
gr…

Figure 3.5.4. Video presentation of this example


Use solver to gather information, on the interval 0 ≤ x ≤ 15, on the graph of f (x) = (x 3 2
− 4x + 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\text{,}\) are both local minimums.

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.

3.5.4 https://math.libretexts.org/@go/page/83928
In that case, we miss the local maximum at 0.29 and confuse the left endpoint 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.3 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.5: Deceiving Solver.

Example3 5 3 Solver and jump discont…


discont…

Figure 3.5.6. Video presentation of this example


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

−5x − 3\ampx < 0


f (x) = { .
2
4(x − 1 ) \ampx > 0

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

3.5.5 https://math.libretexts.org/@go/page/83928
It is pretty easy to see that the function reaches a maximum of 7 at \(x=-2\text{,}\) and has a root at \(x=-0.6\text{.}\) 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 function not only fails to be differentiable at \(x=0\text{,}\) 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 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.7: Use Solver to find a Best Fitting Line to a Data Set.

3.5.6 https://math.libretexts.org/@go/page/83928
Example3 5 4 - Best t line

Figure 3.5.8. 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 \
(\prediction(x)=A x+B\text{,}\) 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.

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.
class="

3.5.7 https://math.libretexts.org/@go/page/83928
Exercises: An Introduction to Solver
In Exercise 3.5.1– 3.5.7you 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 include the endpoints.).
d. Find the absolute maximum and minimum of the function on the interval.

 Exercise 1:

f (x) = x
2
− 10x + 9, on the interval 0 ≤ x ≤ 10.

Answer

a.

This page titled 3.5: An Introduction to Solver is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike
May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is
available upon request.

3.5.8 https://math.libretexts.org/@go/page/83928
CHAPTER OVERVIEW

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.2: Derivative Rules for Combinations of Functions
4.3: The Chain Rule
4.4: Differentiation Using Computer Algebra

This page titled 4: Symbolic Differentiation is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike May,
S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available
upon request.

1
4.1: Elementary Derivatives
We start by recalling the formal definition, with a slight adjustment in notation to match the standard conventions:

 Definition .
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 d

dx
f (x) or dy/dx.
dy
The derivative at x = x is denoted as f
0

(x0 ) or dx
|x=x .
0

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.
Derivatives of monomials
Our first rule for symbolic differentiation gives the derivative of a monomial

 Claim . Monomial Rule.

If f (x) = ax n
, then f ′
(x) = n ∗ a ∗ x
n−1
.

This rule is a generalization of the rule we found in section 3.2 using trendlines. 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 Derivatives of Monomials.

Using our first rule of symbolic differentiation, find the derivatives of the following functions:
1. f (x) = 3x
2. g(x) = 5x 2

3. h(x) = 7x 25

4. j(x) = 6√− x

4
5. k(x) = 3
x

Solution
Using our rule:
d d
1. f (x) =
1
(3 x ) = 1 ∗ 3 x
0
= 3.
dx dx
d d
2. g(x) =
2
(5 x ) = 2 ∗ 5 x
1
= 10x.
dx dx
d d
3. h(x) = (7 x
25 2
) = 25 ∗ 7 x 4 = 175 x
24
.
dx dx
d d − d
4. j(x) = (6 √x ) = (6 x
1/2
) = 1/2 ∗ 6 x
−1/2
= 3x
−1/2

dx dx dx
d d 4
5. k(x) = = d/dx(4 x
(−3)
) = −3 ∗ 4 x
−4
= −12 x
−4

dx dx x3

4.1.1 https://math.libretexts.org/@go/page/83931
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 definition of derivative, if f (x) = ax + b, then show f ′


(x) = a.

Solution
Using our definition:
f (x + h) − f (x) (a(x + h) + b) − (ax + b)

f (x) = li mh→0 = li mh→0
h h

(ax + ah + b) − (ax + b)
= limh→0
h

ah
= li mh→0 = li mh→0 a = a.
h

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) = ax 2


, then show f ′
(x) = 2ax.

Solution
Using our definition:
2 2
f (x + h) − f (x) (a(x + h ) ) − (ax )

f (x) = li mh→0 = li mh→0
h h
2 2 2
(ax + 2ahx + ah ) − (ax )
= limh→0
h
2
2ahx + ah
= li mh→0 = li mh→0 (2ax + h) = 2ax.
h

The last step is justified by noting that as h gets very small the value of a h also gets very small.
We can modify this last example to find a formula for the derivative of f (x) = x for any positive integer n. We recall that
n

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

We are ready to generalize.

 Example 4.1.6: Derivative of Power Function.

From the formal definition of derivative, if f (x) = ax n


, then show f ′
(x) = nax
(n−1)
.

Solution
Using our definition:

4.1.2 https://math.libretexts.org/@go/page/83931
n n
f (x + h) − f (x) (a(x + h ) ) − (ax )

f (x) = li mh→0 = li mh→0
h h
n n−1 2 n
(a(x + nx h + terms involving h ) − (ax )
= limh→0
h
n−1 2
(a(nx h + terms involving h )
= limh→0
h
n−1 n−1
= li mh→0 (a(nx + terms involving h) = anx .

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.
Derivatives of Exponential Functions

 Claim . Exponential Rule.

If f (x) = a ∗ e x
, then f ′ x
(x) = a ∗ e .

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 . General Exponential Rule.

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

 Example 4.1.9: General Exponential Rule.

Using the exponential rules of symbolic differentiation, find the derivatives of the following functions:
1. f (x) = 2e x

2. g(x) = πe x

3. h(x) = 7 ∗ 2 x

4. j(x) = 5 ∗ (1.06) x

5. k(x) = 9 ∗ (0.97) x

Solution
Using our rule:
d d
1. f (x) =
x
(2 e ) = 2 e .
x

dx dx
d d
2. g(x) =
x
(π e ) = π e .
x

dx dx
d d
3. h(x) =
x
(7 ∗ 2 ) = 7 ∗ ln(2) ∗ 2
x

dx dx
d d
4. j(x) =
x
(5 ∗ (1.06 ) ) = 5 ∗ ln(1.06) ∗ (1.06 )
x

dx dx
d d
5. k(x) =
x
(9 ∗ (0.97 ) ) = 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) = e x


, then f ′ x
(x) = e .

Solution
Using our definition:

4.1.3 https://math.libretexts.org/@go/page/83931
(x+h) x
f (x + h) − f (x) e −e

f (x) = li mh→0 = li mh→0
h h
x h h
e (e − 1) e −1
x
= li mh→0 =e (li mh→0 )
h h

.
h

It suffices to show that (li m h→0


e −1

h
) = 1. This can be done by starting with 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.

It seems clear that (li m h→0


e −1

h
) = 1.

 Example Justification of Second Exponential Rule.

From the formal definition of derivative, if f (x) = a x


, then show f ′
(x) = ln(a) ∗ a .
x

Solution
We start by mimicking the last problem. At a key step we will recall that a
x
=e
x ln(a)
. We also want to note that
h ln( a ) h
e −1 e −1
(li mh ln(a)→0 ) = (li mh→0 ) = 1.
h ln(a) h

Using our definition:


(x+h) x
f (x + h) − f (x) a −a

f (x) = li mh→0 = li mh→0
h h
x h h
a (a − 1) a −1
x
= li mh→0 = (a ) (li mh→0 )
h h

h ln(a)
x
e −1
= (a ) (li mh→0 (ln(a)) )
h ln(a)

h ln(a)
e −1
x
= (a ln(a)) (li mh ln(a)→0 )
h ln(a)

h
x
e −1 x
= (a ln(a)) (li mh→0 ) =a ln(a)
h

.
We are most likely to see exponential functions in the context of continuously 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 to years,
Solution

4.1.4 https://math.libretexts.org/@go/page/83931
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.

Derivatives of Logarithmic Functions


For a last rule for this section we want to find the derivative of f (x) = a ln(x)

 Claim . Logarithmic Rule.

If f (x) = a ln(x), then f ′


(x) = a/x.

 Example 4.1.14: Derivatives of Logarithmic Functions.

Using the logarithmic rule of symbolic differentiation, find the derivatives of the following functions:
a. f (x) = 2 ln(x)
b. g(x) = 3 ln(x ) 2

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) =
2
(3 ln(x )) = (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 =e
x
and y = ln(x) are inverse functions. That means their graphs can be obtained by reflecting
across the line y = x.

The slope of the tangent line at (a, e ) is e by the exponential rule. Symmetry tells us the slope of the line tangent to y = ln(x) at
a a

(e , a) is 1 / e . Letting b = e , the slope of the line tangent to y = ln(x) at (b, ln(b)) is 1 / b. Thus
a a a d
(ln(x)) = 1/x.
dx

4.1.5 https://math.libretexts.org/@go/page/83931
 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 = .1. When I use Excel to compute (f (10.001) − f (9.999))/.002I get 0.1000000003.

Exercises: Elementary Derivatives Problems


class="
For exercises 1-12, use the symbolic rules to find the derivative of the function.

 Exercise 1:
5
f (x) = x .

Answer
4
f (x) = 5x

 Exercise 2:
3
g(x) = 7/ x .

 Exercise 3:
−−−

7
h(x) = 3 √(x ).

Answer
Rewrite \(h(x)=3x^{7/2}\text{.}\)
\[ h'(x)=\frac{21}{2}(x^{5/2}) \nonumber \]

 Exercise 4:
π
f (x) = 2 x .

 Exercise 5:
k(x) = 17.

Answer
\[ k'(x)=0 \nonumber \]

 Exercise 6:
−5
m(x) = 9 x .

 Exercise 7:
2 −
f (x) = x √x .

Answer

4.1.6 https://math.libretexts.org/@go/page/83931
Rewrite \(f(x)=x^{5/2}\text{.}\)
\[ f'(x)=\frac{5}{2}x^{3/2} \text{.} \nonumber \]

 Exercise 8:

g(x) = ln(x).

 Exercise 9:
x
h(x) = e .

Answer
\[ h'(x)=e^x \nonumber \]

 Exercise 10:
x
k(x) = 5 .

 Exercise 11:
x
m(x) = 1.03 .

Answer
\[ m'(x)=1.03^x\ln(1.03) \nonumber \]

 Exercise 12:
x
n(x) = (0.9 ) .

For exercises 13-18, use the symbolic rules to find the derivative at the specified point. Use Excel to find the numeric
approximation using the “calculator formula.” To how many digits do the two methods agree?

 Exercise 13:
2
f (x) = x . Evaluate at x = 2.

Answer
\(f'(x)=2x\text{,}\) so \(f'(2)=4\text{.}\) The numeric derivative agrees to 12 decimal digits.

 Exercise 14:
g(x) = 5x. Evaluate at x = 7.

 Exercise 15:
h(x) = 1.06 .
x
Evaluate at x = 10.

Answer
\(h'(x)=\ln(1.06)(1.06)^x\text{.}\) So \(h'(10)=\ln(1.06)(1.06)^{10}\ (\approx 0.104)\text{.}\) The numeric derivative agrees
to 10 decimal digits.

4.1.7 https://math.libretexts.org/@go/page/83931
 Exercise 16:
x
f (x) = e . Evaluate at x = 5.

 Exercise 17:

k(x) = ln(x). Evaluate at x = 100.

Answer
\(k'(x)=1/x\text{.}\) So \(k'(100)=0.01\text{.}\) The numeric derivative agrees to 13 decimal digits.

 Exercise 18:

m(x) = 3/x. Evaluate at x = π.

Find tangent lines to the given curves at the indicated points.

 Exercise 19:
f (x) = 3 x .
4
At x = 1.

Answer
We need a point: if \(x =1\) then \(y=f(1)=3\text{.}\)
We need a slope: \(f'(x)=12 x^3\text{.}\) Hence \(m=f'(1)=12\text{.}\)
Find the line: \(y-y_0=m(x-x_0 )\text{,}\) so \(y-3=12(x-1)\text{,}\)
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\text{.}\) We
know \(m = 12\text{,}\) and we can solve for \(b\) by letting \(x = 1\) and \(y = 3\text{.}\)

 Exercise 20:

g(x) = ax. At x = b.

 Exercise 21:
h(x) = 1.05 .
x
At x = 20.

Answer
We need a point: if \(x =20\) then \(y=h(20)=(1.05)^20\approx 2.6533\text{.}\)
We need a slope: \(h'(x)=\ln(1.05) (1.05)^x\text{.}\)
Hence \(m=\ln(1.05) (1.05)^{20}=0.12945\)
Find the line: \(y-y_0=m(x-x_0 )\text{,}\) so \(y-2.6533=0.12945(x-20)\text{.}\)

 Exercise 22:
x
f (x) = e . At x = 1.

4.1.8 https://math.libretexts.org/@go/page/83931
This page titled 4.1: Elementary Derivatives is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike
May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is
available upon request.

4.1.9 https://math.libretexts.org/@go/page/83931
4.2: Derivative Rules for Combinations of Functions
In the last section we learned rules to symbolically differentiate some elementary functions. To summarize, we have established 4
rules.

Elementary Formulas:
If f(x) = x n
, then f ′
(x) = n ∗ x
(n−1)
, for any real number n.
If f (x) = e x
, then f ′
(x) = e .
x

If f (x) = a x
, then f ′
(x) = a
x
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 function 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) = 5x + 3x + 1, or g(x) = (x + 2)1.03 , or 3 2 x

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.1Derivatives of scalar products


We start by differentiating a constant times a function.

 Claim . 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) = 2e x

b. g(x) = 500(1.05) x

c. h(x) = ln(x ) 7

Solution
Using our rule
a. f (x) = 2[e ] = 2e .
′ x ′ x

b. g (x) = 500[(1.05) ] = 500(1.05) ln(1.05).


′ x ′ x

c. h (x) = [ln(x )] = [7 ln(x)] = 7[ln(x)] = 7/x.


′ 7 ′ ′ ′

Derivatives of sums and differences


Next we want to look at the sum or difference of two functions.

 Claim . 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 Functions.


Find the derivatives of the following functions:
1. f (x) = 5x 3
+ 3x
2
−7

4.2.1 https://math.libretexts.org/@go/page/83932
2. g(x) = 100e − 1000(1.03)
x x

3. h(x) = 5√− −
x + 2/ √x − 7 x
−3

Solution
Using our rule
1. f ′ 3 ′ 2 ′
(x) = [5 x ] + [3 x ] − [7 ] = 15 x
′ 2
+ 6x − 0.

2. g ′ x ′
(x) = 100[ e ] − 1000(1.03 ) ] = 100 e
x ′ x
− 1000(1.03 )
x
ln(1.03).

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

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

5 1 21
= − + .
− −−
2 √x √x3 x4

Theory and justification


The basic argument for all of our rules starts with local linearity. Recall that if f (x) is differentiable at x , then in a region around 0

x , we can approximate f (x) by a linear function, f (x) ≈ f (x )(x − x ) + f (x ). To find the derivative of a scalar product,

0 0 0 0

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. Following the general method we look at how we multiply a
constant times the linear approximation.
′ ′
c ∗ (f (x0 )(x − x0 ) + f (x0 )) = (c f (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 approximations.
′ ′
(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.

4.2.2Derivatives of products
We turn our attention to the product of two functions.

 Claim . 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) = x 2
. Find the derivative of f (x) ∗ g(x).
Solution
Note that f (x) ∗ g(x) = x . Using our rule for monomials (f (x) ∗ g(x))
3 ′ 3
= (x ) = 3 x .
′ 2
Using the same rule we see

f (x) = 1, and g ′
(x) = 2x. We can now evaluate using the product rule:

4.2.2 https://math.libretexts.org/@go/page/83932
′ ′ ′
(f (x) ∗ g(x)) \amp = f (x) ∗ g(x) + f (x) ∗ g (x)

2 2
\amp = (1) ∗ (x ) + (x) ∗ (2x) = 3 x .

Both methods give the same answer. Note that the product of the derivatives 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) = (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.
2
(ax + c)(bx + d) = ab x + (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 ).

4.2.3Derivatives of quotients
Finally, we turn our attention to the quotient of two functions.

 Claim . Quotient Rule.


′ ′
f (x) f (x)g(x)−f (x) g (x)
The derivative of g(x)
is 2
In other words,
(g(x))

′ ′ ′
f (x) f (x) ∗ g(x) − f (x) ∗ g (x)
[ ] = .
2
g(x) (g(x))

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.

Let f (x) = x and g(x) = x. Find the derivative of f (x)/g(x).


2

Solution
Note that f (x)/g(x) = x. Using our rule for monomials (f (x) ∗ g(x)) ′ ′
= (x ) = 1. Using the same rule we see f ′
(x) = 2x,

and g (x) = 1. We can now evaluate using the quotient rule:


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

(f (x)/g(x)) \amp =
2
(g(x))

2 2
(2x) ∗ (x) − (x ) ∗ (1) x
\amp = = = 1.
2 2
x x

Both methods give the same answer. Note that the quotient of the derivatives is 2x,

4.2.3 https://math.libretexts.org/@go/page/83932
 Example 4.2.10: General Derivatives of Quotients.
Find the derivatives of the following functions:
a. f (x) = ((6x + 100))/(x
2 3
+ x).

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


x

Solution

a. ′
6x
2
+ 100

(12x)(x
3
+ 3) − (6 x
2 2
+ 100)(3 x + 1)
f (x) = ( ) =
3 3 2
x +3 (x + 2)

This page titled 4.2: Derivative Rules for Combinations of Functions is shared under a CC BY-NC-SA 4.0 license and was authored, remixed,
and/or curated by Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a
detailed edit history is available upon request.

4.2.4 https://math.libretexts.org/@go/page/83932
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 ∗ x n
, then f (x) = a ∗ n ∗ x n−1
, for any nonzero number n.
If f (x) = e x
, then f ′
(x) = e .
x

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

If f (x) = ln(x), then f ′


(x) = 1/x

Arithmetic derivative rules:


Scalar multiple rule: The derivative of c ∗ f (x) is c ∗ f ′
(x).

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

′ ′
f (x)g(x)−f (x) g (x)
Quotient Rule: The derivative of f (x)/g(x) is 2
.
(g(x))

The other way we traditionally build functions from simpler functions is by use of composition. We want to be able to take
−−−− −−−− −−−
derivatives of functions like (2x + 3) , √(x ) + 5x + 7 , and 1.06 . 52 2 .2x

 Claim . 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. 3
f (p) = (p + 2p + 5 ) .
7

−−−−−
b. g(q) = √q 2
+6 .

c. h(x) = e
2x+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) = p + 2p + 5 and g(p) = p . We use the rules from the previous section
3 7

to compute h (p) = 3p + 2 and g (p) = 7p . Composing we get g (h(p)) = 7(p + 2p + 5) . Thus


′ 2 ′ 6 ′ 3 6

′ ′ ′ 3 6 2
f (p) = g (h(p))h (p) = 7(p + 2p + 5 ) (3 p + 2).

This page titled 4.3: The Chain Rule is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike May, S.J. &
Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon
request.

4.3.1 https://math.libretexts.org/@go/page/83933
4.4: Differentiation Using Computer Algebra
As we noted in chapter 1, in 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. However, we will also
look at using free web tools, particularly as a means of doing symbolic manipulation. Differentiation is one of those operations 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. This corresponds to 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.com.

 Example 4.4.1: A Simple Derivative with Alpha.


: Use Wolfram|Alpha to find the derivative of x 3
+ 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. We can ask the question in plain English. In our case we would like to find the
derivative of x^3+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
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^+5x+7)
(x^3+5x+7)'
For all of these, the website provides the same answer.

4.4.1 https://math.libretexts.org/@go/page/83934
Note that the response tells us the question that Wolfram|Alpha is answering. 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.

Wolfram|Alpha understands the convention that the variable for math problems 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 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

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:
2
cost = 2000 + 10 ∗ quantity + .001 ∗ quantity

4.4.2 https://math.libretexts.org/@go/page/83934
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 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.

 Example 4.4.4: Exploring a Business Example.

The cost and demand price functions of widgets are given by:
2
cost = 2000 + 10 ∗ quantity + .001 ∗ quantity

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:
2
p = r − c = 100q/(1 + .01q) − (2000 + 10q + .001 q )

When looking for a maximum, we always start by looking at a graph of the function in question.

4.4.3 https://math.libretexts.org/@go/page/83934
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)

We need to do a bit of interpretation since Wolfram|Alpha is using numerical 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 Mathematica®, so it should stay
available for the foreseeable future. Another useful source are the solvers from Symbolab https://www.symbolab.com/solver.
Symbolab has a collection of solvers for the topics in this course.

4.4.4 https://math.libretexts.org/@go/page/83934
It also has a section that lets you do drill and practice with the techniques we have learned. Like WolframAlpha, it gives the option
of step-by-step solutions. 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/ 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.

4.4.5 https://math.libretexts.org/@go/page/83934
You may find other websites for doing derivatives as well.
class="

Exercises: Differentiation Using Computer Algebra Problems


For 1-12, find the derivative of the given function

 Exercise 1:
f (x) = x ln(x)

Answer

4.4.6 https://math.libretexts.org/@go/page/83934
So f ′
(x) = ln(x) + 1.

 Exercise 2:
.07t 2
g(t) = e (−t + 3t + 5)

 Exercise 3:
2 −0.06t
h(t) = t e

Answer

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:
′ −0.06t 2
h (t) = e (2t − 0.06t)

It’s a nice compact answer that avoids decimal approximations.

 Exercise 4:
37
k(x) = (2x + 5)

 Exercise 5:
2
m(x) = ln(ln(ln(x + 3)))

Answer

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

4.4.7 https://math.libretexts.org/@go/page/83934

2x
m (x) =
(x2 + 3)ln(x2 + 3)ln(ln(x2 + 3))

Note that Wolfram allows us to copy the text. Hoover 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.

 Exercise 6:
x
e
n(x) = 2
ln( x +3)

 Exercise 7:
2
quantity quantity
price = 10 − −
100 10000

Answer
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\text{.}\) This gives the following derivative:

This page titled 4.4: Differentiation Using Computer Algebra is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or
curated by Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit
history is available upon request.

4.4.8 https://math.libretexts.org/@go/page/83934
CHAPTER OVERVIEW

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
5.2: Related Rates
5.3: Elasticity

This page titled 5: Differentiation Techniques and Applications is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or
curated by Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit
history is available upon request.

1
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. The most familiar
example is the equation for a circle of radius 5,
2 2
x +y = 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 x 2
+y
2
= 25 at (4, 3).
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 . We then take the square root to produce 2 functions.
2

2 2
y = 25 − x .

− −−−− −
2
f1 (x) = √ 25 − x .

− −−−− −
2
f2 (x) = −√ 25 − x .

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.
′ 2 −1/2
f (x) = 1/2(25 − x ) (−2x).
1

′ 2 −1/2
f (4) = 1/2(25 − 4 ) (−4) = −4/3.
1

Thus the tangent line, in point-slope form, is:


4
y =3− (x − 4).
3

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 x, the derivative of x with respect to x, is simply 1.


d

dx

d
2 2
(x +y = 25).
dx

d d d
2 2
(x ) + (y ) = (25).
dx dx dx

d d
2x (x) + 2y (y) = 0.
dx dx


2x + 2y y = 0.

We then solve for y and substitute our point (4, 3) in for (x, y).


2 x
y =− =− .
2y y

5.1.1 https://math.libretexts.org/@go/page/83938
When we substitute our point (4, 3) in for (x, y) we get the same value, y

=−
4

3
. 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
2
10p + 2pq + q = 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 2
(10p + 2pq + q = 1000)
d q

d p d p
10 +2 ∗ ∗ q + 2p + 2q = 0
d q d q

d p
(10 + 2q) = −2 ∗ (p + q)
d q

d p −2 ∗ (p + q)
=
d q (10 + 2q)

Since quantity is in thousands of unity, if we are selling 20,000 widgets, quantity : q = 20 and price : p = 14.64.

Substituting those values into the formula for the derivative of price with respect to quantity, we see
d price −2(14.64 + 20)
= = −1.386.
d quantity (10 + 2 ∗ 20)

We increase sales by 1000 by dropping price by $1.386.

For the first two examples, the relation was quadratic, so it was straightforward 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:

The quantity (q) and demand price (p) for gizmos satisfy the relation
1.5
5p + 3 ∗ (pq ) + 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
1
(5 ∗ p + 3 ∗ (p ∗ q ) .5 + 2 ∗ q = 2000)
d q

5.1.2 https://math.libretexts.org/@go/page/83938
d p .5 1.5 1.5 .5
5 + 3 ∗ (1.5 ∗ p ∗ (dp)/(dq) ∗ q +p ∗ 1.5 ∗ q )+2 = 0
d q

d p
.5 1.5 1.5 .5
∗ (5 + 4.5 ∗ p ∗q ) = −(2 + 4.5 ∗ p ∗q )
d q

1.5 .5
d p (2 + 4.5 ∗ p ∗q )
=−
.5 1.5
d q (5 + 4.5 ∗ p ∗q )

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, respectively. In the classical model α + β = 1.
This can be understood as a relation involving capital and labor. 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.1.4: Differentiation of Cobb-Douglas.

Example 4: A widget manufacturer has a production function given by


.75 .25
Y = 50 L K .

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
.75 .25
(Y = 50 L K )
d K

d L
−0.25 .25 .75 −0.75
0 = 50 ∗ (0.75 ∗ L ∗ ∗K +L ∗ .25 ∗ K )
d K

d L
−0.25 .25 .75 −0.75
∗ (0.75 ∗ L ∗K ) = −(L ∗ .25 ∗ K )
d K

d L .75 −0.75 −0.25 .25


∗ = −(L ∗ .25 ∗ K )/((0.75 ∗ L ∗K )) = −L/3K
d K

Substituting in our values for L and K we see that Y = 50 ∗ 81 16 = 2700 and (dL)/(dK) = −81/48 ≈ −1.6875. This
.75 .25

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.

5.1.3 https://math.libretexts.org/@go/page/83938
The first option we are given is a widget interface for WolframAlpha. It easily lets us do the first example in this section.

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.
class="

5.1.4 https://math.libretexts.org/@go/page/83938
Exercises: Implicit Differentiation Problems
For the following equations find the specified derivative.

 Exercise 1:
dy
2x + 3y = 23. Find dx
.

Answer
The best method is to notice this is a line with slope \(\frac{-2}{3}\text{.}\) Plunging ahead without noticing that:
\[ \frac{d}{dx} (2x+3y )= \frac{d}{dx} 23 \nonumber \]
\[ \text{Implies that }2+ \frac{dy}{dx} =0 \nonumber \]
Solve for \(\frac{dy}{dx}\text{:}\)
\[ \frac{dy}{dx} =\frac{-2}{3} \nonumber \]

 Exercise 2:
dy
7x + 9y = 23. Find dx
. (You can use two different methods.)

 Exercise 3:
dy
x
2
+ 3xy + 5 y
2
= 23. Find dx
.

Answer
\[ \frac{d}{dx} (x^2+3xy+5y^2 )= \frac{d}{dx} 23 \nonumber \]
\[ \text{Implies that }2x+3 \frac{d}{dx} (xy)+5 \frac{d}{dx} y^2=0 \nonumber \]
For the \(\frac{d}{dx} (xy)\) term we need to use the product rule and for \(\frac{d}{dx} y^2\) we need the chain rule. We
then get
\[ 2x+3[(1)y+x\frac{dy}{dx}]+5 (2y)\frac{dy}{dx} =0 \nonumber \]
Solve for \(\frac{dy}{dx}\text{:}\)
\[ 2x+3y+3x \frac{dy}{dx}+10y \frac{dy}{dx} =0 \nonumber \]
\[ \text{Hence }(3x+10y) \frac{dy}{dx} =-(2x+3y) \nonumber \]
\[ \text{And }\frac{dy}{dx} =-((2x+3y))/((3x+10y) ) \nonumber \]

 Exercise 4:
dy
(x
3
+x
2
+ 1)(y
3
+ 2y + 3) = 5. Find dx
.

 Exercise 5:
d price
75 ∗ price + (quantity )/100 = 2000.
2
Find ( d quantity
).

Answer
Some may find this easier with shorter variable labels: \(75P+Q^2/100=2000\text{.}\) Find \(\frac{dP}{dQ}\text{.}\)
\[ \frac{d}{dQ} [75P+\frac{Q^2}{100}]=\frac{d}{dQ} 2000 \nonumber \]
\[ 75 \frac{dP}{dQ}+\frac{Q}{50}=0 \nonumber \]

5.1.5 https://math.libretexts.org/@go/page/83938
Hence \(\frac{dP}{dQ}=- \frac{Q}{50*75}= \frac{-Q}{3750}\)
So we have that \(\frac{dPrice}{dQuantity}/= \frac{-Quantity}{3750}\text{.}\)
So if we were to increase the Quantity by 1 (\(d\ Quantity = 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.

 Exercise 6:
d price
50 ∗ price + 5 ∗ price ∗ quantity + (quantity )/10 = 5000.
2
Find d quantity
.

 Exercise 7:
−−−−−−− d price
40 ∗ price + 7 ∗ price ∗ quantity + √quantity = 2000. Find d quantity
. w

Answer
Rewrite as: \(40p+7pq+\sqrt{q}=2000\text{.}\) Find \(\frac{d\ p}{d\ q}\text{.}\)
We take the derivative with respect to q of both sides. In other words we apply \(\frac{d}{d\ q}\) to both sides.
\[ \frac{d}{d\ q} [40p+7pq+q^{0.5} ]=\frac{d}{d\ q} 2000 \nonumber \]
\[ 40 \frac{d\ p}{d\ q}+7[dp/dq q+p]+0.5 q^{-0.5}=0 \nonumber \]
\[ (40+7q)\frac{d\ p}{d\ q}+7p+0.5 q^{-0.5}=0 \nonumber \]
\[ \frac{d\ p}{d\ q}= \frac{-7p-0.5 q^{-0.5}}{40+7q} \nonumber \]

 Exercise 8:
d price
50 ∗ pric e
2
+ 5 ∗ price ∗ quantity = 3000. Find d quantity
.

 Exercise 9:

1000 = 5 L
0.6
K
0.4
. Find dK

dL
.

Answer
Take the derivative with respect to \(L\) to both sides:
\[ \frac{d}{dL} 1000=5 \frac{d}{dL} [L^{0.6} K^{0.4} ] \nonumber \]
\[ 0=5[\frac{d}{dL}(L)^{0.6})K^{0.4}+L^{0.6} \frac{d}{dL}(K^{0.4})] \qquad \text{(product rule)} \nonumber \]
\[ 0=5[0.6 L^{-0.4} K^{0.4}+L^{0.6} 0.4K^{-0.6} \frac{dK}{dL}] \nonumber \]
Divide both sides by 5 and solve for \(\frac{dK}{dL}\text{.}\)
\[ \frac{dK}{dL}=- \frac{0.6 L^{-0.4} K^{0.4}}{L^{0.6} 0.4K^{-0.6}}= \frac{-3K}{2L}. \nonumber \]

 Exercise 10:

2000 = 7 L
.3
K
.7
. Find dK

dL
.

 Exercise 11:

3000 = 2 L
.25
K
.75
. Find dL

dK
.

Answer

5.1.6 https://math.libretexts.org/@go/page/83938
\[ \frac{d}{dK} 3000=2 \frac{d}{dK} [L^{0.25} K^{0.75} ] \nonumber \]
\[ 0=2[\frac{d}{dK}( L^{0.25}) K^{0.75}+L^{0.25} \frac{d}{dK}( K^{0.75} )] \qquad\text{(product rule)} \nonumber \]
\[ 0=2[0.25L^{-0.75}\frac{dL}{dK} K^{0.75}+L^{0.25} 0.75K^{-0.25} ] \nonumber \]
\[ \frac{dL}{dK}=-\frac{L^{0.25} 0.75K^{-0.25}}{0.25L^{-0.75} K^{0.75}} =-3 \frac{L}{K}. \nonumber \]

 Exercise 12:

7000 = 11L .8
K
.2
. Find dL

dK
.

 Exercise 13:

The production function for a widget factory is 1000 = 15L 0.7


K
0.3
. Find dK

dL
and dL

dK
. Interpret what they mean.

Answer
Part 1 Find \(\frac{dK}{dL}\)
\[ \frac{d}{dL} 1000=15\frac{d}{dL}[L^{0.7} K^{0.3}] \nonumber \]
\[ 0=15[\frac{d}{dL} (L^{0.7} )K^{0.3}+L^{0.7} \frac{d}{dL} (K^{0.3})] \nonumber \]
\[ 0=[0.7 L^{-0.3} K^{0.3}+L^{0.7} 0.3K^{-0.7} \frac{dK}{dL}] \nonumber \]
\[ \frac{dK}{dL}L=\frac{-0.7 L^{-0.3} K^{0.3}}{L^{0.7} 0.3K^{-0.7}} = -\frac{7K}{3L}. \nonumber \]
Part 2 Find \(\frac{dL}{dK}\text{.}\)
\[ \frac{d}{dK} 1000=15\frac{d}{dK}[L^{0.7} K^{0.3}] \nonumber \]
\[ 0=15[\frac{d}{dK} (L^{0.7}) K^{0.3}+L^{0.7} \frac{d}{dK} (K^{0.3})] \nonumber \]
\[ 0=[0.7 L^{-0.3} \frac{dL}{dK} K^{0.3}+L^{0.7} 0.3K^{-0.7}] \nonumber \]
\[ \frac{dL}{dK}= \frac{- 0.3 L^{0.7} K^{-0.7}}{0.7 L^{-0.3} K^{0.3}} = \frac{-3L}{7K}. \nonumber \]
Part 3 Interpret
\(\frac{dK}{dL}\) and \(\frac{dL}{dK}\) are both negative and are reciprocals of one another. In other words: \(\frac{dK}
{dL}=\frac{1}{\frac{dL}{dK}}\text{.}\)
Since they are negative, if we increase \(L\text{,}\) then \(K\) will decrease and vice versa. \(\frac{dK}{dL}\) measures the
slope of \(K\) ans a function of \(L\text{.}\) \(\frac{dL}{dK}\) measures the slope of \(L\) ans a function of \(K\text{.}\)

 Exercise 14:
Let 30 ∗ price + 3 ∗ price ∗ quantity + (quantity 2
)/100 = 2000 be an equation relating supply and price for gizmos. Find
d price d quantity

d quantity
and d price
. Explain what each derivative means.

 Exercise 15:
dy
e
xy
+ 2x + 3y = 17. Find dx
.

Answer
\[ \frac{d}{dx} (e^{xy}+2x+3y)= \frac{d}{dx} 17 \nonumber \]
Evaluating the derivatives:
\[ e^{xy} \frac{d}{dx} (xy)+2+3 \frac{dy}{dx}=0 \nonumber \]
Which gives:

5.1.7 https://math.libretexts.org/@go/page/83938
\[ e^{xy} [y+x \frac{dy}{dx}]+2+3 \frac{dy}{dx}=0 \nonumber \]
Next we solve for \(\frac{dy}{dx}\)
\[ e^{xy} y+xe^{xy} \frac{dy}{dx}+2+3 \frac{dy}{dx}=0 \nonumber \]
\[ (xe^{xy}+3)\frac{dy}{dx}=-(e^{xy} y+2) \nonumber \]
\[ \frac{dy}{dx}=-\frac{(y e^{xy}+2)}{(x e^{xy}+3)} \nonumber \]

This page titled 5.1: Implicit Differentiation is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike
May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is
available upon request.

5.1.8 https://math.libretexts.org/@go/page/83938
5.2: Related Rates
dy dy
As we have seen, dx
is the instantaneous rate of change of y with respect to x. In chapter 4 we learned techniques for finding dx
dy
when y is defined as a function of x. In the last section we learned how to use implicit differentiation to find dx
when we were
dy
given an equation in x and y. In this section we want find when x and y are both described in terms of another variable. As
dx

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 for $10. 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
Solution a: The revenue and cost functions for widgets depend on the quantity (q). The formulas for revenue and cost are:
2
revenue = q(20 − 0.1q) = 20q − 0.1 q .

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 = .1 ∗ c.

2
revenue = 2c − 0.001 c .

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.
The alternative method is to differentiate the equations for revenue (r) and cost (c ) with respect to quantity (q), and find the two
derivatives and
d r

d q
, then treat them as fractions. The derivative we want is the quotient of these fractions.
d c

d q

Solution b: The revenue and cost functions for widgets are the same as above.
2
revenue = 20q − 0.1 q .

cost = 10q.

We now differentiate
d r
= 20 − 0.2q.
d q

d c
= 10.
d q

We divide these derivatives to get the desired derivative.


change in revenue d r d r d c
: = / = (20 − 0.2q)/10
change in cost d c d q d q

Substituting q =.1 c 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

5.2.1 https://math.libretexts.org/@go/page/83939
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 Elimination Hard.

The cost (c(q)) and revenue (r(q)) equations for gizmos are both given in terms of quantity (q)
2 3
r(q) = 30q − 0.1 q − 0.001 q .

2
c(q) = 500 + 10q − 0.01 q .

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 appropriate derivatives are:
d r 2
= 30 − 0.2q − 0.003 q .
d q

d c
= 10 − 0.02q.
d q

When q =50, we have


d r 2
= 30 − 0.2 ∗ 50 − 0.003 ∗ 50 = 12.5.
d q

d c
= 10 − 0.02 ∗ 50 = 9.
d q

We divide these derivatives to get the desired derivative.


d r d r d c 12.5
= / = ≈ 1.389
d c d q d q 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:


2
revenue = 50 ∗ quantity − 0.01 ∗ quantity .

d cost
= 15.
d quantity

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.
d quantity

When quantity = 100, we have d revenue

d quantity
= 50 − 0.02 ∗ 100 = 48. Thus

5.2.2 https://math.libretexts.org/@go/page/83939
d revenue d revenue d cost 48
= / = = 3.2.
d cost d quantity d quantity 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:
2
widgets(sludge) = 4 ∗ sludge − 0.1 ∗ sludge ,

or in shorthand notation: w(s) = 4s − 0.1s 2

2
sludge(goop) = 3 ∗ goop + .1 ∗ goop .

or in shorthand notation: s(g) = 3g + .1g 2

Find the derivative of widgets with respect to goop when goop = 10.
Solution
We note that when g = 10, we have s = 3 ∗ 10 + .1 ∗ 10 2
= 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 goop = 10, d w

d s
= (4 − 0.02 ∗ 40) = 3.2, and d s

d g
. We need to multiply the derivatives to cancel the d s.

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


.75 .25
Y = 50 L K .

The manufacturer currently uses 16 units of labor and 81 units of capital. The total production is constant but the manufacturer is
investing in automation. The derivative of capital with respect to time is 5. How fast is the amount of labor needed changing?
Solution
We are gong 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.

5.2.3 https://math.libretexts.org/@go/page/83939
d .75 .25
(Y = 50 L K )
dt

−0.25
dL .25 .75 −0.75
dK
0 = 50 ∗ (0.75 ∗ L ∗ ∗K +L ∗ .25 ∗ K ∗ )
dt dt

We now substitute in for the values of K, L, and dK

dt
, which were given.

−0.25
d L .25 .75 −0.75
0 = 50 ∗ (0.75 ∗ 16 ∗ ∗ 81 + 16 ∗ .25 ∗ 81 ∗ 2)
(d t

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 small values. We either want to multiply or divide theses fractions to obtain
the desired derivative.
class="

Exercises: Related Rates Problems

 Exercise 1:

Let y = 3x + 5 and z = 4y + 7. Find dz

dx
when x = 2 by solving for z as a function of x and taking the derivative, and also
dy
by finding dz

dy
and dx
and using related rates to apply the chain rule.

Answer
\[ z=4y+7= 4(3x+5)+7=12x+27 \nonumber \]

This page titled 5.2: Related Rates is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike May, S.J. &
Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon
request.

5.2.4 https://math.libretexts.org/@go/page/83939
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.
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).
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 (Q , P (Q )) is a point for a given price P (Q ) and quantity Q , then revenue is Q ∗ P (Q ), the price times the quantity at
0 0 0 0 0 0

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.

5.3.1 https://math.libretexts.org/@go/page/83940
We note that the slope of the normalized demand curve is almost always negative. It is thus convenient to talk about the negative of
the slope of the normalized demand price curve.
We refer to that quantity as Elasticity of Demand.
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 increasing 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

−dQ
I need to compute P (Q 0) and dP
. Substituting into the demand function,

P (800) = 20 − 800/100 = 20 − 8 = 12

dQ dQ
To find dP
, I recall from related rates, that dP
= 1/
dP

dQ
.

dQ dP −1
= 1/ ( ) = 1/ ( ) = −100
dP dQ 100

5.3.2 https://math.libretexts.org/@go/page/83940
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.
−d Quantity P (Q0 ) 5
Elasticity = ∗ = −(−100) ∗ = 1/3
d P rice 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
2
revenue = price ∗ quantity = 20q − q /100.

We recognize that this is a downward parabola with a maximum when q=1000, which is consistent with our results.
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 , pric e1 ) and (quantity 2, pric e2 ). We want to adapt our formula
dQ
for elastic to the discrete case. We can think of the derivative, dQ
, 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.

Our formula is converted to:


−Δquantity average price
E = ∗
Δprice average quantity

quantity2 − quantity1 (pric e1 + pric e2 )/2


=− ∗
pric e2 − pric e1 (quantity1 + quanti y2 )/2

quantity2 −quantity1 price1 +price2


Arc Elasticity: E = − price2 −price1

quantity1 +quantiy2

 Example 5.3.2: Elasticity from Two Points.

5.3.3 https://math.libretexts.org/@go/page/83940
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 pric e1 + pric e2
E =− ∗
pric e2 − pric e1 quantity1 + quanti y2

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 increases 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 revenue.
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.


Example 3: The short-term elasticity for gadgets is 0.6. What is the percentage change in revenue if the price is raised by 5%?
Solution
3: 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.

N ewRevenue = N ewP rice ∗ N ewQuantiy

= (1.05 ∗ OldP rice) ∗ (0.97 ∗ OldQuantity)

= 1.0185 ∗ OldRevenue

Thus raising the price by 5% will raise revenue by 1.85%.

Exercises: Elasticity Problems


class="
For problems 1-6, 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.

 Exercise 1:

quantity
price = 30 − ; quantity = 300.
50

Answer
\[ price=30-\frac{300}{50}=30-6=24 \nonumber \]

5.3.4 https://math.libretexts.org/@go/page/83940
This page titled 5.3: Elasticity is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike May, S.J. &
Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon
request.

5.3.5 https://math.libretexts.org/@go/page/83940
CHAPTER OVERVIEW

6: Functions of Several Variables


From a formal point of view, the first 5 chapters of this text have been concerned 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
F utureAmount = I nitialDeposit ∗ (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.
6.1: Evaluating and Graphing Functions of Several Variables
6.2: Wire Frames, Partial Derivatives, and Tangent Planes
6.3: Critical Points and Extrema
6.4: Optimization and Best Fitting Curves

This page titled 6: Functions of Several Variables is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike
May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is
available upon request.

1
6.1: Evaluating and Graphing Functions of Several Variables
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.

Example 6-1-1 Bank Balances

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
F utureAmount = I nitialDeposit ∗ (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.

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 as many as 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 prof it(q) = −3q + 500q − 1000.
2

If we simplify the notation a little bit in this example so that we have

6.1.1 https://math.libretexts.org/@go/page/83945
(y∗p)
r
F A(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.2: Demand Price from 2 Points.

Example 6-1-2 A line from two points

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.

6.1.2 https://math.libretexts.org/@go/page/83945
 Example 6.1.3: Building a Table with Two Variables.

Example 6-1-3 A table with two variabl…


variabl…

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.
F utureAmount
P resentAmount =
years
(1 + rate)

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.

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 payment on a mortgage where both the annual interest rate
and the number of 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.

6.1.3 https://math.libretexts.org/@go/page/83945
 Example 6.1.4: Mortgage Payments.

Example 6-1-4 Table of Mortgage pay…


pay…

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.5: Table and Graph.

6.1.4 https://math.libretexts.org/@go/page/83945
Example 6-1-5 Surface graph from table

I have a company that produces 2 products, widgets and gizmos. The two demand functions are:

P riceGizmos = 10 − QuantityGizmos/50

P riceW idgets = 20 − QuantityW idgets/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:
2
QG QG
RevG = P riceG ∗ QG = (10 − ) QG = 10QG − .
50 50

2
QW QW
RevW = P riceW ∗ QW = (20 − ) QW = 20QW − .
40 40

Putting the equations together gives an equation for revenue.


2 2
QG QW
Rev = RevG + RevW = 10QG − + 20QW − .
50 40

Next we build a build a table for the function as we have done above.

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.

6.1.5 https://math.libretexts.org/@go/page/83945
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.

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.

The Contour chart emphasizes the level curves. The rate of change will be fastest in a direction perpendicular to the level
curves.

6.1.6 https://math.libretexts.org/@go/page/83945
Another alternative for seeing a graph is to use Wolfram Alpha. Unfortunately 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.

Exercises: Evaluating and Graphing Functions of Several Variables Problems


For exercises 1-9, set up an Excel notebook, and evaluate the given function of several variables at the indicated values. The
workbook should be set up so that the input values can be changed and the formula will re-compute with the new values.

 Exercise 1

Evaluate the function f (x, y) = x2 2


+ 3xy + 4 y , when x = 4, and y = −2.

Answer
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

6.1.7 https://math.libretexts.org/@go/page/83945
 Exercise 2

Evaluate the function f (x, y, z) = x 2


+ 3xy + 4 y
3
+ 5xyz, when x = 3, y = 5, and z = 7.

 Exercise 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 quantity is 75.

Answer
The function we would have is
\[ Cost=Initial\ cost+per\ unit\ cost*quantity \nonumber \]
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

 Exercise 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 computations that find the coefficients of the demand price function, and the demand price.)

 Example 5

6.1.8 https://math.libretexts.org/@go/page/83945
Express revenue as a function of two quantity demand-price pairs and quantity, assuming that demand price is an exponential
function, where 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 equations we get by evaluating the exponential function \(P=P_0 e^{kq}\)
at the two given points:
\[ (0,20) \text{ gives us } 20=P_0 e^{(k*0)} \nonumber \]

(k∗100)
(100, 18) gives us 18 = P0 e

Then P 0 = 20 (from the first equation) , and 18 = P0e


(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


(−0.001q)
P = 20e

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 quantity. 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, P 0) and (q
1, P1 )

A quantity Q
The Price function would be
P
1 1
( ln( )q)
q P
P = P0 e 1 0

In Excel we could set up a table that would allow us to change P 0, P1 , q1 and q


P
1 1
( ln( )q)
q P
revenue(P0 , P1 , q1 , q) = q ∗ P0 e 1 0

Excel commands and general setup

6.1.9 https://math.libretexts.org/@go/page/83945
Excel output

 Exercise 6:
Express profit as a function of two quantity demand-price pairs, quantity, 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 computations that find the cost and
revenue.)

 Exercise 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.

Answer
\[ FutureAmount=InitialDeposit*\left(1+\frac{rate}{ppy}\right)^{years*ppy} \nonumber \]

Excel commands and general setup

6.1.10 https://math.libretexts.org/@go/page/83945
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.

 Exercise 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.

 Exercise 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.

Answer
\[ InitialDeposit=FutureAmount*\left(1+\frac{rate}{ppy}\right)^{-years*ppy} \nonumber \]

Excel commands and general setup

6.1.11 https://math.libretexts.org/@go/page/83945
Excel output
So, to have $10,000 after 15 years we need to invest $5,920.08 now.

For exercises 10-17, 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.

 Exercise 10:

Create a table for the function f (x, y) = 3x2


+ xy + 5 y ,
2
with x ranging from –10 to 10, and y ranging from -5 to 15.

 Exercise 11:

Create a table for the function f (x, y, z) = xyz + x 2


y −y
2
+ 5z, with x ranging from –10 to 10, and y ranging from -5 to 15,
with z = 2.

Answer
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\text{,}\) we want to fix the column reference.
When using \(y\text{,}\) 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. 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.

 Exercise 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 quantity ranges from 50 to 100 by 5.

 Exercise 13:

6.1.12 https://math.libretexts.org/@go/page/83945
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%.

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

 Exercise 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 the deposits accumulate for 20 to 40
years at interest rates ranging from 3% to 5%.

 Exercise 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%.

Answer
The entries in the cell look like this

6.1.13 https://math.libretexts.org/@go/page/83945
e can easily read off what our initial investment needs to be if we want to earn $10,000.

 Exercise 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:
QuantityGizmo QuantiyW idget
P riceGizmo = 50 − −
40 300

QuantityGizmo QuantiyW idget


P riceW idget = 40 − −
400 50

 Exercise 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:
QuantiyW idget
QuantityGizmo/100
P riceGizmo = 60(0.9 ) −
200

QuantityW idget/100
QuantityGizmo
P riceW idget = 40(0.85 ) −
100

6.1.14 https://math.libretexts.org/@go/page/83945
Answer
Let \(x\) be Gizmo, and \(x\) be Widget, then
\[ PriceX=60(0.9)^{\frac{x}{100}}-\frac{y}{200} \nonumber \]
\[ PriceY =40(0.85)^{\frac{y}{100}}-\frac{x}{100} \nonumber \]
\[ Revenue=x PriceX+y Pricey \nonumber \]
\[ revenue=x 60(0.9)^{\frac{x}{100}}-\frac{y}{200}+y 40(0.85)^{\frac{y}{100}}-\frac{x}{100} \nonumber \]

For exercises 18-25, use either Excel or WolframAlpha to produce a graph of the function described in exercises 10-17
respectively.

This page titled 6.1: Evaluating and Graphing Functions of Several Variables is shared under a CC BY-NC-SA 4.0 license and was authored,
remixed, and/or curated by Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts
platform; a detailed edit history is available upon request.

6.1.15 https://math.libretexts.org/@go/page/83945
6.2: Wire Frames, Partial Derivatives, and Tangent Planes
A standard technique in mathematics courses is to try to break a complicated 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 treating the other variables as
constants. Then we are back to considering functions of a single variable. We start by returning to Example 5 from the previous
section, and seeing what information can be obtained by looking at one variable at a time.

 Example 6.2.1: Optimizing Revenue with Two Products.

Example 6-2-1 Building wire frame mo…


mo…

I have a company that produces 2 products, widgets and gizmos. The two demand functions are:
QuantityGizmos QG
P riceGizmos = 10 − = 10 −
50 50

QuantityW idgets QW
P riceW idgets = 20 − = 20 −
40 40

This gives me the following revenue function:


2 2
QG QW
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.

6.2.1 https://math.libretexts.org/@go/page/83946
The wires are obtained by intersecting the graph of the function with a plane where QW or QG is held constant.

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
2
QW
Revenue(300, QW )\amp = 3000 − 1800 + 20QW −
40
2
QW
\amp = 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..

6.2.2 https://math.libretexts.org/@go/page/83946
Figure 6.2.2. 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 − .
d QW 20

This derivative is zero when QW = 400. That is the only possible place on this wire where we can have a maximum.
Similarly, when QW = 400,

2
QG
Revenue(QG, 400) = 10QG − + 4000,
50

6.2.3 https://math.libretexts.org/@go/page/83946
d QG
Revenue(QG, 400) = 10 − .
d QG 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.

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 symbol f while the partial derivative with respect to
d

dx

x uses the symbol f , or f . Similarly, the partial derivative with respect to y uses the symbol f , or f .
∂ ∂
x y
∂x ∂y

 Example 6.2.3: Finding and Interpreting Partial Derivatives.

Find the partial derivatives of f (x, y) = x 2


+ 2xy + 3 y
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.

6.2.4 https://math.libretexts.org/@go/page/83946
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 f (3.5, −0.5).


∂y

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

6.2.5 https://math.libretexts.org/@go/page/83946
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, (x , f (x )) and the slope f (x ) to get the equation of the tangent line approximation
0 0 0

near x .
0

Tangent line:

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

Linearf (x, y) = fx (x0 , y0 )(x − x0 ) + fy (x0 , y0 )(y − y0 ) + f (x0 , y0 ).

 Example 6.2.4: 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):
α β
P roduction(Labor, C apital) = cLabor C apital ,

or using short-hand notation:


α β
P (L, C ) = c L C ,

where c, α, and β are constants. For our widget factory, this becomes
0.75 0.25
P roduction(Labor, C apital) = 10L C

with labor production and capital in the appropriate units. Find P roduction(81, 16). Use a linear approximation to estimate
P roduction(85, 14).

Solution
We answer the first question by substituting the values into the equation.
0.75 0.25
P roduction(81, 16) = 10 ∗ 81 ∗ 16 = 10 ∗ 27 ∗ 2 = 540.

To produce the tangent plane we take the partial derivatives and evaluate them at our base point.
−0.25 0.25
P roductionLabor (Labor, C apital) = 10 ∗ .75Labor C apital

P roductionLabor (81, 16) = 10 ∗ .75(1/3) ∗ 2 = 5

0.75 −0.75
P roductionC apital (Labor, C apital) = 10 ∗ 0.25Labor C apital

P roductionC apital (81, 16) = 10 ∗ .25 ∗ 27(1/8) = 8.4375

This gives us our tangent plane.

P roduction(Labor, C apital) ≈ 5(Labor − 81) + 8.4375(C apital − 16) + 540.

Substituting in values gives our estimate.

P roduction(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

6.2.6 https://math.libretexts.org/@go/page/83946
extends, with one variable and multiple parameters. Finding the linear approximation also extends without difficulty. We simply
have a linear term for each variable.
class="

Exercises: Wire Frames, Partial Derivatives, and Tangent Planes Problems


For exercises 1-7, for the given functions and points P and P
1 2:

a. Give the 2 functions of one variable through P obtained by holding each variable constant.
1

b. Find the partial derivatives of the original function.


c. Evaluate the partial derivatives at P .
1

d. Give the equation of the tangent plane through P .1

e. The approximation at P obtained from the tangent plane.


2

 Exercise 1:
The function is f (x, y) = x 2 2
+ 3xy + 4 y , P1 = (4, 2), and P
2 = (3, 2.5).

Answer
a. Give the 2 functions of one variable through \(P_1\) obtained by holding each variable constant.
\[ f(4,y)=16+12y+4y^2 \nonumber \]

2
f (x, 2) = x + 6x + 16

This page titled 6.2: Wire Frames, Partial Derivatives, and Tangent Planes is shared under a CC BY-NC-SA 4.0 license and was authored,
remixed, and/or curated by Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts
platform; a detailed edit history is available upon request.

6.2.7 https://math.libretexts.org/@go/page/83946
6.3: Critical Points and Extrema
With functions of one variable we were interested in places where the derivative is zero, since they made candidate points for the
maximum or minimum 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. Similarly, 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)| =0
x=a,y=b
∂y

 Example 6.3.1: Finding a Local Minimum of a Function.

Example6 3 1 Partials and critical points

Use the partial derivatives of f (x, y) = x 2


+ 2xy + 3 y
2
− 4x − 3y to find the minimum of the graph.
Solution
Critical Point by Algebra: In the previous section, we already computed

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 algebraically 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

6.3.1 https://math.libretexts.org/@go/page/83947
Substitute back and solve for x.

0 = 2x + 2(−1/4) − 4

2x = 9/2

x = 9/4

Critical Point by Solver: However, if the partials are more complicated, I will want to find the critical points another way. I can
find the point with Solver.

To get solver to set both partials to 0 at the same time, I ask it to solve for f
y = 0, while setting f
x =0 as a constraint. Make sure
to uncheck the box that makes unconstrained variables non-negative.

This finds our critical point within our error tolerance.

Critical Point by CAS: We can also use Wolfram|Alpha to find the solution to our system of equations.

6.3.2 https://math.libretexts.org/@go/page/83947
Determining the Critical Point is a Minimum We thus get a critical point at (9/4,-1/4) with any of the three methods of solving for
both partial derivatives being zero at the same time. Once we have a critical point 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 has a critical point at (0, 0) and that that point is a minimum for the function. Similarly,
f (x, y) = x
2
+y
2

f (x, y) = −x
2
has a critical point at (0, 0) and that that point is a maximum for the function. For some functions, like
−y
2

f (x, y) = x − y , which has a critical point at (0, 0), we can have a maximum in one direction and a minimum in another
2 2

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.2: A Saddle Point at a Minimum on Both Axes.

Example 6-3-2. Warning Example - Dia…


Dia…

Show that f (x, y) = x


2
− 3xy + y
2
has a critical point at (0, 0), which is a minimum of both slice curves, but is not a local
minimum.

6.3.3 https://math.libretexts.org/@go/page/83947
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 minimum at 0.
2
f (x, 0) = x

2
f (0, y) = y .

However if we take the slice with x = y, we get a parabola bending down, so we don’t have a minimum.
2 2 2
f (x, −x) = x − 3xx + x = −x .

Looking at the graph, we see that this graph does not have a minimum.

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.
Second Partial Derivatives
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 f is simply the old second derivative of the curve f (x, y ) and f is simply the old second derivative of the curve
xx 0 yy

f (x , y). For curves with continuous second partial derivatives, the mixed partials, f
0 and f are the same. yx xy

 Example 6.3.3: Finding Second Partial Derivatives.

Find the second partial derivatives of


2 3
f (x, y) = x + 3xy + 5 y − 7x − 11y.

Solution
We start by computing the first partial derivatives.

fx = f (x, y) = 2x + 3y − 7
∂x

6.3.4 https://math.libretexts.org/@go/page/83947

2
fy = f (x, y) = 3x + 15 y − 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.


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:
2
D(f (x, y)) = fxx fyy − fxy .

 Example 6.3.4: Finidng the Discriminant of a Function.

Find the discriminant of


2 3
f (x, y) = x + 3xy + 5 y − 7x − 11y.

Solution
We have already computed the second partial derivatives.

fx x = 2, fx y = 3, fy y = 30y.

Substituting into the formula


2
D = (2)(30y) − 3 = 60y − 9.

Discriminant test: Let (a, b) be a critical point of f (x, y).


If D(a, b) > 0 and f xx (a, b) > 0 then (a, b) is a local minimum of f (x, y).
If D(a, b) > 0 and f xx (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.5: Using the Discriminant to Classify Critical Points.

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 0 0 0 0 1

B 0 1 3 2 4

C 1 0 0 2 3

D 0 0 1 2 0

6.3.5 https://math.libretexts.org/@go/page/83947
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

Not enough
A 0 0 0 0 1 0
information
Not a critical
B 0 1 3 2 4 8
point
Not a critical
C 1 0 0 2 3 -4
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

Not enough
G 0 0 3 3 3 0
information

 Example 6.3.6: Finding and Classifying Critical Points.

Let f (x, y) = x 3
− 3x + y
3
− 3y .
2
Find the critical points and classify them using the discriminant.
Solution
We start by computing the first partial derivatives.
2
fx = 3 x − 3 = 3(x − 1)(x + 1)

2
fy = 3 y − 6y = 3(y − 2)(y).

Then we compute the second partial derivatives and the discriminant.


2
fxx = 6x, fxy = 0, fyy = 6y − 6, D = (6x)(6y − 6) − 0 = 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 f xx 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 f xx is negative, so we have a local maximum.

Exercises: Critical Points and Extrema Problems


class="
For exercises 1-6, 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.

 Exercise 1:

6.3.6 https://math.libretexts.org/@go/page/83947
The function is f (x, y) = x 2
+ 2xy + 4 y
2
+ 5x − 6y, for the region −10 ≤ x ≤ 10, and −10 ≤ y ≤ 10.

Answer
\[ f_x (x,y)=2x+2y+5 \nonumber \]

This page titled 6.3: Critical Points and Extrema is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike
May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is
available upon request.

6.3.7 https://math.libretexts.org/@go/page/83947
6.4: Optimization and Best Fitting Curves
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,
(x , y ), in the set we start by finding the corresponding point, (x , predicted(x )), on the line. This gives us a set of predicted
0 0 0 0

points, (1, 1.5), (3, 2.5), (6, 4).

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.

6.4.1 https://math.libretexts.org/@go/page/83948
Example 6-4-1 and 2

 Example 6.4.1: Finidng 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 visible. The trendline command tells us the slope should be 2 and the intercept should be 1.

 Example 6.4.2: 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
To use solver we need to add the predicting equation. 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.

6.4.2 https://math.libretexts.org/@go/page/83948
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. We now designate two cells that represent variables we can
change.

Solver produces the same answer. The best fitting line is

y = 2x + 1.

 Example 6.4.3: Finding a Best-Fit Curve with teh 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

2
P1 2 1 m∗ 2 +b m∗ 2 +b−1 (m ∗ 2 + b − 1)

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
2 2
SumErrorSq(m, b) = 84 m + 28mb + 3 b − 62b − 364m + 451.

We take the partial derivative of this function with respect to the slope m and the intercept b.

SumErrorS qm (m, b) = 168m + 28b − 364.

6.4.3 https://math.libretexts.org/@go/page/83948
SumErrorS qb (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.

 Example 6.4.4: Use the Solver Method on a Larger Data Set.

Example 6-4-4 Bigger Linear Trendline

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.

6.4.4 https://math.libretexts.org/@go/page/83948
When we use solver, the best fitting line is

2010population = 1.096 ∗ 2000population + 98, 154.

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:
time
T otalV alue(time) = C ashAmount + DepositAmount ∗ rate .

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.5: Finding a Best-Fit Curve for a Nonstandard Model Equation.

Example6 4 5 Shifted Exponential Tre…


Tre…

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

6.4.5 https://math.libretexts.org/@go/page/83948
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
time
T otalV alue(time) = C ashAmount + DepositAmount ∗ rate .

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.6: Finding a Best-Fit Logistic Curve.

Example 6 4 6 Logistic growth trendline

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.
(
AvailableT rees(time) = C apacity/(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

6.4.6 https://math.libretexts.org/@go/page/83948
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.

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 disadvantage 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 = ax , or exponential, y = ae . ) As we have seen in this section, it is not hard to find situations where some other model
b bx

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 mathematically 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.
class="

Exercises: Optimization and Best Fitting Curves Problems


For exercises 1-4, 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.

 Exercise 1:

6.4.7 https://math.libretexts.org/@go/page/83948
The given points are:

x -2 0 6

y -7 5 15

Answer
With trendlines we get the best fitting line:

The line that gives us the best fitting curve is \(y=2.5 x+1\text{.}\)
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)

6.4.8 https://math.libretexts.org/@go/page/83948
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 trendlines are not sufficient. )

 Exercise 2:
The given points are:

x -2 0 6

y 24 10 20

 Exercise 3:

The given points are:

x -3 -1 1 3

y -2 6 10 10

Answer

We would define \(m\) and \(b\) and use these to create


\[ predicted\ y=mx+b \nonumber \]
If we had not done the trendline, the question would be: what should the initial values for \(m\) and
The data ranges from \((-3,-2)\) to \((3,10)\) which suggests a slope of \(m\approx (10-(-2))/(3-(-3) )=12/6=2\text{.}\)
Looking at the data near the \(y\)-axis suggests an initial guess of \(b\approx 7.5\text{.}\)
So we would start with an Excel sheet like this:

6.4.9 https://math.libretexts.org/@go/page/83948
Setting up Solver as shown above we get \(m = 2\) and \(b = 6\text{.}\)

 Exercise 4:

The given points are:

x -2 0 2 4

y -7 5 11 11

For exercises 5-8, find the curve of the indicated type that gives the best fit for the data.

 Exercise 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:
time
Amount(time) = I nitialAmount ∗ rate

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.

Answer
A scatter plot of the data will help us find some good initial guesses for the initial amount and the rate.

6.4.10 https://math.libretexts.org/@go/page/83948
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 \(\gt 1\text{.}\)
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.

After using Solver we determine that the best model function for our data is as follows:

6.4.11 https://math.libretexts.org/@go/page/83948
\[ Amount(time)=5,013.11* (1.06)^{time} \nonumber \]
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=5001 e^{0.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.

 Exercise 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
time
Amount(time) = C ashAmount + I nvestmentAmount ∗ rate

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.

 Exercise 7:

Mary has put some of her money in an investment that pays simple and the rest of her money a single account that compounds
the return back into the account. Thus, the model we want to use for the amount is
time
Amount(time) = Amount1 + Return1 ∗ time + Amount2 ∗ rate2

With the data:

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.

Answer
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 interests. We will start with a guess of \(rate = 1.05\text{.}\)
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.

6.4.12 https://math.libretexts.org/@go/page/83948
The general shape of the predicted values graph seems fine. The values are off, but Solver will be able to reduce the error.

The solution is:

Amount 1 3317.59

return 1 163.19

rate 1.07

Hence \(Amount 2 = 10,000 – 3,317.59 = 6,682.41\text{,}\) and we have that


\[ Amount(time)=\$3,317.59+\$163.19*time+\$6,682.41* (1.07)^{time} \nonumber \]
In Excel the data and the predicted values now line up very nicely.

 Exercise 8:/span>

John has divided his money between two accounts. They both compound their returns, but they pay different rates. Thus, the
formula that models the investment is:
time time
Amount(time) = Amount1 ∗ rate1 + Amount2 ∗ rate2

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.

This page titled 6.4: Optimization and Best Fitting Curves is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated
by Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history
is available upon request.

6.4.13 https://math.libretexts.org/@go/page/83948
CHAPTER OVERVIEW

7: Integration
Suppose that for a given company the marginal cost has been determined to be
3 2
M C (x) = x + 3x

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 corresponds to the area underneath the Marginal Cost function MC(x).

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
7.2: The Fundamental Theorem of Calculus
7.3: Basic Antidifferentiation
7.4: Integration by Change of Variables or Substitution
7.5: Integration using Computer Algebra
7.6: The Normal Distribution- An extended numeric example

1
7.7: Applications of the Integral- Investment and Depreciation
7.8: Economics Applications of the Integral

This page titled 7: Integration is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike May, S.J. &
Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon
request.

2
7.1: Approximating Definite Integrals as Sums
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 traveled 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 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.


Solution

7.1.1 https://math.libretexts.org/@go/page/83952
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.

7.1.2 https://math.libretexts.org/@go/page/83952
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

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.

7.1.3 https://math.libretexts.org/@go/page/83952
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.

7.1.4 https://math.libretexts.org/@go/page/83952
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:

Find the area under the curve y = x ∗ (4 − x) with x between 0 and 4 with Excel
Solution

7.1.5 https://math.libretexts.org/@go/page/83952
Example7 1 2 Finding Area Under a Qu…
Qu…

We will approximate the area with 100 rectangles. We set up a worksheet to find the area of the first rectangle.

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 x is for the x value at the right
n

side of the n-th subinterval. The value of x is the starting point plus n times the width of a subinterval. We then evaluate the
n

function at x . The area of the n-th rectangle is the height, or f (x ), times the width of the subinterval. The last column is the total
n n

area for the first n rectangles. The area for 100 rectangles is our area estimate.
To find the area we quick fill our worksheet.

For a more accurate estimate we divide into smaller rectangles.

7.1.6 https://math.libretexts.org/@go/page/83952
While 100 subintervals will be close enough for most of the problems we are interested is, the "area", or definite integral will be
defined as the limit of this sum as the number of subintervals goes to infinity. Thus
b n

∫ f (x)dx = lim ∑ f (xi )Δx


n→∞
a i=1

with Δx = b−a

n
and x
i = a + i ∗ Δx.

The sums of the form, ∑


n

i=1
f (xi )Δx with Δx =
b−a

n
and xi = a + i ∗ Δx, are called Riemann sums. The limit, written
b

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.5: Present Value of a Revenue Stream.

Example7 1 3 Area under a more com…


com…

7.1.7 https://math.libretexts.org/@go/page/83952
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.

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.

Exercises: Approximating Definite Integrals as Sums Problems

 Exercise 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.

Answer
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
The area is approximately 133.98

7.1.8 https://math.libretexts.org/@go/page/83952
This page titled 7.1: Approximating Definite Integrals as Sums is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or
curated by Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit
history is available upon request.

7.1.9 https://math.libretexts.org/@go/page/83952
7.2: The Fundamental Theorem of Calculus
b
In the last section we defined the definite integral, ∫ f (t)dt, the signed area under the curve y = f (t) from t = a to t = b, as the
a

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 to find 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 the area of the area with a simple formula,
b

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 Note on Variables Used.


We shifted the independent variable 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.

Solution
Then
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.

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

7.2.1 https://math.libretexts.org/@go/page/83953
Solution
The obvious area function is F (x) = c ∗ x 2
/2. If a is also nonzero, the area is the difference of the areas of two triangles.
b 2 2 2 2
c∗b c∗a c(b −a )
∫ c ∗ tdt = F (b) − F (a) = − = .
a 2 2 2

 Remark . 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.

The right-hand rule uses an easier formula, so we used it first. For the ith rectangle we evaluate at x = a + iΔx. For the midpoint
i

formula, we evaluate at the midpoint of the interval, at mi d = a + iΔx − Δx/2. As the picture suggests, the midpoint formula
i

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

7.2.2 https://math.libretexts.org/@go/page/83953
Example7 2 5 Area functions for linear…
linear…

Repeat the last example, finding the area under f (x) = 6x, with Excel. With a linear function we have use the following to
produce an area function.

Solution
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 (mi d ) times the width, Interval width. SumArea is our running area function. When we plot the
n

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. However, we can repeat the process with Excel and use
functions of higher order.

 Example 7.2.6: Best Fitting Area Function for a Quadratic Function.

7.2.3 https://math.libretexts.org/@go/page/83953
Example 7 2 6 Quadratic integrand

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 ∗ t , then the related area function is
2

3
F (x) = c ∗ t /3.

 Example 7.2.7: Best Fitting Area Function for a Cubic Function.

7.2.4 https://math.libretexts.org/@go/page/83953
Example7 2 7 Area function of cubic in…
in…

Find the area when f (x) = 6x 3


.

Solution
Once again, we can use Excel to produce an area function. The area function seems to be F (x) = 1.5x 4
.

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 . Fundamental Theorem of Calculus (First Version).


x
Let f (x) be a continuous function on the interval [a, b]. On that interval define an area function by F (x) = ∫ a
f (t)dt. Then
d
F (x) = f (x).
dx

 Theorem . Fundamental Theorem of Calculus (Second Version

Let f (x) be a continuous function on the interval [a, b]. Suppose F (x) is any continuous, differentiable function with
b
F (x) = f (x). Then ∫
d
f (t)dt = F (b) − F (a).
dx a

In practice we use the second version of the fundamental theorem to evaluate definite integrals. We find a function F (x) whose
derivative is the integrand f (x) and then evaluate F (x) at the endpoints. It is easier to prove or justify the first version of the
x
fundamental theorem. The basic argument notes that is F (x) = ∫ f (t) dt, then formally
a

d (F (x + h) − F (x))
F (x) = lim .
dx h→0 h

7.2.5 https://math.libretexts.org/@go/page/83953
But if h is small, F (x + h) − F (x) is approximately the area of a rectangle of height f (x) and with h, so the ′
F (x) = f (x). We
then note that any two anti-derivatives of a function differ by a constant.

 Example 7.2.10: Redoing an Old Area Problem by the FTC.

In example 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– x and note that one anti-derivative of f (x) is F (x) = 2x
2 2 3
− x /3. Then
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 fundamental theorem of calculus than to make an approximation with that many intervals.

 Example Verifying an Antideriviative to find Area.


Let f (x) = x e . We are told F (x) = (x + 2x + 2)(−e
2 −x 2 −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,
′ −x 2 −x 2 −x
F (x) = (2x + 2)(−e ) + (x + 2x + 2)(e ) =x e = f (x)

The area is
−2 0 2
F (2)– F (0) = 10(−e )– 2(e ) = −2– 10/ e = −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.12: Using the FTC to guess and check Area under a Quadratic.

7.2.6 https://math.libretexts.org/@go/page/83953
Example 3a: Find the area function when f (t) = 6t 2
.

Solution
We have already used Excel to find a best fitting curve.

We are thus suspicious that the anti-derivative should be a cubic polynomial. We need
2 3 2 2
6t = d/dt(at + bt + ct + d) = 3at + 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) = 2t 3
+ 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) = 2 t .
3

 Example 7.2.13: Verifying the Best Fitting Function for Area under a Cubic Funciton.

Find the area when f (x) = 6x 3


.

Solution
Using Excel we guessed the area function F (x) = 1.5x . We can now verify that the derivative of F (x) is f (x), so we have
4

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.
class="

Exercises: The Fundamental Theorem of Calculus Problems

 Exercise 1:
Let f (x) = 4x + 5. We are told that F (x) = 2x 2
+ 5x + 7 is an anti-derivative.
a. Verify that f (x) is a derivative of F (x).
5
b. Use the fundamental theorem of calculus to evaluate ∫ f (x) dx. 1
5
c. Approximate ∫ f (x) dx, using Riemann sums and 100 intervals.
1

Answer
a. \[ F' (x)=\frac{d}{dx} (2 x^2+ 5 x + 7)=4x+5 \nonumber \]

This page titled 7.2: The Fundamental Theorem of Calculus is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or
curated by Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit
history is available upon request.

7.2.7 https://math.libretexts.org/@go/page/83953
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 F (x) is
b
any continuous, differentiable function with F (x) = f (x). Then ∫ f (t) dt = F (b) − F (a).
dx
d

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
b
integral sign without the limits of integration to denote the general anti-derivative. Thus ∫ f (t)dt is referred to as the definite a

integral of f (x) from a to b, and 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 a
nice function
Elementary Anti-derivative 1 – Find a formula for ∫ x dx. We start with the closest differentiation formula x = nx , and
n d

dx
n n−1

manipulate it so x is on the right hand side. We first replace n with n + 1 to get x


n
= (n + 1)x . We then divide both sides
d

dx
n+1 n

by n + 1 to obtain x = x /(n + 1). Finally, we note that adding a constant C does not change the derivative, so
n d

dx
n+1

/(n + 1) + C ). Since we have divided by n + 1, we need to insist that n + 1 ≠ 0. Using the notation of indefinite
n d n+1
x = (x
dx

integrals we obtain our power rule formula:


n+1
x
n
∫ x dx = + C , assuming n ≠ −1.
n+1

Note that this matches the pattern we found in the last section.
Elementary Anti-derivative 2 – Find a formula for ∫ 1/x dx. We start with the closest differentiation formula ln(x) = 1/x. In dx
d

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 can do this with an appropriate use of absolute value bars. Thus (ln(|x|) + C ) = 1/x, and d

dx

we have our second formula:

∫ 1/x dx = ln |x| + C .

Elementary Anti-derivative 3 – Find a formula for ∫ e dx. Once again, we start with the closest differentiation formula
x

e = e . In this case we don't have to do any manipulation, and we have our formula:
d x x

dx

x x
∫ e dx = e + C.

Elementary Anti-derivative 4 – Find a formula for ∫ a dx for a positive number a. This formula requires a bit more work. We
x

start with the formula a = ln(a)a . Dividing both sides by the constant ln(a) gives a = (a / ln(a) + C ) Thus our integral
d

dx
x x x d

dx
x

is:
x
x
a
∫ a 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.
The derivatives of a sum rule, d

dx
(f (x) + g(x)) =
d

dx
f (x) +
d

dx
g(x), becomes the
Integral of a Sum Rule:

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

7.3.1 https://math.libretexts.org/@go/page/83954
∫ (f (x) − g(x)) dx = ∫ f (x) dx − ∫ g(x) dx

Integral of a Constant Multiple Rule:

∫ 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 7.3.1: Antiderivative of Integral Powers.

Find the integral ∫ 3x 5


+ 4x
2
+5 +
7

x
dx.

Solution

5 2
7
∫ 3x + 4x +5 + dx
x

7
5 2
=∫ 3x dx + ∫ 4x dx + ∫ 5 dx + ∫ dx (sum rule)
x

1
5 2
=3∫ x dx + 4 ∫ x dx + 5 ∫ dx + ∫ 7 dx (constant multiple rule)
x

5 2
=3∫ x dx + 4 ∫ x dx + 5 ∫ dx + 7 ln |x| + C (natural log rule)

3 4
6 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 3
= x + C1 + x + C2 + 5x + C3 + 7 ln |x| + C4
6 3

since each indefinite integral gets a constant C. However all of the C ’s used here are arbitrary constants and they can be collapsed
i

together into a single constant C.


We can also use these rules to find indefinite integrals for roots.

 Example 7.3.2: Antiderivative of Fractional Powers.


−− −−
Find the integral ∫ √2x + √4x dx.
3

Solution

−− 3 −− −− 3 −−
∫ √2x + √4x dx = ∫ √2x dx + ∫ √4x dx (sum rule)

– − 3 –
3 −
= √2 ∫ √x dx + √4 ∫ √x dx (constant multiple rule)

– (1/2) 3 – (1/3)
= √2 ∫ x dx + √4 ∫ x dx (rules of exponents)

– (3/2) 3 – (4/3)
= √2x (2/3) + √4x (3/4) + C (power rule)

We can also find anti-derivatives of exponential and power functions.

 Example 7.3.3: Antiderivative of Power and Exponential Functions.

Find the integral ∫ 2 ∗ 3 x


+ 4e
x
dx.

7.3.2 https://math.libretexts.org/@go/page/83954
Solution

x x x x
∫ 2∗3 + 4e dx = ∫ 2∗3 dx + ∫ 4e dx (sum rule)

x x
=2∫ 3 dx + 4 ∫ e dx (constant multiple rule)

2 x x
= 3 + 4e +C (exponential rules)
ln(3)

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.


3
Evaluate the definite integral ∫1
6x
2
+ 2 dx.

Solution
We first evaluate the indefinite integral to find an anti-derivative.

2 3
∫ 6x + 2 dx = 2 x + 2x + C .

Since we can use any anti-derivative, we simplify by setting C =0 and choosing the anti-derivative F (x) = 2x 3
+ 2x.

3
2
∫ 6x + 2 dx = F (3) − F (1) = 60 − 4 = 56.
1

 Example 7.3.5: Area under .


100
Evaluate the definite integral ∫1
1

x
dx.

Solution
We first evaluate the indefinite integral to find an antiderivative.
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|).
100
1
∫ dx = F (100) − F (1) = ln(100) − ln(1) = ln(100).
1
x

 Example 7.3.6: Using the FTC when the Funciton 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.

7.3.3 https://math.libretexts.org/@go/page/83954
The production function (P) in terms of the number of months (x) is given by
−0.03945x
P (x) = 1043e

We would like to take an anti-derivative, but we don’t have a formula for this anti-derivative yet. However, we note
−0.03945x −0.03945 x x
e = (e ) = 0.9613

and we know that ln(0.9613) = −0.03945.We can now use our exponential rule, and
x
(1043 ∗ 0.9613 )
AntiderivP (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.

T otalP (60) = ArtiderivP (60)– AntiderivP (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

M C (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 C ost(q) = 5q − 0.001 ∗ q 2
+C

We also know C ost(1000) = 6000. Plugging that in gives


2
C ost(1000) = 5 ∗ 1000 − 0.001 ∗ 1000 + C = 6000

Solving for C gives C = 2000. Thus our cost function is


2
C ost(q) = 5q − 0.001 ∗ q + 2000

 Example 7.3.8: Building a Profit Funciton from Data.

7.3.4 https://math.libretexts.org/@go/page/83954
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

M P (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
2
P (x) = −198.7 x + 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


2
P (x) = −198.7 x + 3991.8x − 2000

We saw that M P (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.

f (x) ∫ f (x) dx

n+1
n x
x , assuming n ≠ 1 +C
n+1

1
ln |x| + C
x

x x
e e +C

x
a
x
a +C
ln(a)

(f + g)(x) ∫ f (x)dx + ∫ g(x)dx

(f − g)(x) ∫ f (x)dx − ∫ g(x)dx

7.3.5 https://math.libretexts.org/@go/page/83954
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 for changes
in variables. At this point the only way we have for finding ∫ (3x + 5) dx is expand the integrand getting ∫ (9x + 30x + 25)dx
2 2

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.
class="

Exercises: Basic Antidifferentiation Problems


Find antiderivatives for the given functions.

 Exercise 1:

f (x) = 3x + 5.

Answer
\[ F(x)=\frac{3x^2}{2}+5x+Constant \nonumber \]

 Exercise 2:
3
f (x) = 5 x + 4x + 3.

 Exercise 3:
3,124,567 473 −2,786,534
f (x) = x + 2x + 327 x .

Answer
\[ F(x)=\frac{x^{3,124,568}}{3,124,568}+2 \frac{x^{474}}{474}+327 \frac{x^{-2,786,533}}{-2,786,533}+Constant
\nonumber \]

 Exercise 4:

−−− 5
f (x) = √11x + .
x

 Exercise 5:
x

x
1
f (x) = e +( ) .
2

Answer
\[ F(x)=e^x+\frac{\left(\frac{1}{2}\right)^x}{\ln\left(\frac{1}{2}\right)}+Constant \nonumber \]

 Exercise 6:
x π π
f (x) = π +π +x .

Evaluate the definite integrals by first finding an antiderivative.

7.3.6 https://math.libretexts.org/@go/page/83954
 Exercise 7:
5

∫ x + 7 dx
0

Answer
\[ \int_0^5 (x+7)dx=F(5)- F(0)=\frac{25}{2}+35-0=\frac{95}{2} \nonumber \]

 Exercise 8:
10
1
∫ dx
1
x

 Exercise 9:
10
5
∫ 3x + dx
2
x

Answer
The anti-derivative is: \(F(x)=(3x^2)/2+5 \ln|x|\)
\[ \int_2^{10} 3x+\frac{5}{x} dx =F(10)-F(2) =\frac{300}{2}+5 \ln(10)-\left(\frac{12}{2}+5 \ln(2) \right) \nonumber \]

= 150 + 5 ln(10) − 6 − 5 ln(2) = 144 + 5(ln(10) − ln(2))

10
= 144 + 5 ln( ) = 144 + 5 ln(5)
2

 Exercise 10:
100 x
1
∫ ( ) dx.
1 2

 Exercise 11:
2
x
∫ e + e dx
−10

Answer
The anti-derivative is: \(F(x)=e^x+e x\)
\[ \int_{-10}^2 e^x+e dx =F(2)-F(-10)=e^2+2e-(e^{-10}-10 e) \nonumber \]

1
2
=e − − 8e
10
e

 Exercise 12:
5
−2 −1
∫ x +x dx
−2

Solve the Initial value problem.

7.3.7 https://math.libretexts.org/@go/page/83954
 Exercise 13:

Let f (x) = 4x + 3. The function F (x) is an antiderivative, and F (0) = 7.

Answer
The anti-derivative is: \(F(x)=2x^2+3x+C\text{.}\)
\(F(0)= 7\) implies that \(F(0)=0+C=7\text{,}\) so \(C = 7\)
Then \(F(x)=2x^2+3x+7\text{.}\)

 Exercise 14:

Let f (x) = 3x 2
− 6x + 5. The function F (x) is an antiderivative, and F (3) = 17.

 Exercise 15:

Let f (x) = 100(0.95) . The function F (x) is an antiderivative, and F (5) = 9.


x

Answer
The anti-derivative is:
\[ F(x)=\frac{100 (0.95)^x }{\ln(0.95)} +C \nonumber \]

F (5) = 9 implies that


5
100(0.95 )
F (5) = +C = 9
ln(0.95)

5
100(0.95 )
C =9− ≈ 9 + 1508.54 = 1517.54
ln(0.95)

Then
x
100(0.95 )
F (x) ≈ + 1517.54
ln(0.95)

 Exercise 16:
Let f (x) = 7/x + x 2
. The function F (x) is an antiderivative, and F (1) = 11.

 Exercise 17:
An investment provides an income stream of 1000(0.95) dollars per year. How much is received in the first 10 years?
t

Answer
\[ Income=\int_0^{10}1000(0.95)^t dt =\left.\frac{1000(0.95)^t)}{\ln(0.95)} \right|_{t=0}^{t=10} \nonumber \]

10 0
1000(0.95) 1000(0.95 ) )
= −
ln(0.95) ln(0.95)

≈ −11672.81 + 19495.73 = 7822.91

 Exercise 18:

7.3.8 https://math.libretexts.org/@go/page/83954
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.

 Exercise 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?

Answer
\[ sales=\int_1^{10}\frac{1000}{t} dt=1000 \ln(t) |_{t=1}^{t=10} \nonumber \]

= 1000(ln(10) − ln(0))

= 1000 ln(10) ≈ 2302.58

 Exercise 20:

A software company allows your company to expand the number of licenses your company owns by charging a marginal rate
of M R(licenses) = . How much does it cost to increase your license from 1000 to 2000 licenses?
200

√licenses

 Exercise 21:

The production function for a given oil well is rate(t) = 400(0.9) with time measured in years and production measured in
t

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?

Answer
1. \[ Production=\int_0^{1}400(0.9)^t dt =\left.\frac{400}{\ln(0.9)} (0.9)^t \right|_{t=0}^{t=1} \nonumber \]

This page titled 7.3: Basic Antidifferentiation is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike
May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is
available upon request.

7.3.9 https://math.libretexts.org/@go/page/83954
7.4: Integration by Change of Variables or Substitution
At the end of the last section we warned that the symbolic integration techniques 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, that of 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.
We start by exploring some examples where we can get the desired result by the guess and check technique.

 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
(3x + 5 ) + C . I then check by differentiating. Using the chain rule
1 8

d 1 8
1 8−1 7
( (3x + 5 ) + C) = ∗ 8(3x + 5 ) ∗ 3 = 3(3x + 5 ) .
dx 8 8

.
Thus our guess was off by a factor of 3 and the correct antiderivative is
1 1 1
8 8
∗1 (3x + 5 ) +C = (3x + 5 ) + C.
3 8 24

We can easily use the same trick to produce a rule for powers of a linear polynomial.

 Example 7.4.2: Power a Generic Linear by Guess and Check.

Find ∫ (ax + b) n
dx.

Solution
As we did in example 1, we first guess the antiderivative to be (ax + b )
1

n+1
n+1
+ C. We then take the derivative of that
expression and obtain a(ax + b) . This misses our integrand by a factor of
n
a. We adjust by that factor and find the
antiderivative is (ax + b )
1

a
+ C.
1

n+1
n+1

We can easily use the same trick to produce a rule for functions that are the exponential of a linear function.

 Example 7.4.3: Antidifferentiation of an Exponential Function by Guess and Check.


Find ∫ e ax+b
dx.

Solution
As we did in example 2, our first guess uses the basic rule without worrying about the linear term, so we guess e + C . We
ax+b

then take the derivative of that expression and obtain ae . This misses our integrand by a factor of a. We adjust by that
ax+b

factor and find the antiderivative is e + C.


1

a
ax+b

We run into a problem if we try to extend this method with quadratic terms. If we start with (x + 5) and guess an antiderivative 2 3

of (x + 5) , when we differentiate we get (x + 5) 2x and are off by a factor of 8x. However when we divide by that factor to
1

4
2 4 2 3

2 4
( x +5 )
get 8x
as a proposed antiderivative, and then differentiate again we get
2 3 2 4
4 ∗ 2x(x + 5) ∗ 8x − (x + 5) ∗8

8x

7.4.1 https://math.libretexts.org/@go/page/83955
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:


du
∫ f (u) dx = f (u) + C .
dx

We will generally simplify du

dx
dx to du, so our substitution rule is


∫ f (u)du = f (u) + C .

Let us rework some earlier examples with this method and then illustrate the method with a more difficult problem.

 Example 7.4.4: Power of Linear Example redone with Change of Variables.

Find ∫ (3x + 5) 7
dx.

Solution
The obvious candidate for u is 3x + 5. Then du = 3dx. Thus

7
1 7
∫ (3x + 5 ) dx\amp = ∫ (3x + 5 ) (3dx)\amp (Make u and du explicit.)
3

1 7
\amp = ∫ (u ) du\amp (Do the substitution.)
3

1 8
\amp = (u ) + C \amp (Find the integral in terms of u.)
3∗8
1
8
\amp = (3x + 5 ) + C \amp (Substitute back.)
24

This is easy to generalize for a power of a linear term.

 Example 7.4.5: Power 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 = adx. Hence
1
n n
∫ (ax + b ) dx\amp = ∫ (ax + b ) (dx)\amp (Make u and du explicit.)
a

1 n
\amp = ∫ (u ) du\amp (Do the substitution.)
a

1
n+1
\amp = (u ) + C \amp (Find the integral in terms of u.)
a ∗ (n + 1)

1
n+1
\amp = (ax + b ) + C \amp (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.

7.4.2 https://math.libretexts.org/@go/page/83955
 Example 7.4.6: Power of Quadratic Funciton with Change of Variables.

Find ∫ (2x 3
+ 11 ) x dx.
7 2

Solution
The obvious candidate for u is 2x 3
+ 11. Then du = 6x 2
d x. Thus

3 7 2
1 3 7 2
∫ (2 x + 11 ) x dx\amp = ∫ (2 x + 11 ) 6 x dx)\amp (Make u and du explicit.)
6

1 7
\amp = ∫ (u ) du\amp (Do the substitution.)
6

1 8
\amp = (u ) + C \amp (Find the integral in terms of u.)
6∗8
1
3 8
\amp = (2 x + 11 ) + C \amp (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.
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.


3
Evaluate ∫ 1
e
2x+5
dx.

Solution
1: (Convert everything to u.) The obvious candidate for u is 2x + 5. Then du = 2dx. For the lower endpoint, x = 1 becomes
u = 7. For the upper endpoint x = 3 becomes u = 11. Substituting,

3 3
1
2x+5 2x+5
∫ e dx\amp = ∫ e (2dx)\amp (Make u and du explicit.)
1
2 1

u=11
1 u
\amp = ∫ e du\amp (Do the substitution.)
2 u=7

11
1 ∣
u
\amp = e ∣ \amp (Find the antiderivative.)
2 ∣
7

1 1
11 7
\amp = e − e . \amp (Evaluate.)
2 2

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,
3 3
2x+5
1 2x+5
∫ e dx\amp = ∫ e (2dx)\amp (Make u and du explicit.)
1
2 1

x=3
1
u
\amp = ∫ e du\amp (Do the substitution.)
2 x=1

x=3
1 u∣
\amp = e ∣ \amp (Find the antiderivative.)
2 ∣x=1

x=3
1 ∣
2x+3
\amp = e ∣ \amp (Convert back.)
2 ∣
x=1

1 11
1 7
\amp = e − e . \amp (Evaluate.)
2 2

7.4.3 https://math.libretexts.org/@go/page/83955
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.


1
Evaluate ∫ −2
2
x exp(x )dx

Solution
(Convert everything to u.) The obvious candidate for u is x . Then 2
du = 2x dx. For the lower endpoint, x = −2 becomes
u = 4. For the upper endpoint x = 1 becomes u = 1. Substituting,

1 1
2
(x )
1 2
(x )
∫ xe dx\amp = ∫ e (2xdx)\amp (Make u and du explicit.)
−2
2 −2

1
1
u
\amp = ∫ e du\amp (Do the substitution.)
2 4

1
1 u∣
\amp = e ∣ \amp (Find the antiderivative.)
2 ∣
4

1 1
1 4
\amp = e − e . \amp (Evaluate.)
2 2

Exercises: Integration by Change of Variables or Substitution Problems


class="
Evaluate the following integrals. In each case identify the term that will be treated as u.

 Exercise 1:

4
∫ (5x + 3 ) dx

Answer
Let \(u=5x+3\text{.}\) Then \(du=5dx\text{.}\)
\[ \int (5x+3)^4 dx=\int \frac{(u)^4 du}{5}=\frac{u^5}{25} +c =\frac{(5x+3)^5}{25} +c \nonumber \]

 Exercise 2:

11
∫ (7x − 9 ) dx

 Exercise 3:

2/3
∫ (x/5 − 2 ) dx

Answer
Let \(u=x/5-2\text{.}\) Then \(du=dx/5\text{.}\)
\[ \int (x/5-2)^{2/3} dx=5\int {u^{2/3} du}=3{u^{5/3}}+c =3{(x/5-2)^{5/3}} +c \nonumber \]

 Exercise 4:

2578965
∫ (143567x + 98736 ) dx

7.4.4 https://math.libretexts.org/@go/page/83955
 Exercise 5:
−−−−−−−
∫ √ (8x − 3) dx

Answer
Let \(u=8x-3\text{.}\) Then \(du=8dx\text{.}\)
\[ \int (8x-3)^{1/2} dx=1/8 \int {u^{1/2} du}=\frac{1}{12}{u^{3/2}}+c =\frac{1}{12}{(8x-3)^{3/2}} +c \nonumber \]

 Exercise 6:

1
∫ dx
−−−− −
√ 3x + 7

 Exercise 7:

.06t−5
∫ 100 e dt

Answer
Let \(u=0.06t-5\text{.}\) Then \(du=0.06dt\text{.}\)
\[ \int 100 e^{0.06t-5}dt =\frac{1}{0.06} \int {100 e^{u}du}=\frac{100 e^{u}}{0.06}+c =\frac{100 e^{0.06t-5}}{0.06}+c
\nonumber \]

 Exercise 8:

t/5
∫ 150(1/2 ) dt

 Exercise 9:

2 5
∫ (2x + 5)(x + 5x + 3 ) dx

Answer
Let \(u=x^2+5x+3\text{.}\) Then \(du=(2x+5)dx\text{.}\)
\[ \int (2x+5) (x^2+5x+3)^5 dx=\int u^5\ du \nonumber \]

6 2 6
u (x + 5x + 3 )
= +c = +c
6 6

 Exercise 10:

2
−x
∫ 50x e dx

 Exercise 11:
2
3x +1
∫ dx
3
x +x +9

7.4.5 https://math.libretexts.org/@go/page/83955
Answer
Let \(u=x^3+x+9\text{.}\) Then \(du=(3x^2+1)dx\text{.}\)
\[ \int \frac{3x^2+1}{x^3+x+9} dx=\int \frac{du}{u} \nonumber \]

3
= ln |u| + c = ln | x + x + 9| + c

 Exercise 12:

− −−−−
2
∫ x √ x − 9 dx

 Exercise 13:
3
3x+1
∫ e dx
0

Answer
Let \(u=3x+1\text{.}\) Then \(du=3dx\text{.}\)
\[ \int_0^3 e^{3x+1} dx=\int_{u=1}^{u=10} e^u \ du \nonumber \]

u=10
1 u∣
1 10 1
= e ∣ = (e −e )
3 ∣ 3
u=1

 Exercise 14:
1
−0.04t
∫ 0100 e dt
0

 Exercise 15:
5
(−0.05(t+1))
∫ e dt
0

Answer
Let \(u=-0.05(t+1)\text{.}\) Then \(du=-0.05dt\text{.}\)
\[ \int_0^5 e^{-0.05(t+1)} dt=-frac{1}{0.05}\int_{u=-0.05}^{u=-0.3} e^u \ du \nonumber \]

u u=−0.3 −0.3 −0.05


= −20 e | = −20(e −e )
u=−0.05

 Exercise 16:
3
−2
∫ (2x + 5 ) dx
1

 Exercise 17:
6
− −−−−−
2
∫ x √ 3 x + 7 dx
1

Answer

7.4.6 https://math.libretexts.org/@go/page/83955
Let \(u=3x^2+7\text{.}\) Then \(du=6x\ dx\text{.}\)
\[ \int_1^6 x(3x^2+7)^{1/2} dx=\frac{1}{6}\int_{u=10}^{u=115} u^{1/2} \ du \nonumber \]

u=115
1 3/2 ∣
1 3/2 3/2
= u ∣ = (115 − 10 ) ≈ 133.51
9 ∣u=10 9

 Exercise 18:
2
3
2 (1−0.2 x )
∫ x e dx
0

 Exercise 19:

Find an antiderivative F (x) for f (x) = x 2


(x
3
+ 7)
3
such that F (0) = 5.

Answer
Let \(u=x^3+7\text{.}\) Then \(du=6x^2 dx\text{.}\)
\[ \int (x^2 ) (x^3+7)^3 dx=\frac{1}{6} \int u^3 du=\frac{u^4}{24}+c=\frac{(x^3+7)^4}{24}+c \nonumber \]

4
(7)
F (0) = 5 = +c
24

4
(7)
c =5− 4
24

3 4 4
(x + 7) (7)
F (x) = +5 −
24 24

 Exercise 20:

Find an antiderivative F (x) for f (x) = (4x 3


+ 5) exp(x
4
+ 5x − 9) such that F (0) = 2.

 Exercise 21:

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?

Answer
\[ Value=\int_0^{10}10000e^{-0.05t} dt =\left.\frac{-10000e^{-0.05t}}{0.05}\right|_0^{10} \nonumber \]

−10000 −0.5
= (e − 1) ≈ 78693.87
0.05

 Exercise 22:
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?

 Exercise 23:
The sales rate on a book is s(t) = 1000t exp(−t 2
/4), with time in years.
a. What are the total sales over 10 years?
b. When does the sales rate drop to 10?

7.4.7 https://math.libretexts.org/@go/page/83955
c. What is the maximum sales rate?

Answer
a. Let \(u=-\frac{t^2}{4}\text{.}\) Then \(du=-\frac{t}{2} dt\text{.}\)
\[ Sales=\int_0^{10} 1000t e^{-t^2/4}dt=\int_0^{-25}-2000 e^u\ du \nonumber \]

u −25 −25
= −2000 e )| = 2000((1 − e ) ≈ 2000
0

This page titled 7.4: Integration by Change of Variables or Substitution is shared under a CC BY-NC-SA 4.0 license and was authored, remixed,
and/or curated by Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a
detailed edit history is available upon request.

7.4.8 https://math.libretexts.org/@go/page/83955
7.5: Integration using Computer Algebra
Recall that the fundamental theorem of calculus states that if F (x) is a function with its derivative equal to f (x) on the region
b b
a ≤ x ≤ b, then ∫ f (x)dx = F (b) − F (a). We say ∫ f (x)dx is the definite integral of f (x) from a to b. If f (x) is a derivative
a a

of F (x), then F (x) is an anti-derivative of f (x), and any anti-derivative 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 sections 7.3 and 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 x with respect to x.
n

The Alpha provides an answer.

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.

7.5.1 https://math.libretexts.org/@go/page/83956
The interface is fairly robust. It understands the convention that the variable 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 integrating.

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.

Following that link gives more information on the syntax of the Mathematica 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.

7.5.2 https://math.libretexts.org/@go/page/83956
The output also has a link for showing steps on complicated problems.

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/defi...ral-calculator>, which we also used in chapter 4.

7.5.3 https://math.libretexts.org/@go/page/83956
In chapter 4, we found a derivative calculator. Similarly we can find an integral calculator (http://www.integral-calculator.com/>
that will show steps. For problems of at the level of difficulty we have been doing, Wolfram|Alpha also produces plots of the
integral.

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

7.5.4 https://math.libretexts.org/@go/page/83956
This is particularly useful when finding the antiderivative is beyond the 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
b
return rate. Thus the current value of a revenue stream, V (t), from time a to time b, is ∫ V (t) ∗ e
a
dt. However we only have
(−r∗t)

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.

7.5.5 https://math.libretexts.org/@go/page/83956
In business situations, we are rarely asked to simply find an integral. Instead, finding an integral is generally part of a larger
problem. Thus we often use CAS for part of a problem.
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 .

 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 + 5q + 50 and the break-even point occurs when
′ 2

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
1q 5q
Thus we know P (q) = 3
+
2
+ 50q + C for some constant C . We also know P (5) = 0. 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 + 5q + 50 and the break-even point occurs when
′ 2

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 setting up the boundary 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.)

7.5.6 https://math.libretexts.org/@go/page/83956
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 exp(−q/10) − q/10 and a break-even point
′ 2

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. However, 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.

2 2
P (q) = exp(−q/10) ∗ (−10 ∗ q − 200 ∗ q − 2000) − q /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.

7.5.7 https://math.libretexts.org/@go/page/83956
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
stop 10
−t −t
C urrentV alue = ∫ r V (t)dt = ∫ 1.03 (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.

Exercises: Integration using Computer Algebra Problems


class="
For 1-10, find the antiderivative of the given function

 Exercise 1:

f (x) = x ln(x)

Answer
\[ \int x \ln(x)dx=\frac{1}{4} x^{2}(2\ln(x)-1) +c \nonumber \]

 Exercise 2:
.07t 2
f (t) = e (−t + 3t + 5)

 Exercise 3:
2 (
f (t) = t e − 0.06t)

7.5.8 https://math.libretexts.org/@go/page/83956
Answer
\[ \int t^2 e^{-0.06 t} dt= e^{-0.06t} (-9259.26 - 555.556 t - 16.6667 t^2)+c \nonumber \]

 Exercise 4:

f (x) = ln(x)

 Exercise 5:
−0.06t
f (t) = (t + 1)e

Answer
\[ \int (t+1) e^{-0.06t}\ dt =e^(-0.06t) (-294.444 - 16.6667 t)+c \nonumber \]

 Exercise 6:

1
f (x) =
(1 + 2x)(3 + x)(5 + 6x)

 Exercise 7:
1
f (x) =
− −−− −
√ 1 + x2

Answer
\[ \int \frac{1}{\sqrt{1+x^2}}\ dx= \sinh^{-1}(x)+c \nonumber \]

 Exercise 8:

1
f (x) =
2
(3 + 2x)

 Exercise 9:

5
f (x) =
2
9 +x

Answer
\[ \int \frac{5}{9+x^2 }\ dx = \left(\frac{5}{3}\right)\tan^{-1}\left(\frac{x}{3}\right)+c \nonumber \]

 Exercise 10:

1
f (x) =
2
(5x + 4 ) (7x + 9)

For problems 11-16 evaluate the definite integral.

 Exercise 11:

7.5.9 https://math.libretexts.org/@go/page/83956
10
2 −0.06t
∫ t e dt
0

Answer
\[ \int_0^{10} t^2 e^{-0.06t} dt \approx 214.03 \nonumber \]

 Exercise 12:
10
dt

1
t

 Exercise 13:
8

∫ (x − 1)(x − 8)dx
1

Answer
\[ \int_1^8(x-1)(x-8) dx \approx -57.167 \nonumber \]

 Exercise 14:
10
2 .05(10−t)
∫ t e dt
0

 Exercise 15:
2
2
−x
∫ e dx
0

Answer
\[ \int_0^2 e^{-x^2} dx \approx 0.882081 \nonumber \]

 Exercise 16:
16
1 2
−(x−10)
∫ −−e dx
9 √2π

For problems 17-20 do the initial value problem.

 Exercise 17:
′ 2
P (q) = −q + 3q + 5 and P (3) = 5. Find P (q)

Answer
\[ P(q)=\frac{1}{6} (-2q^3+9q^2+30q-87) \nonumber \]

 Exercise 18:
′ 2 −0.1t
F (t) = t e and F (10) = 2. Find F (t).

7.5.10 https://math.libretexts.org/@go/page/83956
 Exercise 19:
−−−−−−−−−
′ 2
P (q) = √ q + 5q + 7 and P (0) = 7. Find P (q).

Answer
\[ P(q) = (56 - 50 \sqrt{157} + (4q+10) \sqrt{7 + 5 q + q^2} \nonumber \]

−1
25 −1
5 + 2q
−3 sinh ( – ) + 3 sinh ( – ))/8
√3 √3

 Exercise 20:
′ 2 2
P (q) = −(q + 2q + 3 ) and P (10) = −7. Find P (q).

 Exercise 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?

Answer
\[ \int_0^7(5000+100t) (.98)^t dt\approx 34868.6 \nonumber \]

 Exercise 22:

My oil well is producing revenue at a rate of P (t) = 5000(0.09 ). I assume the present value of an asset decreases
t

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?

 Exercise 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.

Answer
We have maximal profit when \(MP(q)=0\text{,}\) or when \(q=e^8=2981\text{.}\)
Using WolframAlpha to solve the initial value problem we get
\[ P(q)=16(7q-700+75ln(100))-12q ln(q) \nonumber \]

P (2981) = 16(7 ∗ 2981 − 700 + 75ln(100)) − 12 ∗ 2981ln(2981) = 42021.7

 Exercise 24:
Our marginal cost function is M C (q) = 10q ln(q) and the startup costs are $23,000. Produce a cost function.

This page titled 7.5: Integration using Computer Algebra is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated
by Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history
is available upon request.

7.5.11 https://math.libretexts.org/@go/page/83956
7.6: The Normal Distribution- An extended numeric example
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 percentage getting a B, and so forth. Most college students are also
familiar with the ACT, SAT, or other standardized tests, where the grades 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.

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: Probability Density Function


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 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 function. The probability density function that is of most
interest to us is the normal distribution. The normal density function is given by
2
1 −(x − μ)
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
2
1 −(x − 70)
f (x) = −− exp( )
2
3 √2π 2∗3

7.6.1 https://math.libretexts.org/@go/page/83957
Thus finding the percentage of men less than 5 feet tall, reduces to evaluating 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: Cumulative Distribution Function

Given a probability density function, f (x), the related Cumulative Distribution Function, C DF f (x), is a function that
measures how much area is over the interval (−∞, x].
x
In calculus terms, C DF f (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.

 Example 7.6.1: Tall Men in an Area

Example7 6 1 Estimating big and tall p…


p…

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?
2
−(x−70)
Solution set up. My distribution function is 1
exp( 3
). Since I have a population of 100,000 and am interested in the
3 √2π 2∗3

men who are between 72 and 84 inches tall, my potential market is


84 2
1 −(x − 70)
100000 ∫ −− exp( )dx.
2
72 3 √2π 2∗3

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


14/3
1 2
100000 ∫ −− exp(−x /2)dx.
2/3 √2π

Solution
1, 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

7.6.2 https://math.libretexts.org/@go/page/83957
14/3
problem in terms of standard deviations. My potential market is 100000 ∫ 2/3
1

√2π
2
exp(−x /2)dx. I am ready to set up a Riemann
sum worksheet as we did in section 7.1

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.

Solution 1a, using Excel Statistics Commands: By this point in the course you should expect that if we claim a computation 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 cumulative 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.

7.6.3 https://math.libretexts.org/@go/page/83957
Solution 1b, 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.
84 2
1 −(x − 70)
100000 ∫ −− exp( )dx
2
72 3 √2π 2∗3

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.
a 0 a a

∫ SN D(x)dx = ∫ SN D(x)dx + ∫ SN D(x)dx = .5 + ∫ SN D(x)dx.


−∞ −∞ 0 0

 Example 7.6.2: Finding Short Women.

7.6.4 https://math.libretexts.org/@go/page/83957
Example7 6 2 Short women

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.
Solution
Using Excel and Riemann Sums: One advantage of having set up the first exercise well, it 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 normal 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 normal procedure is to divide the
population at the middle between the sizes.

 Example 7.6.3: Women's Shoes.

7.6.5 https://math.libretexts.org/@go/page/83957
Example7 6 3 Shoe sizes

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 distributed 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 distribution 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 probability 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 worksheet that is well documented and that can be easily modified by someone else asking
similar questions.
class="

Exercises: Normal Distribution Problems

 Exercise 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?

Answer

7.6.6 https://math.libretexts.org/@go/page/83957
a. \[ \hbox{pairs size 9}=10000\int_{8.75}^{9.25} \frac{1}{1.5\sqrt{2\pi}}e^{\left({\frac{-(x-9)^2}{2*1.5^2}}\right)}\
dx \nonumber \]

This page titled 7.6: The Normal Distribution- An extended numeric example is shared under a CC BY-NC-SA 4.0 license and was authored,
remixed, and/or curated by Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts
platform; a detailed edit history is available upon request.

7.6.7 https://math.libretexts.org/@go/page/83957
7.7: Applications of the Integral- Investment and Depreciation
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.
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 Funciton 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
F uelC onsumption(t) = 2 from t = 8 to t = 18. We need

18
18
∫ 2dt = |2t| = (2 ∗ 18) − (2 ∗ 8) = 20
8
8

gallons of fuel.

 Example 7.7.2: Accumulating Marginal Cost.

M arginalC ost(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 marginal cost. With this function we can easily find an antiderivative and evaluate. The change in cost is
80000 80000
2
q q ∣
∫ 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.

7.7.1 https://math.libretexts.org/@go/page/85474
 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) as t goes from 0 to 5. We can use our antidifferentiation formulas for this
t

problem.
5 t 5
2(0.85) ∣ 2
t 5
∫ 2(0.85 ) dt = ( )∣ = (0.85 − 1) = 6.846.
0 ln(0.85) ∣ ln(0.85)
0

Over 5 years, the well will produce 6.846 million barrels of oil.

 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+5 t thousand dollars per
year, where t is measured in years. To obtain current value, you are discounting at a rate of 6%/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 as t goes from 0 to 10. We set up
−0.06t

10
the integral ∫ (50 + 5t)e
0
dt. Since we do not know how to find the anti-derivative for this function, we find the area
−0.06t

either with Excel and Riemann sums, or with Wolfram Alpha.

7.7.2 https://math.libretexts.org/@go/page/85474
With either method, we find that the present value of the revenue stream to be $545,298.

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 continuously. 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 worthwhile to derive it again. We are told

P rincipal (time) = .05 ∗ P rincipal(time)

or

P rincipal (time)
= .05
P rincipal(time)

Integrating both sides with respect to time, we get

ln(P rincipal(time)) = .05 ∗ time + C

Exponentiating both sides gives


C .05∗time
P rincipal(time) = exp(0.05 ∗ time) ∗ exp(C ) = e e .

Since we know that the Principal is $20,000 at time 0, we see that e C


= 20000 and our equation simplifies to
.05∗time
P rincipal(time) = 20000 e .

This is the formula we took on faith in the last chapter.


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.

7.7.3 https://math.libretexts.org/@go/page/85474
Straight-line depreciation, which assumes that a piece of equipment loses the same amount of value each year until it is
worthless.
C ost of f ixed Asset − Residual V alue
Annual Depreciation Expense =
U sef ul lif e of Asset (in years)

The sum of digits method of depreciation. It assumes the rate of depreciation is proportional to the expected remaining 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 current 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:
−−−−−−−−−−−−−−−−
residual value
N
Depreciation rate = 1 − √
cost of f ixed 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.
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.

V alue(0) = 18000 and V alue(5) = 0.

Taking slope as rise over run, the slope is -3,600 and the intercept is 18,000. Thus our equation is

V alue(time) = 18000 − 3600 ∗ time.

V alue(3.5) = 5, 400.

Using calculus on the same problem we have



V alu e (time) = −k for some constant k,

V alue(0) = 18000 and V alue(5) = 0.

.
Integrating the first equation gives

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

7.7.4 https://math.libretexts.org/@go/page/85474
 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


2
V alue(time) = −k ∗ 5 ∗ t + k ∗ t /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


2
V alue(time) = −7, 200t + 720 t + 18000.

At 3.5 years the value will be


V alue(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 depreciation 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 5 we saw that proportional growth or decay give an exponential function. The basic value function is
time time
V alue(time) = 100000(1 − 2 ∗ .20 ) = 100000(0.6 ) .

However we need to find when the piece of equipment stops depreciating. Solving
time
10000 = 100000(0.6 ) .

we get

7.7.5 https://math.libretexts.org/@go/page/85474
time
.1 = (0.6 ) .

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.

class="

Exercises: Applications of the integral: Investment and depreciation Problems

 Exercise 1:

The marginal costs for producing widgets is


q
M arginal cost(q + 1) = 20 −
10000

Find the increase in cost in going from producing 60,000 units to producing 80,000 units.

Answer
\begin{align*} \hbox{increased cost}\amp=\int_{start}^{stop}\hbox{marginal cost}\ dq\\ \amp=\int_{60000}^{80000}(20-
\frac{q}{10000})\ dq\\ \amp=\left.(20q-\frac{q^2}{20000}\right|_{60000}^{80000})\ \\ \amp=1280000-1020000\\
\amp=260000 \end{align*}

 Exercise 2:

The marginal profit for producing gizmos is


2
q q
M arginal prof it(q + 1) = 200 − −
1000 100, 000, 000

Find the change in profit in going from producing 70,000 units to producing 90,000 units.

 Exercise 3:

The daily sales projections for a fad item are:


2 −t/5
Daily Sales(t) = 100t e

Find the estimated total sales over the first 100 days.

Answer

7.7.6 https://math.libretexts.org/@go/page/85474
We expect sales of about 25000 units.

 Exercise 4:
The daily sales projections for a new item are:
2
t
Daily Sales(t) = 100 + 10t −
100

Find the estimated total sales over the first 200 days.

 Exercise 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?

Answer

We expect 44,472 barrels of oil over the 6 years.

 Exercise 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?

 Exercise 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?

7.7.7 https://math.libretexts.org/@go/page/85474
Answer

We evaluate the revenue stram to be worth $603,982.

 Exercise 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.7: Applications of the Integral- Investment and Depreciation is shared under a not declared license and was authored, remixed, and/or curated
by LibreTexts.

7.7.8 https://math.libretexts.org/@go/page/85474
7.8: Economics Applications of the Integral
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 marginal 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.
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 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:

7.8.1 https://math.libretexts.org/@go/page/85475
qs

W illingness T o Spend = ∫ demand f unction(q)dq


0

qs

consumer expendature = ∫ ps dq
0

qs

consumersurplus = ∫ (demand f unction(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:
qs

N eeded revenue = ∫ supplyf unction(q)dq


0

qs

producer revenue = ∫ ps dq
0

q
s

producer surplus = ∫ (ps − supplyf unction(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:

supplyprice(quantity) = 4 + quantity

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

7.8.2 https://math.libretexts.org/@go/page/85475
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:
34

consumersurplus = ∫ ((106 − 2q) − 38)dq


0

34

producersurplus = ∫ (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
x x

producer surplus = ∫ ((106 − 2x) − (4 + q))dq = ∫ (102 − 2x − q)dq


0 0

x
2 2 2
q ∣ x 5x
= ((102 − 2x)q − )∣ = ((102 − 2x)x − = 102x −
2 ∣ 2 2
0

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 functions to be:

supplyprice(quantity) = 5 + ln(quantity + 10)

demandprice(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 producer surplus.
q
s

consumer surplus = ∫ (demand f unction(q) − ps )dq


0

7.8.3 https://math.libretexts.org/@go/page/85475
222

consumer surplus = ∫ ((10 + 100/(quantity + 2)) − 10.45)dq


0

qs

producer surplus = ∫ (ps − supply f unction(q))dq


0

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.

7.8.4 https://math.libretexts.org/@go/page/85475
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 p is demand f unction(q ) rather than supply f unction(q ).
s s s

If the quantity goes down too far the producer surplus 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 quantity 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 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.)

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.

7.8.5 https://math.libretexts.org/@go/page/85475
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.

7.8.6 https://math.libretexts.org/@go/page/85475
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.
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.

7.8.7 https://math.libretexts.org/@go/page/85475
Computationally,
1
1
∫ (x − L(x))dx
0
G= =2∫ (x − L(x))dx.
1
∫ xdx 0
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) = .8x 3
+ .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.
3
L(0.5) = (0.8)(0.5 ) + (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:
1
3 2 4 1
G=2∫ (x − 0.8 x − 0.2x)dx = (2)(0.4 x − 0.2 x )| = .4
0
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
0 20 40 60 80 90 100
%tile

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.

Then we evaluate the formulas.

7.8.8 https://math.libretexts.org/@go/page/85475
In percentages, the Gini index is approximated at 45.

Exercises: Business Applications of the Integral Problems


class="
For exercises 1-6, assume we have a free market and that goods are sold at market equilibrium. Find the consumer surplus,
producer surplus, and total social gain.

 Exercise 1:

SupplyP rice(q) = 50 + q/2 and DemandP rice(q) = 150 − q/5.

Answer
The two curve intersect at the point of market equilibrium, \(\left({\frac{1000}{7},\frac{850}{7}}\right)\text{.}\)
\[ ProducerSurplus= \int_0^{1000/7} \left({\frac{850}{7}}\right)- \left({50+\frac{x}{2}}\right)\ dx=5102.04 \nonumber \]

1000/7
x 850
C onsumerSurplus = ∫ (150 − )−( ) dx = 2040.82.
0
5 7

T otalSocialGaine = P roducerSurplus + C onsumerSurplus = 7142.86

 Exercise 2:
SupplyP rice(q) = ln(q + 10) and DemandP rice(q) = 100 − q.

 Exercise 3:
SupplyP rice(q) = 50(1 − (0.99 ) )
q
and DemandP rice(q) = 100(0.99) q
.

Answer
The two curve intersect at the point of market equilibrium, \((109.31, 33.33)\text{.}\)
\[ ProducerSurplus= \int_0^{109.31} (33.33)- \left({50(1-(0.99)^q)}\right)\ dx=1494.79 \nonumber \]

109.31
q
C onsumerSurplus = ∫ (100(0.99 ) ) − 33.33) dx = 2989.58.
0

T otalSocialGaine = P roducerSurplus + C onsumerSurplus = 4484.37

 Exercise 4:

SupplyP rice(q) = 50(1 − (0.95)


q/10
and DemandP rice(q) = 150(0.95) q/10
.

 Exercise 5:

7.8.9 https://math.libretexts.org/@go/page/85475
5 q ≤ 10
SupplyP rice(q) = {
2
q /20 q > 10

and

100 q ≤ 10
DemandP rice(q) = {
110 − q q > 10

Answer
The two curve intersect at the point of market equilibrium, (37.958, 72.042).
37.958

P rodSurplus = ∫ (72.042) − (SupplyP rice(q)) dx = 1789.732.


0

The integral needs to be done in two parts with the break at 10.
37.958

C onsSurplus = ∫ DemandP rice(q) − 72.042 dx = 670.405.


0

T otalSocialGain = P rodSurplus + C onsSurplus = 2460.137.

 Exercise 6:

SupplyP rice(q) = q/2 and


200 q ≤ 10
DemandP rice(q) = {
q/10
250 ∗ .8 q > 10

 Exercise 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.
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.

Answer
a. The two curve intersect at the point of market equilibrium, \((70, 100)\text{.}\)
\[ ProdSurplus= \int_0^{70} (100)- (30+q)\ dx=2450. \nonumber \]

70

C onsSurplus = ∫ (170 − q) − 100 dx = 2450.


0

T otalSocialGain = P rodSurplus + C onsSurplus = 4900.

7.8: Economics Applications of the Integral is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

7.8.10 https://math.libretexts.org/@go/page/85475
Index
I L
implicit differentiation logarithmic model
5.1: Implicit Differentiation 1.2: Functions in the Business Setting

1 https://math.libretexts.org/@go/page/83961
Glossary
Sample Word 1 | Sample Definition 1

1 https://math.libretexts.org/@go/page/83962
Detailed Licensing
Overview
Title: Business Calculus with Excel (May and Bart)
Webpages: 50
Applicable Restrictions: Noncommercial
All licenses found:
CC BY-NC-SA 4.0: 90% (45 pages)
Undeclared: 10% (5 pages)

By Page
Business Calculus with Excel (May and Bart) - CC BY-NC- 4.2: Derivative Rules for Combinations of Functions -
SA 4.0 CC BY-NC-SA 4.0
Front Matter - CC BY-NC-SA 4.0 4.3: The Chain Rule - CC BY-NC-SA 4.0
TitlePage - CC BY-NC-SA 4.0 4.4: Differentiation Using Computer Algebra - CC
InfoPage - CC BY-NC-SA 4.0 BY-NC-SA 4.0
Table of Contents - Undeclared 5: Differentiation Techniques and Applications - CC BY-
Licensing - Undeclared NC-SA 4.0
1: Functions Graphs and Excel - CC BY-NC-SA 4.0 5.1: Implicit Differentiation - CC BY-NC-SA 4.0
5.2: Related Rates - CC BY-NC-SA 4.0
1.1: Linear Functions and Models - CC BY-NC-SA 4.0
5.3: Elasticity - CC BY-NC-SA 4.0
1.2: Functions in the Business Setting - CC BY-NC-
SA 4.0 6: Functions of Several Variables - CC BY-NC-SA 4.0
1.3: Introduction to Excel Spreadsheets - CC BY-NC- 6.1: Evaluating and Graphing Functions of Several
SA 4.0 Variables - CC BY-NC-SA 4.0
1.4: Graphing Functions with Excel - CC BY-NC-SA 6.2: Wire Frames, Partial Derivatives, and Tangent
4.0 Planes - CC BY-NC-SA 4.0
1.5: Using Excel to find Best-Fit Curves - CC BY-NC- 6.3: Critical Points and Extrema - CC BY-NC-SA 4.0
SA 4.0 6.4: Optimization and Best Fitting Curves - CC BY-
1.6: Finding Numerical Solutions with Goal Seek - NC-SA 4.0
CC BY-NC-SA 4.0 7: Integration - CC BY-NC-SA 4.0
2: Business Applications - CC BY-NC-SA 4.0 7.1: Approximating Definite Integrals as Sums - CC
2.1: Market Equilibrium Problems - CC BY-NC-SA BY-NC-SA 4.0
4.0 7.2: The Fundamental Theorem of Calculus - CC BY-
2.2: Nonlinear Functions - CC BY-NC-SA 4.0 NC-SA 4.0
2.3: Modeling Revenue, Costs, and Profit - CC BY- 7.3: Basic Antidifferentiation - CC BY-NC-SA 4.0
NC-SA 4.0 7.4: Integration by Change of Variables or
3: Rate of Change and Derivatives - CC BY-NC-SA 4.0 Substitution - CC BY-NC-SA 4.0
3.1: Marginal Functions and Difference Quotients - 7.5: Integration using Computer Algebra - CC BY-
CC BY-NC-SA 4.0 NC-SA 4.0
3.2: Numeric Derivatives and Limits - CC BY-NC-SA 7.6: The Normal Distribution- An extended numeric
4.0 example - CC BY-NC-SA 4.0
3.3: Local Linearity - CC BY-NC-SA 4.0 7.7: Applications of the Integral- Investment and
3.4: Optimization - CC BY-NC-SA 4.0 Depreciation - Undeclared
3.5: An Introduction to Solver - CC BY-NC-SA 4.0 7.8: Economics Applications of the Integral -
Undeclared
4: Symbolic Differentiation - CC BY-NC-SA 4.0
Back Matter - CC BY-NC-SA 4.0
4.1: Elementary Derivatives - CC BY-NC-SA 4.0
Index - CC BY-NC-SA 4.0
Glossary - CC BY-NC-SA 4.0

1 https://math.libretexts.org/@go/page/115376
Detailed Licensing - Undeclared

2 https://math.libretexts.org/@go/page/115376

You might also like