Calculus Review Session
Brian Prest Duke University Nicholas School of the Environment August 18, 2017
Calculus Review Session Brian Prest Duke University Nicholas - - PowerPoint PPT Presentation
Calculus Review Session Brian Prest Duke University Nicholas School of the Environment August 18, 2017 Topics to be covered 1. Functions and Continuity 2. Solving Systems of Equations 3. Derivatives (one variable) 4. Exponentials and
Brian Prest Duke University Nicholas School of the Environment August 18, 2017
Topics to be covered
2
***Please ask questions at any time!
Functions, continuous functions
β Mathematical relationship between variables
β Each input (x) is related to one and only one
β Easy graphical test: does an arbitrary vertical
4
Functions, continuous functions
5
Yes! Yes! Yes! No! No! Yes!
π§ = 0.5π¦ + 2 π§ = |π¦|
π§ = 1 πππ 0 β€ π¦ < 1 2 πππ 1 β€ π¦ < 3 3 πππ π¦ β₯ 3
π¦2 + π§2 = 1 |π§| = π¦ π§ = 3
Functions, continuous functions
β No holes, skips, or jumps β Intuitive test: can you draw the function without
6
Functions, continuous functions
7
Yes! Yes! No! (not a function) Yes!
π§ = 0.5π¦ + 2 π§ = |π¦|
π§ = 1 πππ 0 β€ π¦ < 1 2 πππ 1 β€ π¦ < 3 3 πππ π¦ β₯ 3
π¦2 + π§2 = 1 |π§| = π¦ π§ = 3
No! No! (not a function)
Solving systems of linear equations
β If # equations = # unknowns, unique solution might be possible
Example:
A. π§ = π¦ B. π§ = 2 β π¦ Answer: π¦ = 1, π§ = 1 β If # equations < # unknowns, no unique solution. Example:
β If # equations > # unknowns, generally no solution that satisfies
all of them. Example:
9
Economics Example: Algebraic Approach
β 2 β ππ πππ = 4 β 2 β ππ πππ β 4 β ππ πππ = 4 β ππ πππ = 1
β π π‘π£ππππππ = 2 β ππ πππ = 2 β π ππππππππ = 4 β 2 β ππ πππ = 2
Economics Example: Graphical Approach
1.
Supply: π π‘π£ππππππ = 2 β ππ πππ
2.
Demand: π ππππππππ = 4 β 2 β ππ πππ
3.
βMarket Clearingβ: π π‘π£ππππππ = π ππππππππ
β
(1) becomes ππ πππ =
1 2 π π‘π£ππππππ
β
(2) becomes ππ πππ =
1 β2 (π ππππππππ β 4) = 2 β 1 2 π ππππππππ
0.5 1 1.5 2 2.5 1 2 3 4 5 Price Quantity
Demand Supply
Ξπ Ξπ¦
Differentiation, also known as taking the derivative (one variable)
the rate of change of the function.
β Often denote it as:
πβ² π¦ or
π ππ¦ π(π¦) or ππ ππ¦
β Be comfortable using these
interchangeably
derivative (at a particular point) as the slope of the tangent line at that point.
β If there is a small change in x,
how much does f(x) change?
13
Differentiation, also known as taking the derivative (one variable)
(if π§ = ππ¦ + π, then
ππ§ ππ¦ = π)
function of x.
14
Linear Function π(π¦) = 2π¦ β 2 Non-Linear Function π π¦ = βπ¦2 + 5π¦ β 2
Differentiable functions
derivative at that point.
β Algebraic test: if you know the equation and can solve for the derivative β Graphical test: βslope of tangent line of points from the left is approaching
the same value as slope of the tangent line of the points from the rightβ
β Intuitive graphical test: βAs I zoom in, does the function tend to become a
straight line?β
β That is, everywhere in the domain. If not stated, then negative to positive
infinity.
β However, a function can be continuous and not differentiable! (e.g., π§ = |π¦|)
β When a function is differentiable, we can use all the power of calculus.
15
Functions, continuous functions
16
Yes! No! No! (not a function) Yes!
π§ = 0.5π¦ + 2 π§ = |π¦|
π§ = 1 πππ 0 β€ π¦ < 1 2 πππ 1 β€ π¦ < 3 3 πππ π¦ β₯ 3
π¦2 + π§2 = 1 |π§| = π¦ π§ = 3
No! No! (not a function)
Rules of differentiation (one variable)
β π§ = ππ¦π β ππ§
ππ¦ = πππ¦πβ1
β E.g., π§ = 2π¦3 β ππ§
ππ¦ = 6π¦2
β π§ = π β ππ§
ππ¦ = 0
β E.g., π§ = 3 β
ππ§ ππ¦ = 0
β π§ = π π π¦
β ππ§
ππ¦ = ππ ππ ππ ππ¦
β E.g., π§ = 1 + 7π¦ 2 β ππ§
ππ¦ = 2 1 + 7π¦ β 7 = 14 + 98π¦
β π π(π¦) = π(π¦)2
π π¦ = 1 + 7π¦
17
Rules of differentiation (one variable)
β π§ = π π¦ + π π¦ β ππ§
ππ¦ = ππ ππ¦ + ππ ππ¦
β E.g., π§ = 2π¦ + π¦3 β ππ§
ππ¦ = 2 + 3π¦2
β π§ = π π¦ β π π¦ β ππ§
ππ¦ = ππ ππ¦ π π¦ + ππ ππ¦ π π¦
β E.g., π§ = π¦2 3π¦ + 1 β ππ§
ππ¦ = 2π¦ 3π¦ + 1 + 3π¦2 = 9π¦2 + 2π¦
β π§ = π π¦
π π¦ β ππ§ ππ¦ =
ππ ππ¦π π¦ β ππ ππ¦π π¦
π π¦ 2
β E.g., π§ =
π¦2 3π¦+1 β ππ§ ππ¦ = 2π¦ 3π¦+1 β3π¦2 3π¦+1 2
18
Second, third and higher derivatives
againβ¦)
exponents) reduce to zero, eventually
β π§ = π¦2 β First derivative = 2π¦ β Second derivative = 2 β Third derivative = 0
19
Exponents and logarithms (logs)
decay
β half-life of radioactive materials in the environment β growth of a population in ecology β effect of discount rates on investment in energy-efficient lighting
multiplication:division π§ = ππ¦ β logπ π§ = π¦
2.71828182846β¦).
β We write this as βlnβ: ln π¦ = logπ π¦.
β Important! In Excel, LOG() is base 10 and LN() is natural log
21
Rules of logarithms
β log of exponential function (more generally): ln ππ π¦ = π(π¦)
β More generally, πln β π¦ = β(π¦)
π¦ π§ = ln π¦ β ln π§
β E.g., ln π¦2 = 2ln(π¦)
22
Derivatives of logarithms
ππ¦ ln π¦ = 1 π¦. This is just a rule. You have to memorize it.
π ππ¦ ln 2π¦?
β Chain Rule:
π ππ¦ ln 2π¦ = 1 2π¦ 2 = 1 π¦
β Or, use the fact that ln 2π¦ = ln 2 + ln π¦ and take the derivative of
each term. (Simpler.)
β Also, this means
π ππ¦ ln ππ¦ = π ππ¦ ln π + ln π¦ = 1 π¦
π ππ¦ ln π(π¦), where g(x) is any function of x, use the Chain
Rule.
ππ¦ π¦
23
Derivatives of exponents
ππ¦ ππ¦ = ππ¦. This is just a rule. You have to memorize it.
π ππ¦ π2π¦?
β To solve, rewrite so that π π(π¦) = ππ(π¦) and π π¦ = 2π¦. β The Chain Rule tells us that
π ππ¦ π π π¦
=
ππ ππ ππ ππ¦.
ππ = ππ(π¦) and ππ ππ¦ = 2
ππ¦ π π π¦
=
ππ ππ ππ ππ¦ = ππ(π¦) β 2 = 2π2π¦
ππ¦ ln(π¦) is the growth as a percentage,
ππ¦ grows at a rate proportional to its current value
β E.g., if a population level is given by π§ = 100π0.05π’, where π’ is time
in years, then:
β
ππ§ ππ’ = 0.05 β 100π0.05π’ = 0.05π§, so it is growing at a rate of 5%.
24
Why Exponentials and Logs?
β Interest rates (for borrowing or investment) β Decomposition of radioactive materials β Growth of a population in ecology
constant, depending on π .
β Intuitive: faster rate of increase or decay.
25
Partial and total derivatives
π§ = π(π¦): one input variable and one output.
β E.g., π π¦, π§, π¨ = π¦2π§3 β 2π¦π¨ β Demand for energy-efficient appliances depends on income
and prices
β Growth of a prey population depends on natural
reproduction rate, rate of growth of predator population, environmental carrying capacity for prey
β Forest size depends on trees planted, trees harvested,
natural growth rates, etc.
variable given a small change in the input variable, with
27
Guidelines for partial derivatives
ππ ππ¦ , ππ ππ§, etc. (βcurly dβ)
constant
β If a term has x in it, take the derivative with respect to x. β If a term does not have x in it, it's a constant with respect to x. β The derivative of a constant with respect to x is zero.
β
π = π¦2π§3 + 2π¦ + π§ β
ππ ππ¦ = 2π¦π§3 + 2 ππ ππ§ = π¦2 β 3π§2 + 1
β π¨ = π¦2π§5 + 2π¦π§3 β
ππ¨ ππ¦ = 2π¦π§5 + 2π§3 ππ¨ ππ§ = π¦2 β 5π§4 + 2π¦ β 3π§2
28
Guidelines for partial derivatives
π ππ¦, then π ππ§
β Denoted π
ππ§ ππ ππ¦ or π2π ππ§ππ¦
β βHow does the ππ
ππ¦ slope change as y changes?β
β That is, you could take
π ππ§ first and then take
π ππ¦ of the result:
β π = π¦2π§3 + 2π¦
β
ππ ππ¦ = 2π¦π§3 + 2 ππ ππ§ = π¦2 β 3π§2
β
π ππ§ ππ ππ¦ = 2π¦ β 3π§2 β π ππ¦ ππ ππ§ = 2π¦ β 3π§2
29
Total derivatives / differentials
variables
β Economics Example: π π¦, π§ = ππ ππππ’π‘, π₯βππ π π¦ = ππ πππ, π§ =
#ππ£π‘π’ππππ π‘
#customers constant?
for resulting loss in customers? β More general example: both x and y are changing over time, so
doesnβt make sense to hold one constant
change in that variable
ππ ππ¦ ππ¦ + ππ ππ§ ππ§
30
Integration
line)
differentiation
β Just like addition is inverse of subtraction β Just like exponents are inverse of logarithms β Thus: the integral of the derivative is the original function plus a
constant of integration. Or,
32
ππ ππ¦
Integration
start with a function representing a change in something
β Location, when starting with speed β Value of natural capital stock (e.g., forest) when we have a
function representing its growth rate
β Total demand when we start with marginal demand β Numerous applications in statistics, global climate change, etc.
constant (thus, the constant of integration)
β Example: π
ππ¦ π¦2 + 4000 = 2π¦
β Also, π
ππ¦ π¦2 β 30 = 2π¦
β So we write β« 2π¦ ππ¦ = π¦2 + π, where c is any constant.
33
Rules of integration (one variable)
β β« π¦πππ¦ =
1 π+1 π¦π+1 + π
β E.g., β« π¦2ππ¦ = 1
3 π¦3 + π
β β« πππ¦ = ππ¦ + π
β β« ππ¦ππ¦ = ππ¦ + π
β β«
1 π¦ ππ¦ = ln π¦ + π
34
β β« π π¦ + π π¦
ππ¦ = β« π π¦ ππ¦ +β« π π¦ ππ¦
β β« ππ(π¦)ππ¦ = πβ« π π¦ ππ¦
Indefinite vs. Definite integrals
reverse of differentiation
β
β«
ππ ππ¦ ππ¦ = π π¦ + π
β
E.g., β« π¦2ππ¦ =
1 3 π¦3 + π
β This function would give us the area under the curve β β¦ but as a function, not a number
two points
β
β«
π π ππ ππ¦ ππ¦ = π π β π(π)
β And so we should get a number β β¦ or a function, in a multivariate context (but we won't talk about that today)
β
βHow far did we move between 1pm and 2pm?β
35
Definite integrals
β Compute the indefinite integral β Drop the constant of integration β Evaluate the integral at the upper limit of integration β Evaluate the integral at the lower limit of integration β Calculate the difference: (upper β lower)
β β«
2 6(3π¦2 + 2)ππ¦
β Indefinite integral: π¦3 + 2π¦
(without constant of integration)
β Evaluate this at the upper limit: 63 + 2 β 6 β Evaluate this at the lower limit: 23 + 2 β 2 β Take the difference: (63 + 2 β 6) β (23 + 2 β 2) = 228 β 12 = πππ β In math notation: β«
2 6(3π¦2 + 2)ππ¦ =
| π¦3 + 2π¦
2 6 = πππ
36
Optimization: Finding minimums and maximums
ππ§ ππ¦ > 0: function is increasing ππ§ ππ¦ < 0: function is decreasing
ππ¦ = 0?
Β» This is a "critical point"
38
Procedure for finding minimums and maximums
β Where does first derivative equal zero? β These are candidate points for min or
max (βcritical pointsβ)
β
ππ ππ¦ = β2π¦ + 5 β 0 β π¦ = 5 2 = 2.5
β Use second derivatives to determine
how the change is changing
β Minimum:
ππ§ ππ¦ = 0 and π2π§ ππ¦2 > 0
β Maximum:
ππ§ ππ¦ = 0 and π2π§ ππ¦2 < 0
β See technical notes on next slide. β Ex:
π2π π2π¦ = β2 < 0 β Maxiumum
39
Finding minimums and maximums (technical notes)
ππ¦ = 0 is a necessary condition for a min or max.
(In order to a point to be a min or max, ππ§
ππ¦ must be zero.)
ππ¦2 > 0 is a sufficient condition for a minimum, and π2π§ ππ¦2 < 0 is a
sufficient condition for a maximum.
β But, these are not necessary conditions. β That is, there could be a minimum at a point where
π2π§ ππ¦2 = 0.
β This is a technical detail that you almost certainly donβt need to
know until you take higher-level applied math.
β For a good, quick review of necessary and sufficient conditions,
watch this 3-minute video: https://www.khanacademy.org/partner- content/wi-phi/critical-thinking/v/necessary-sufficient-conditions
40
Inflection points
ππ§ ππ¦ = 0 and π2π§ ππ¦2 = 0
β Technical:
π2π§ ππ¦2 = 0 is a necessary but not sufficient condition for inflection
point
β Just know that an inflection point is where ππ§
ππ¦ = 0 but the point is not a min
β For more information I recommend:
41
Further resources
upwards; algebra, calculus)
http://www.wolframalpha.com/
β Often useful for checking intuition or calculations β Excellent way to get a quick graph of a function
42