Integration

advertisement
Solver
• Finding maximum, minimum, or value by
changing other cells
• Can add constraints
• Don’t need to “guess and check”
1
Solver
2
Using Solver. Excel’s Solver
Using Solver, Excel’s Solver
1. EXCEL’S SOLVER
The utility Solver is one of Excel’s most useful tools for business
analysis. This allows us to maximize, minimize, or find a predetermined value
for the contents of a given cell by changing the values in other cells.
Moreover, this can be done in such a way that it satisfies extra constraints that
we might wish to impose.
Example 1. The size limitations on boxes shipped by your plant are
as follows. (i) Their circumference is at most 100 inches. (ii) The sum of their
dimensions is at most 120 inches. You would like to know the dimensions of
such a box that has the largest possible volume. Let H, W, and L be the
height, width, and length of a box; respectively; measured in inches. We wish
to maximize the volume of the box, V = HWL, subject to the limitations that
the circumference C = 2H + 2W  100 and the sum S = H + W + L  120.
This problem is set up in the Excel file Shipping.xls. We will outline
its solution with screen captures and directions. First, enter any reasonable
values for the dimensions of the box in Cells B7:D7.
Shipping.xls
(material continues)
T
C
I
3

Using
Solver, Solver
Using Solver.
Excel’s
Solver: page 2
FRAGILE
Crush slowly
H
L
To use Solver, click on Data, then
Solver in the Analysis box. In older
versions of Excel select Tools in the main
Excel menu, then click on Solver.
Enter cell that computes volume.
Select Max.
Enter cells that contain
dimensions
Click on Add.
Computer Problem?
Shipping.xls
(material continues)

T
C
I
4

Using Solver,
Solver Solver: page 3
Using Solver.
Excel’s
The requirement that the circumference be at most 100 inches is
called a constraint. We want to have the contents of Cell E7 be at most 100.
Enter cell that computes circumference.
Select <=.
Click on OK.
Enter the limiting number.
Repeat the above process to add the constraint F7 <= 120, then click
on Solve.
Shipping.xls
(material continues)

T
C
I
5

Using Solver,
Solver
Using Solver.
Excel’s
Solver: page 4
Click on Solve.
Click on Keep Solver Solution.
Click on OK.
Shipping.xls
(material continues)

T
C
I
6

UsingUsing
Solver.
Excel’s Solver: page 5
Solver, Solver
The dimensions that maximize
volume are now shown in Cells B8:D8. The maximum volume, the value of
the circumference and the sum of the dimensions are now displayed. For a
maximum volume of 43,750 cubic inches, the box should be 25 inches high,
25 inches wide, and 70 inches long.
In rare cases; such as very large or small initial values of H, W, or L;
you may need to add the constraints B7 >= 0, C7 >= 0 and D7 >= 0.
Shipping.xls
(material continues)

T
C
I
7

UsingUsing
Solver.
Solver: page 6
Solver, Excel’s
Solver
Show ex3-sep14-shipping.xls
Rush! shipping company limits the size of the
boxes that it accepts by limiting their volume to at most 16 cubic feet
(27,648 cubic inches). For it to ship a box, each dimension must be between
3 and 54 inches. (i) Modify Shipping.xls and use Solver to find the
dimensions of a Rush! box which will accept the longest possible item.
Hint: Use different initial values for each dimension. (ii) What is the
maximum length of such an item? Note that the longest item which can be
shipped in a box has a length of
H 2  W 2  L2 .
Shipping.xls
(material continues)

T
C
I
8

