Professional Documents
Culture Documents
Level Up Calculus
Level Up Calculus
Calculus
Morris Alper
● Motivation
● Limits
● Continuity
● Derivatives
● Integrals (Antiderivatives)
● Bonus: Taylor Series
● Bonus: Partial Derivatives
● Further Reading
Motivation
Motivation
Example: Joe decides to leave home, so he enters his car and begins driving.
Motivation
Example: Joe decides to leave home, so he enters his car and begins driving.
Motivation
Example: Joe decides to leave home, so he enters his car and begins driving.
● How can we calculate an object’s velocity given its position over time?
(derivative)
● How can we calculate an object’s position given its velocity over time?
(integral / antiderivative)
This is useful for almost any problem which deals with changing quantities,
which is common in data science.
Limits
Limits
𝑓 5 = 6.5
𝑓 10 = 5.66 …
𝑓 25 = 5.25
lim 𝑓 𝑥 = 5
𝑥→∞
Limits
𝑓 1 = 0.841 …
𝑓 0.5 = 0.958 …
𝑓 0.1 = 0.998 …
lim 𝑓 𝑥 = 1
𝑥→0
Limits
Informally:
Illustration of
lim 𝑓 𝑥 = 𝐿
𝑥→𝑐
Examples:
lim 𝑥 2 + 5 = ?
𝑥→2
Limits
Examples:
lim 𝑥 2 + 5 = 22 + 5 = 9
𝑥→2
Limits
Examples:
lim 𝑥 2 + 5 = 22 + 5 = 9
𝑥→2
𝑥 2 +𝑥
lim =?
𝑥→0 𝑥
Limits
Examples:
lim 𝑥 2 + 5 = 22 + 5 = 9
𝑥→2
𝑥 2 +𝑥
lim = lim (𝑥 + 1) = 1
𝑥→0 𝑥 𝑥→0
Limits
Examples:
lim 𝑥 2 + 5 = 22 + 5 = 9
𝑥→2
𝑥 2 +𝑥
lim = lim (𝑥 + 1) = 1
𝑥→0 𝑥 𝑥→0
1
lim =?
𝑥→0 𝑥
Limits
Examples:
lim 𝑥 2 + 5 = 22 + 5 = 9
𝑥→2
𝑥 2 +𝑥
lim = lim (𝑥 + 1) = 1
𝑥→0 𝑥 𝑥→0
1
lim = (undefined)
𝑥→0 𝑥
goes to ±∞ at 𝑥 = 0
Limits
2𝑒 𝑥
lim =?
𝑥→∞ 𝑒 𝑥 +1
Limits
2𝑒 𝑥 2
lim = lim =2
𝑥→∞ 𝑒 𝑥 +1 𝑥→∞ 1+𝑒 −𝑥
Limits
𝑓(𝑥) 0 ±∞
L'Hôpital's rule: If approaches or as 𝑥 approaches 𝑐,
𝑔(𝑥) 0 ±∞
𝑓(𝑥) 𝑓′(𝑥)
then lim = lim (using the derivative, which we will define soon)
𝑥→𝑐 𝑔(𝑥) 𝑥→𝑐 𝑔′(𝑥)
Examples:
3𝑥 2 + 4 (3𝑥 2 + 4)′ 6𝑥
lim = lim = lim = lim 3 = 3
𝑥→∞ 𝑥 2 − 1 𝑥→∞ (𝑥 2 −1)′ 𝑥→∞ 2𝑥 𝑥→∞
Limits
𝑓(𝑥) 0 ±∞
L'Hôpital's rule: If approaches or as 𝑥 approaches 𝑐,
𝑔(𝑥) 0 ±∞
𝑓(𝑥) 𝑓′(𝑥)
then lim = lim (using the derivative, which we will define soon)
𝑥→𝑐 𝑔(𝑥) 𝑥→𝑐 𝑔′(𝑥)
Examples:
3𝑥 2 + 4 (3𝑥 2 + 4)′ 6𝑥
lim = lim = lim = lim 3 = 3
𝑥→∞ 𝑥 2 − 1 𝑥→∞ (𝑥 2 −1)′ 𝑥→∞ 2𝑥 𝑥→∞
Examples:
If a function 𝑓 is continuous on
[𝑎, 𝑏], then it takes every value
between 𝑓(𝑎) and 𝑓(𝑏)
somewhere on [𝑎, 𝑏],.
Continuity
𝑓 𝑥 = 𝑥 cos(𝑥)
1
Example: 𝑔 𝑡 = 𝑡 2
2
1 2 1 2
𝑔 𝑡 + ℎ − 𝑔(𝑡) 𝑡 + ℎ − 𝑡
𝑔′ 𝑡 = lim = lim 2 2
ℎ→0 ℎ ℎ→0 ℎ
1
𝑡ℎ+2ℎ2 1
= lim = lim (𝑡 + ℎ) =𝑡
ℎ→0 ℎ ℎ→0 2
Derivatives
Common derivatives:
1 ′ 1 1
𝑥𝑛 ′ = 𝑛𝑥 𝑛−1 = − 2 𝑥 ′ =
𝑥 𝑥 2 𝑥
1
𝑒𝑥 ′
= 𝑒𝑥 𝑏𝑥 ′
= ln 𝑏 𝑏 𝑥 ln 𝑥 ′
=
𝑥
′ ′
sin 𝑥 = cos 𝑥 cos 𝑥 = − sin 𝑥
Product rule:
′
𝑓 𝑥 𝑔 𝑥 = 𝑓 ′ 𝑥 𝑔 𝑥 + 𝑓 𝑥 𝑔′(𝑥)
Derivatives
Product rule:
′
𝑓 𝑥 𝑔 𝑥 = 𝑓 ′ 𝑥 𝑔 𝑥 + 𝑓 𝑥 𝑔′ 𝑥
Examples:
𝑥 2 sin 𝑥 ′ = 𝑥 2 ′ sin 𝑥 + 𝑥 2 sin 𝑥 ′
= 2𝑥 sin 𝑥 + 𝑥 2 cos(𝑥)
Derivatives
Product rule:
′
𝑓 𝑥 𝑔 𝑥 = 𝑓 ′ 𝑥 𝑔 𝑥 + 𝑓 𝑥 𝑔′ 𝑥
Examples:
𝑥 2 sin 𝑥 ′ = 𝑥 2 ′ sin 𝑥 + 𝑥 2 sin 𝑥 ′
= 2𝑥 sin 𝑥 + 𝑥 2 cos 𝑥
′ ln 𝑥 ′
1
𝑥 ln 𝑥 = 𝑥 + 𝑥 ln 𝑥 = ln 𝑥 + 𝑥 = ln 𝑥 + 1
𝑥
Derivatives
Chain rule:
𝑓(𝑔 𝑥 ) ′ = 𝑔′ 𝑥 𝑓 ′ 𝑔 𝑥 = 𝑔′ 𝑥 𝑓 ′ (𝑔 𝑥 )
Derivatives
Chain rule:
𝑓(𝑔 𝑥 ) ′ = 𝑔′ 𝑥 𝑓 ′ 𝑔 𝑥
Examples:
sin(𝑒 𝑥 ) ′ = 𝑒 𝑥 ′ cos 𝑒 𝑥 = 𝑒 𝑥 cos 𝑒 𝑥
Derivatives
Chain rule:
𝑓(𝑔 𝑥 ) ′ = 𝑔′ 𝑥 𝑓 ′ 𝑔 𝑥
Examples:
sin(𝑒 𝑥 ) ′ = 𝑒 𝑥 ′ cos 𝑒 𝑥 = 𝑒 𝑥 cos 𝑒 𝑥
2 ′ ′
2 ln 𝑥
ln 𝑥 = ln 𝑥 (2 ln 𝑥) =
𝑥
Derivatives
Notation:
𝒅𝟐 𝒇
𝒇′′(𝒙) or
𝒅𝒙𝟐
Derivatives
Example 1:
Example 2:
𝑓 𝑥 = 𝑥 ln(𝑥)
𝑓′ 𝑥 = ?
Derivatives
Example 2:
𝑓 𝑥 = 𝑥 ln(𝑥)
𝑓 ′ 𝑥 = 𝑥 ln 𝑥 ′ = 𝑥 ′ ln 𝑥 + 𝑥 ln 𝑥 ′ = ln 𝑥 + 1
𝑓 ′′ 𝑥 = ?
Derivatives
Example 2:
𝑓 𝑥 = 𝑥 ln(𝑥)
𝑓 ′ 𝑥 = 𝑥 ln 𝑥 ′ = 𝑥 ′ ln 𝑥 + 𝑥 ln 𝑥 ′ = ln 𝑥 + 1
1 ′
𝑓′′(𝑥) = ln 𝑥 + 1 =
𝑥
Derivatives
Example: 𝑓 𝑥 = 𝑥 ln 𝑥 + 1 − 𝑥 ln(1 − 𝑥)
1 1
𝑓 ′( ) = 0 𝑓 ′′ =4>0
2 2
1
So 𝑥 = is a local minimum of 𝑓 𝑥 .
2
Integrals (Antiderivatives)
Integrals
𝑓 𝑡 =𝑡
Integrals
𝑓 𝑡 =𝑡
Integrals
speed position
𝑡
1 2
𝑓 𝑡 =𝑡 න 𝑓 𝑥 𝑑𝑥 = 𝑡
0 2
Integrals
Riemann sum:
Approximation to definite
integral as sum of areas of
rectangles of shrinking
width
Integrals
Trapezoidal rule:
𝐹 𝑥 = න 𝑓 𝑥 𝑑𝑥
In general:
න 𝑎𝑓 𝑥 𝑑𝑥 = 𝑎 න 𝑓(𝑥) 𝑑𝑥
න 𝑓 𝑥 + 𝑔 𝑥 𝑑𝑥 = න 𝑓 𝑥 𝑑𝑥 + න 𝑔(𝑥) 𝑑𝑥
Common integrals:
𝑛 𝑥 𝑛+1
𝑥𝑎 = 𝑥𝑑𝑎 + 𝐶 = 𝑥𝑑 𝑥 𝑛+1
+𝐶
1
𝑒 𝑥 𝑑𝑥 = 𝑒𝑥 +𝐶 𝑥𝑑 𝑥 = ln |𝑥| + 𝐶
Example:
5
න 𝑥 3 + 2𝑥 − 1 𝑑𝑥 = ?
1
Integrals
Example:
5 4
3
𝑥 2
5
න 𝑥 + 2𝑥 − 1 𝑑𝑥 = + 𝑥 − 𝑥
1 4 1
=?
Integrals
Example:
5 4
3
𝑥 2
5
න 𝑥 + 2𝑥 − 1 𝑑𝑥 = + 𝑥 − 𝑥
1 4 1
54 2
1
= +5 −5 − + 1 − 1 = 186
4 4
Bonus: Taylor Series
Taylor Series
Example:
1
𝑓 𝑥 =
1 − 2𝑥
𝑓 0 = 1, 𝑓′ 0 = 2, 𝑓′′ 0 = 8, …
● https://en.wikipedia.org/wiki/Taylor_series
● https://tutorial.math.lamar.edu/classes/calcii/taylorseries.a
spx
● https://www.mathsisfun.com/algebra/taylor-series.html
Bonus: Partial Derivatives
Partial Derivatives
Example:
𝑓 𝑥, 𝑦 = 𝑥 2 + 3𝑥𝑦 + 𝑒 𝑦
𝜕𝑓
(𝑥, 𝑦) = 2𝑥 + 3𝑦
𝜕𝑥
𝜕𝑓
(𝑥, 𝑦) = 3𝑥 + 𝑒 𝑦
𝜕𝑦
Further Reading
Further Reading