MAI Lecture 03 Differential Calculus
MAI Lecture 03 Differential Calculus
Differential Calculus
Differential Calculus
• For a function 𝑓: ℝ → ℝ, the derivative of f is defined as
𝑓 𝑥+ℎ −𝑓 𝑥
𝑓′
𝑥 = lim
ℎ→0 ℎ
• If 𝑓 ′ 𝑎 exists, f is said to be differentiable at a
• If f ‘ 𝑐 is differentiable for ∀𝑐 ∈ 𝑎, 𝑏 , then f is differentiable on this
interval
We can also interpret the derivative 𝑓′(𝑥) as the instantaneous rate of change of
𝑓(𝑥) with respect to x
I.e., for a small change in x, what is the rate of change of 𝑓(𝑥)
• Given 𝑦 = 𝑓(𝑥), where x is an independent variable and y is a dependent
variable, the following expressions are equivalent:
𝑑𝑦 𝑑𝑓 𝑑
𝑓′ 𝑥 = 𝑓′ = = = 𝑓 𝑥 = 𝐷𝑓 𝑥 = 𝐷𝑥 𝑓(𝑥)
𝑑𝑥 𝑑𝑥 𝑑𝑥
𝑑
• The symbols D, and 𝐷𝑥 are differentiation operators that indicate
,
𝑑𝑥
operation of differentiation
Differential Calculus
Differential Calculus
• The following rules are used for computing the derivatives of explicit
functions
Differential Calculus
Higher Order Derivatives
• The derivative of the first derivative of a function 𝑓 𝑥 is the second
derivative of 𝑓 𝑥
𝑑2 𝑓 𝑑 𝑑𝑓
2 =
𝑑𝑥 𝑑𝑥 𝑑𝑥
• The second derivative quantifies how the rate of change of 𝑓 𝑥 is
changing
E.g., in physics, if the function describes the displacement of an object, the
first derivative gives the velocity of the object (i.e., the rate of change of the
position)
The second derivative gives the acceleration of the object (i.e., the rate of
change of the velocity)
• If we apply the differentiation operation any number of times, we
obtain the n-th derivative of 𝑓 𝑥
𝑛𝑓 𝑛
𝑛
𝑑 𝑑
𝑓 𝑥 = 𝑛= 𝑓 𝑥
𝑑𝑥 𝑑𝑥
Taylor Series
P x a0 a1 x a2 x 2 a3 x3 a4 x 4 f x ln x 1
f x ln x 1 P x a0 a1 x a2 x 2 a3 x3 a4 x 4
f 0 ln 1 0 P 0 a0 a0 0
f x
1 P x a1 2a2 x 3a3 x 2 4a4 x3
1 x
1
f 0 1 P 0 a1 a1 1
1
f x
1 P x 2a2 6a3 x 12a4 x 2
1 x
2
1
1
f 0 1
P 0 2a2 a2
1
2
P x a0 a1 x a2 x 2 a3 x3 a4 x 4 f x ln x 1
f x
1 P x 2a2 6a3 x 12a4 x 2
1 x
2
1
1
f 0 1 P 0 2a2 a2
1
2
P 4 x 24a4
1
f 4
x 6
1 x
4
6
f 4 0 6 P 4
0 24a4 a4
24
P x a0 a1 x a2 x 2 a3 x3 a4 x 4 f x ln x 1
1 2 2 3 6 4
P x 0 1x x x x f x ln x 1
2 6 24
x 2 x3 x 4
P x 0 x
2 3 4
If we plot both functions, we see that near zero the functions match very well!
5
1
4
3
2 0.5
1 f x
-5 -4 -3 -2 -1 0 1 2 3 4 5 -1 -0.5 0 0.5 1
-1
-2
-0.5
-3
-4
-5 P x -1
1 2 6
Our polynomial: 0 1x x 2 x3 x 4
2 6 24
f 0 2 f 0 3 f 4 0 4
has the form: f 0 f 0 x x x x
2 6 24
or: f 0 f 0 f 0 2 f 0 3 f 4 0 4
x x x x
0! 1! 2! 3! 4!
Maclaurin Series:
(generated by f at x=0 )
f 0 2 f 0 3
P x f 0 f 0 x x x
2! 3!
Taylor Series:
(generated by f at x=a )
f a f a
P x f a f a x a
2 3
x a x a
2! 3!
example: y cos x
f x sin x f 0 0 f 4 x cos x f 4 0 1
f x cos x f 0 1
1x 2 0 x3 1x 4 0 x 5 1x 6
P x 1 0x
2! 3! 4! 5! 6!
x 2 x 4 x 6 x8 x10
P x 1
2! 4! 6! 8! 10!
x 2 x 4 x 6 x8 x10
y cos x P x 1
2! 4! 6! 8! 10!
-5 -4 -3 -2 -1 0 1 2 3 4 5
-1
example: y cos 2 x
2x 2x 2x 2x 2x
2 4 6 8 10
P x 1
2! 4! 6! 8! 10!
example: y cos x at x
2
f x cos x f 0 f x sin x f 1
2 2
f x sin x f 1
2 4
f 4
x cos x f 0
2
f x cos x f 0
2
0 1
2 3
P x 0 1 x x x
2 2! 2 3! 2
3 5
x x
P x x
2 2
2 3! 5!
Differential Calculus Taylor Series
• Taylor series provides a method to approximate any function 𝑓(𝑥) at a
point 𝑥0 if we have the first n
derivatives 𝑓 𝑥0 , 𝑓 1 𝑥0 , 𝑓 2 𝑥0 , … , 𝑓 𝑛 𝑥0
• For instance, for 𝑛 = 2, the second-order approximation of a function 𝑓(𝑥)
is
1 𝑑2 𝑓 2
𝑑𝑓
𝑓 𝑥 ≈ 𝑥 − 𝑥0 + 𝑥 − 𝑥0 + 𝑓 𝑥0
2 𝑑𝑥 2 𝑥0
𝑑𝑥 𝑥0
• Similarly, the approximation of 𝑓(𝑥) with a Taylor polynomial of n-degree
is
𝑖
𝑛 1𝑑 𝑓 𝑖
𝑓(𝑥) ≈ 𝑖=0 𝑖! 𝑑𝑥 𝑖 𝑥 − 𝑥0
𝑥0
𝑓 𝑥 𝑑𝑥
𝑎
• Geometric interpretation of the integral is the area between
the horizontal axis and the graph of 𝑓(𝑥) between the points
a and b
In this figure, the integral is the sum of blue areas (where 𝑓 𝑥 > 0)
minus the pink area (where 𝑓 𝑥 < 0)