Solver
• Sensitive to initial value
• Use graphical approximation to help solve
project
• Use to verify/solve Questions 1 - 3
• Use to solve Questions 6 - 8
9
Integration
• Revenue as an area under Demand function
• Rq   q  Dq 
Demand Function
D(q)
D(q)
Revenue
q
-1.2
-10
q
10
Integration
• Total possible revenue- The total possible revenue is the money that
the producer would receive if everyone who wanted the good, bought it at the maximum
price that he or she was willing to pay. This is the greatest possible revenue that a seller or
producer could obtain when operating with a given demand function
Demand Function
Total Possible
Revenue
-1.2
-8
11
Integration
• Consumer surplus – revenue lost by charging less/ Some buyers would have
been willing pay a higher price for the good than we charged. The total extra amount of money
that people who bought the good would have paid is called the consumer surplus
• Producer surplus – revenue lost by charging more/ some potential customers do
not buy the good, because they feel that the price is too high. The total amount of this lost
income, which we will call not sold, is represented by the area of the region under the graph of
the demand function to the right of the revenue rectangle.
Consumer
Surplus
Demand Function
D(q)
Revenue
Not
Sold
-1.2
12
q
Integration
• Approximating area under graph
- estimating areas of rectangles (by hand)
- Using Midpoint Sums.xls (using Excel)
- Using Integrating.xls (using Excel)
13
Integration
• Approximating area (Midpoint Sums)
- Notation S n  f , a, b
- Meaning
S n : sum with n rectangles
f : function given
a, b : interval given
14
Integration
• Approximating area (Midpoint Sums)
- Process
Find endpoints of each subinterval
x0 , x1 , x2 , x3 , ..., xn
Find midpoint of each subinterval
m1 , m2 , m3 , ..., mn
15
Integration
• Approximating area (Midpoint Sums)
- Process (continued)
Find function value at each midpoint
f m1 , f m2 , f m3 , ..., f mn 
Multiply each f mi  by x and add them all
f m1  x  f m2  x  f m3  x  ...  f mn  x
S n  f , a, b
This sum is equal to
16
Integration
• Approximating area (Midpoint Sums)
Ex1. DetermineS  f , 0, 1.5
3
.
x0  0
x1  0.5
x 2  1 .0
x 3  1.5
m1  0.25
where
f x   6 x  4 x 2
m2  0.75
m3  1.25
17
Integration
• Approximating area (Midpoint Sums)
Ex1. (Continued)
S 3  f , 0, 1.5  f m1   x  f m2   x  f m3   x
 f 0.25  0.5  f 0.75  0.5  f 1.25  0.5
 1.25  0.5  2.25  0.5  1.25  0.5
 2.375
18
=6*x-4*x^2
Integration
Approximating area (Midpoint Sums.xls)
Ex1. (Continued)
19
20
21
EXAMPLE 2 - Modify sheet n = 20 in Area Example.xls,
so that it computes the sum S100(f, [0, 4]), with 100 subintervals, for f(x) = 2x 
x2/2.
•
•
Show
ex2-n-100Area
Example.xlsm
22
Integration
• Approximating area (Integrating.xls)
- File is similar to Midpoint Sums.xls
- Notation:
b
a
f  x  dx
or

b
a
f t  dt
or …
23
Integration
show ex3-Integrating.xlsm
• Approximating area (Integrating.xls)
Ex3. Use Integrating.xls to compute

4
1
1
6
e
x / 6
dx
24
Integration
Approximating area (Integrating.xls)
25
Integration
• Approximating area (Integrating.xls)
Ex3. (Continued)
4
x / 6
e
So 1
. Note that
is the
p.d.f. of an exponential random variable with
parameter   6 . This area could be calculate
using the c.d.f. function FX b  FX a.
1
6
e
x / 6
dx  0.3331
1
6
26
Integration
• Approximating area (Integrating.xls)
Ex3. (Continued)
FX b   FX a   Fx 4   FX 1

 

 1  e  4 / 6  1  e 1 / 6
 0.486582881  0.1535182751
 0.3331
27
Integration
• Approximating area
- Values from Midpoint Sums.xls can be positive,
negative, or zero
- Values from Integrating.xls can be positive,
negative, or zero
28
Integration, Applications
Integration.
Applications: page 6
Revenue computations for an arbitrary demand function work in the
same way as those for the buffalo steak dinners.
Let D(q) give the price per unit for a good,that would result in the sale
of q units, and let qmax be the maximum number of units that could be sold at
any price. That is, D(qmax) = 0. The total possible revenue is given by
Total Possible

