Math Lecture 3
Math Lecture 3
Lecture 3
Dr Salaheddin Alakkari
Recap
Real Valued Functions
• In this session we will focus on simple real-valued functions.
Well-known sets
• The set of all integers ℤ = ⋯ , −3, −2, −1, 0, 1, 2, 3, ⋯
• The set of all positive integers ℤ+ = 0, 1, 2, 3, ⋯
• The set of all rational numbers ℚ = 𝑝/𝑞 𝑝 ∈ ℤ ∧ 𝑞 ∈ ℤ ∧ 𝑞 ≠ 0
• The set of all real numbers ℝ
• The set of all positive real numbers ℝ+ .
• The empty set is a set that contains no elements and is denoted
as ∅.
• Note: We will consider the set of all positive real numbers includes
zero.
Domain of Common Functions
1. 𝑓 𝑥 = log(𝑥)
1
2. 𝑓 𝑥 =
𝑥
3. 𝑓 𝑥 = sin(𝑥)
1
4. 𝑓 𝑥 =
𝑥2
Concepts: Limits
• The limit gives the value that a function 𝑓(𝑥) will attain around a
point 𝑐.
Examples
What is Differentiation?
• Differentiation is one of the main fundamental tools in calculus
that also plays elementary role in the theoretical aspect of many
data science and machine learning algorithms.
Finding the Derivatives using Limits
• In theory, we can find the derivative of a function by finding the
following limit:
𝑓 𝑥+ℎ −𝑓(𝑥)
• lim
ℎ→0 ℎ
Derivatives of Common Functions: Constant
•𝑓 𝑥 =𝑎
⇒ 𝑓′ 𝑥 = 0
Derivatives of Common Functions: Linear
• 𝑓 𝑥 = 𝑎𝑥
⇒ 𝑓′ 𝑥 = 𝑎
Derivatives of Common Functions: power and
roots
• 𝑓 𝑥 = 𝑥𝑛
⇒ 𝑓 ′ 𝑥 = 𝑛𝑥 𝑛−1
Derivatives of Common Functions:
Exponential
• 𝑓 𝑥 = 𝑒 𝑔(𝑥)
⇒ 𝑓 ′ 𝑥 = 𝑔′(𝑥)𝑒 𝑔(𝑥)
Derivatives of Common Functions: Log
• 𝑓 𝑥 = log 𝑥
1
⇒ 𝑓′ 𝑥 =
𝑥
Derivatives of Common Functions:
Trigonometric
• 𝑓 𝑥 = sin 𝑥
⇒ 𝑓 ′ 𝑥 = cos 𝑥
• 𝑓 𝑥 = cos 𝑥
⇒ 𝑓 ′ 𝑥 = − sin 𝑥
• 𝑓 𝑥 = tan 𝑥 = sin 𝑥 / cos 𝑥
⇒ 𝑓 ′ 𝑥 =?
Derivatives of Common Functions: Hyperbolic
Functions
𝑒 𝑥 −𝑒 −𝑥
• 𝑓 𝑥 = sinh 𝑥 =
2
⇒ 𝑓′ 𝑥 =
𝑒 𝑥 +𝑒 −𝑥
• 𝑓 𝑥 = cosh 𝑥 =
2
⇒ 𝑓′ 𝑥 =
Chain Rule
• Chain rule is very important technique for deriving more
complicated functions:
• Let 𝑓 𝑥 = ℎ 𝑔(𝑥) the derivative of this function can be found as
follows:
• 𝑓′ 𝑥 = ℎ′ 𝑔 𝑥 𝑔′(𝑥)
Product Rule
• Another important differentiation technique when we have
multiplication of two function:
• Let 𝑓 𝑥 = ℎ 𝑥 𝑔(𝑥)
• ⇒ 𝑓 ′ 𝑥 = ℎ′ 𝑥 𝑔 𝑥 + ℎ 𝑥 𝑔′(𝑥)
Division Rule
ℎ 𝑥
• Let 𝑓 𝑥 =
𝑔 𝑥
ℎ ′ 𝑥 𝑔 𝑥 −ℎ 𝑥 𝑔′(𝑥)
⇒ 𝑓′ 𝑥 =
𝑔2 𝑥
Back to Limits and L'Hôpital's rule
• L'Hôpital's rule is used when finding limits of the form
𝑓(𝑥) ∞ 0
• lim = or
𝑥→𝑐 𝑔(𝑥) ∞ 0
𝑓(𝑥) 𝑓′(𝑥)
• L'Hôpital's rule finds the limit as followslim = lim
𝑥→𝑐 𝑔(𝑥) 𝑥→𝑐 𝑔′(𝑥)
• Example:
sin 𝑥
• lim
𝑥→0 𝑥
3𝑥 2 +2𝑥+1
• lim
𝑥→∞ 2𝑥 2
𝑥2
• lim
𝑥→∞ log 𝑥
• lim 𝑥 log 𝑥
𝑥→0
Finding derivative at a particular point
• Let 𝑓 𝑥 = 𝑥 2 find 𝑓 ′ 2
Exercises
• Find the derivative of the following functions:
1. 𝑓 𝑥 = 𝑥 log 𝑥
2. 𝑓 𝑥 = 1 + 𝑒 𝑥
Exercise
• Consider the function 𝑓 𝑥 = 𝑥 2 , what is the line equation of the
tangent at 𝑥 = 1?
Geometric property of Derivatives
• Since the derivative of a function at a given 𝑥 value corresponds to
the slope of the tangent line at this point, one can identify if the
function is increasing or decreasing at this point.
• If the derivative is positive, then the function is increasing at that
point.
• If the derivative is negative, then the function is decreasing at that
point.
Geometric property of Derivatives: Identifying
Maxima and Minima Points
• A very important property in differentiable functions is that we can
identify local maxima and local minima using differentiation.
• This can be done by finding the values of 𝑥 where the derivative
equals zero.
• We can know whether the point is maxima or minima by studying
the behaviour of the function around this point.
Geometric Property of Derivatives: Convexity
and Inflection Points
• For twice differentiable functions, the second derivative at a given
value 𝑥0 will tell us if the function is concave or convex at the given
point.
• The 𝑥 values where the second derivative vanishes (becomes
equal to zero) are known as inflection points.
• Inflection point is a point where the function changes its
behaviour from being convex to concave or vice versa.