Revenue
qmax
 D(q) dq.
0
If qsold units are sold, then the revenue will be qsoldD(qsold). The
following formulas give consumer surplus and lost revenue from units not
sold.
Consumer 
Surplus
q sold

D(q ) dq  q sold  D(q sold )
Not 
Sold
0
qmax
 D(q) dq
q sold
It is clear that
revenue + consumer surplus + not sold = total possible revenue.
(material continues)

T
C
I

Integration
• Ex4. Suppose a demand function was found to
be
Dq   .0001392q 2  0.225q  321.196
. Determine
the consumer surplus at a quantity of 400 units
produced and sold.
30
revenue + consumer surplus at 400 units
31
Integration
• Ex. (Continued)
Calculate Revenue at 400 units
Rqsold   qsold  D(qsold )
Rq   q  Dq 
 400  D400
 400  208.924
 $83569.60
32
Integration
• Ex. (Continued)
Consumer
Surplus
qsold
 {  D(q) dq}  q sold  D(q sold )
0
$107,508.80 – $83,569.60 = $23,939.20
So, the consumer surplus is $23,939.20
33
Integration.
Evaluation: page 6
Integration, Evaluation
The study of differentiation and integration is called calculus. It is
evident that a relationship between these two branches of calculus is a major
accomplishment.
First Fundamental Theorem of Calculus
Let f and F be well behaved functions (continuous in the sense
defined in the Help Me Understand link on page 82) that are defined on
the closed interval [a, b]. Assume that f is the derivative of F on the open
interval (a, b). In this case,
b
 f ( x ) dx  F (b)  F (a ).
a
The expression F(b)  F(a) is given a standard notation.
F (b)  F (a )  F ( x ) a .
b
This is read as “F(x) evaluated from a to b.”
(material continues)

T
C
I

FORMULAS
Integration.
Integration, Evaluation
Evaluation: page 13
If the First Fundamental Theorem of Calculus is to be of any use in
business problems, we must be able to find antiderivatives. The only available
tools come from what we know about differentiation. Every differentiation
formula translates into a formula for antidifferentiation. We will start with
our four rules for the differentiation of specific types of functions.
Differentiation
Antidifferentiation
d u
x  u  x u 1
dx
x u 1
x dx 
C
u 1

u
d x
e  ex
dx

e x dx  e x  C
d
1
ln x 
dx
x

1
dx  ln x  C
x
(material continues)

T
C
I

Integration. Evaluation:
page 14
Integration, Evaluation
Differentiation formulas that allowed us to split up functions into
smaller parts yield antidifferentiation formulas that can be used to split up
indefinite integrals. Suppose that a is a constant and that both f and g are
differentiable functions with antiderivatives.
Differentiation
Antidifferentiation
d
d
a  f ( x)  a 
f ( x)
dx
dx
 a  f ( x) dx  a  f ( x) dx
d
 f ( x)  g ( x)   d f ( x)  d g ( x)
dx
dx
dx
 f ( x)  g ( x) dx  f ( x) dx   g ( x) dx
Products of functions do not work well with
differentiation or antidifferentiation.
d
 f ( x)  g ( x)   d f ( x)  d f ( x), so
dx
dx
dx
(material continues)
 f ( x)  g ( x) dx  f ( x) dx   g ( x) dx.

T
C
I

Integration, Evaluation
Integration.
Evaluation: page 21
Integral Additivity. If a function f
is integrable on some closed interval
containing the numbers a, b, and c (in any
order), then all three of the following
integrals exists and
0
a
1
b
c
(material continues)
c
b
c
a
a
b
 f ( x ) dx   f ( x ) dx   f ( x ) dx.

T
C
I

Download