CALCULUS
CALCULUS
LIMITS OF FUNCTIONS
LIMIT OF A FUNCTION
Limits are fundamentals in calculus and helps understand the behaviour of functions as their
inputs approaches a specific values.
BASIC DEFINITION: The limit of a function 𝑓(𝑥) as 𝑥 approaches a value 𝑎 is the value that
f(𝑥) gets closer to as 𝑥 gets closer to a. It is denoted as lim 𝑓 𝑥 = 𝐿, where L is the value the
𝑥→𝑎
function approaches.
lim 2𝑥 − 1 4 + 𝑥 = −4
𝑥→𝑎
Limits of rational functions
LIMIT OF A FUNCTION
𝑔(𝑥)
Let 𝑓 𝑥 =
ℎ(𝑥)
lim 𝑔(𝑥)
𝑔(𝑎)
𝑥→𝑎
lim 𝑓 𝑥 = = 𝑤ℎ𝑒𝑟𝑒 ℎ(𝑥) ≠ 0
𝑥→𝑎 lim ℎ(𝑥) ℎ(𝑎)
𝑥→𝑎
𝑥 2 −4 𝑥+2 (𝑥−2)
E.g. lim = lim = lim (𝑥 − 2) = −4
𝑥→−2 𝑥+2 𝑥→−2 (𝑥+2) 𝑥→−2
Limits as the independent variable approaches infinity
LIMIT OF A FUNCTION
When x becomes very large, 𝑥 → ∞. Thus:
1
1. lim 𝑓 𝑥 = 0 𝑖𝑓 𝑓 𝑥 = 𝑥𝑛
𝑖𝑓 𝑛 𝑖𝑠 𝑎 𝑝𝑜𝑠𝑖𝑡𝑣𝑒.
𝑥→∞
6𝑥 2 −3𝑥+1
Example: lim
𝑥→∞ 5𝑥 2 −2
SOLUTION
lim 𝑥 4 − 3𝑥 2 − 7𝑥 + 11
𝑥→−1
= (−1)4 −3 −1 2 − 7 −1 + 11
= 1 − 3 + 7 + 11
= 16
2𝑥 2 −𝑥−1
EXAMPLE 2: Find the limit of the function as x tends to 1
3𝑥 2 +𝑥−4
SOLUTION
2𝑥 2 − 𝑥 − 1
lim
𝑥→1 3𝑥 2 + 𝑥 − 4
2𝑥 2 − 𝑥 − 1 (𝑥 − 1)(2𝑥 + 1)
lim 2 = lim
𝑥→1 3𝑥 + 𝑥 − 4 𝑥→1 (𝑥 − 1)(3𝑥 + 4)
2𝑥 + 1
lim
𝑥→1 3𝑥 + 4
2 1 +1 3
= =
3 1 +1 7
DIFFERENTIATION
FIRST PRINCIPLES
Leibniz’s notation:
𝑑𝑦 𝛿𝑦 𝑓 𝑥 + 𝛿𝑥 − 𝑓(𝑥)
= lim = lim
𝑑𝑥 𝛿𝑥→0 𝛿𝑥 𝛿𝑥→0 𝛿𝑥
Functional notation:
𝑑𝑦 ′
𝛿𝑦 𝑓 𝑥 + 𝛿𝑥 − 𝑓(𝑥)
= 𝑓 (𝑥) = lim = lim
𝑑𝑥 𝛿𝑥→0 𝛿𝑥 𝛿𝑥→0 𝛿𝑥
𝑑𝑦 𝛿𝑦 𝑓 𝑥 + 𝛿𝑥 − 𝑓 𝑥
= 𝑓 ′ 𝑥 = lim = lim
𝑑𝑥 𝛿𝑥→0 𝛿𝑥 𝛿𝑥→0 𝛿𝑥
𝑑𝑦 ′
6 𝑥 + 𝛿𝑥 − 6𝑥 6𝑥 + 6𝛿𝑥 − 6𝑥 6𝛿𝑥
= 𝑓 𝑥 = lim = lim = lim
𝑑𝑥 𝛿𝑥→0 𝛿𝑥 𝛿𝑥→0 𝛿𝑥 𝛿𝑥→0 𝛿𝑥
𝑑𝑦
= 𝑓 ′ 𝑥 = lim 6 = 6
𝑑𝑥 𝛿𝑥→0
𝑓 𝑥 = 2𝑥 3
𝑑𝑦 𝑓 𝑥+ℎ −𝑓 𝑥
= 𝑓 ′ 𝑥 = lim
𝑑𝑥 ℎ→0 ℎ
𝑑𝑦 ′
2 𝑥 + ℎ 3 − 2𝑥 3 2𝑥 3 + 6𝑥 2 ℎ + 6𝑥ℎ2 + 2ℎ3 − 2𝑥 3
= 𝑓 𝑥 = lim = lim
𝑑𝑥 ℎ→0 ℎ ℎ→0 ℎ
6𝑥 2 ℎ + 6𝑥ℎ2 + 2ℎ3
= lim = lim 6𝑥 2 + 6𝑥ℎ + 2ℎ2
ℎ→0 ℎ ℎ→0
𝑑𝑦
= 𝑓 ′ 𝑥 = 6𝑥 2
𝑑𝑥
Find from the first principles the derivative of 𝑓 𝑥 = 𝑥 + 2 2
Solution
𝑓 𝑥 = (𝑥 + 2)2 = (𝑥 2 + 4𝑥 + 4)
⇒𝑓 𝑥+ℎ = 𝑥+ℎ 2 +4 𝑥+ℎ +4
= 𝑥 2 + 2𝑥ℎ + ℎ2 + 4𝑥 + 4ℎ + 4
𝑓 𝑥+ℎ −𝑓 𝑥
𝑓′ 𝑥 = lim
ℎ→0 ℎ
2 2 2
′
𝑥 + 2𝑥ℎ + ℎ + 4𝑥 + 4ℎ + 4 − (𝑥 + 4𝑥 + 4)
⇒ 𝑓 𝑥 = lim
ℎ→0 ℎ
𝑥 2 + 2𝑥ℎ + ℎ2 + 4𝑥 + 4ℎ + 4 − 𝑥 2 − 4𝑥 − 4
⇒ 𝑓 ′ 𝑥 = lim
ℎ→0 ℎ
2𝑥ℎ + 4ℎ + ℎ 2
⇒ 𝑓 ′ 𝑥 = lim
ℎ→0 ℎ
⇒ 𝑓 ′ 𝑥 = lim (2𝑥 + 4 + ℎ)
ℎ→0
As ℎ → 0, 𝑓 ′ 𝑥 = 2𝑥 + 4 + 0
∴ 𝑓 ′ 𝑥 = 2𝑥 + 4
RULES OF DIFFERENTIATION
Differentiation of a constant
𝑑𝑦
If 𝑦 = 𝑐 where c is constant, then = 0.
𝑑𝑥
𝑑𝑦
= 0. 𝑐𝑥 −1 = 0
𝑑𝑥
𝒅𝒚
Illustration: 𝒚 = 𝟓 then =𝟎
𝒅𝒙
𝑑𝑦
Illustration: 𝑦 = 5𝑥 then =5
𝑑𝑥
𝑑𝑦
If 𝑦 = −7𝑥, 𝑡ℎ𝑒𝑛 = −7
𝑑𝑥
Differentiation of 𝒙𝒏
𝑑𝑦
If 𝑦 = 𝑥𝑛 , then = 𝑛𝑥 𝑛−1 where n is any real number, positive or negative or fraction.
𝑑𝑥
𝑑𝑦
Illustration: 𝑦 = 𝑥 3 then = 3𝑥 2
𝑑𝑥
−5 𝑑𝑦
If 𝑦 = 𝑥 , 𝑡ℎ𝑒𝑛 = −5𝑥 −6
𝑑𝑥
Differentiation of 𝒂𝒙𝒏
𝑑𝑦
If 𝑦 = 𝑎𝑥 𝑛 , where a is a constant, then = 𝑛𝑎𝑥 𝑛−1 .
𝑑𝑥
𝑑𝑦
Illustration: 𝑦 = 2𝑥 3 then = 6𝑥 2
𝑑𝑥
−4 𝑑𝑦
If 𝑦 = 3𝑥 , 𝑡ℎ𝑒𝑛 = −12𝑥 −5
𝑑𝑥
2 𝑑𝑦
If 𝑦 = , ⇒ 𝑦 = 2𝑥 −3 ⇒ = −6𝑥 −4
𝑥3 𝑑𝑥
1
1 1 −2 𝑑𝑦 1 −3 1
If 𝑦 = , ⇒𝑦= 1 =𝑥 ⇒ = − 𝑥 2 =−
𝑥
𝑥2
𝑑𝑥 2 2 𝑥3
4
3 𝑑𝑦 4 1
If 𝑦 = 𝑥4, ⇒ 𝑦 = 𝑥 ⇒ 3 = 𝑥3
𝑑𝑥 3
Differentiation of a sum or difference
The derivatives of the a sum or diffference is the sum or difference of derivaties of separate
terms.
𝑑
𝑓 𝑥 + 𝑔 𝑥 − ℎ(𝑥)
𝑑𝑥
𝑑 𝑑 𝑑
𝑓 𝑥 + 𝑔 𝑥 + ℎ 𝑥
𝑑𝑥 𝑑𝑥 𝑑𝑥
1
Illustration: If 𝑦 = 𝑥4 + + 6𝑥 then,
𝑥
𝑑𝑦 𝑑 4 𝑑 −1 𝑑
= 𝑥 + 𝑥 + 6𝑥
𝑑𝑥 𝑑𝑥 𝑑𝑥 𝑑𝑥
1
= 4𝑥 3 − 2−6
𝑥
Differentiate with respect to x
1. 𝑦 = 5𝑥 2 − 4𝑥 + 8
1 2 1
2. 𝑦 = 2
𝑥 − 2
2𝑥
3. 𝑥 + 𝑥3
Solution
Q1. 𝑦 = 5𝑥 2 − 4𝑥 + 8
𝑑𝑦
⇒ = 10𝑥 − 4
𝑑𝑥
Solution
1 1
Q2. 𝑦 = 𝑥 2 −
2 2𝑥 2
𝑑𝑦 1
⇒ =𝑥+ 3
𝑑𝑥 𝑥
1 3
Q3. Let y = 𝑥 + 𝑥 3 = 𝑥 + 𝑥 2 2
𝑑𝑦 1 3 𝑥
⇒ = +
𝑑𝑥 2 𝑥 2
Differentiation of a Product
𝑑𝑦 𝑑𝑢
1. If 𝑦 = 𝑎𝑢 where 𝑎 is constant and u is a function of x, , then =𝑎 .
𝑑𝑥 𝑑𝑥
𝑑𝑦
Illustration: 𝑦 = 5𝑥 3 then = 5 3𝑥 2 = 15𝑥 2
𝑑𝑥
𝑑𝑢 𝑑𝑣
= 6𝑥 𝑎𝑛𝑑 =5
𝑑𝑥 𝑑𝑥
𝑑𝑦 𝑑𝑢 𝑑𝑣
Using the product rule: =𝑣 +𝑢
𝑑𝑥 𝑑𝑥 𝑑𝑥
𝑑𝑦
= 5𝑥 − 8 6𝑥 + 3𝑥 2 + 1 5
𝑑𝑥
= 30𝑥 2 − 48𝑥 + 15𝑥 2 + 5
= 45𝑥 2 − 48𝑥 + 5
Differentiation of a Quotient
𝑢
If 𝑦 = where u and v are both functions of x, then by the quotient rule:
𝑣
𝑑𝑢 𝑑𝑣
𝑑𝑦 𝑣 −𝑢
𝑑𝑥 𝑑𝑥
=
𝑑𝑥 𝑣2
1+𝑥 2
ii. 𝑦 = 𝑥−1
Solution
2𝑥 + 3
𝑦=
𝑥−5
It’s a quotient of two terms 2𝑥 + 3 𝑎𝑛𝑑 (𝑥 − 5)
𝐿𝑒𝑡 𝑢 = 2𝑥 + 3 𝑎𝑛𝑑 𝑣 = (𝑥 − 5)
𝑑𝑢 𝑑𝑣
= 2 𝑎𝑛𝑑 =1
𝑑𝑥 𝑑𝑥
𝑑𝑢 𝑑𝑣
𝑑𝑦 𝑣 −𝑢
𝑑𝑥 𝑑𝑥
Using the quotient rule: =
𝑑𝑥 𝑣2
𝑑𝑦 (𝑥 − 5)(2) − (2𝑥 + 3)(1)
=
𝑑𝑥 (𝑥 − 5)2
2𝑥 − 10 − 2𝑥 − 3
=
(𝑥 − 5)2
𝑑𝑦 −13
Hence =
𝑑𝑥 (𝑥−5)2
Differentiation of a functions of a function
If 𝑦 is a function of u and u is function of x, then y is called function of function of x. This
can be differentiated using the chain rule:
𝑑𝑦 𝑑𝑦 𝑑𝑢
= ×
𝑑𝑥 𝑑𝑢 𝑑𝑥
The rule is to differentiatethe function as we do for 𝑥 𝑛 and then multiply by the result by the
derivative of the expression in the bracket.
Thus if 𝑦 = (𝑎𝑥 + 𝑏)𝑛 , then
𝑑𝑦 𝑛−1
𝑑
= 𝑛(𝑎𝑥 + 𝑏) × 𝑎𝑥 + 𝑏
𝑑𝑥 𝑑𝑥
Illustrations: Differentiate with respect to x
i. 𝑦 = (3𝑥 + 4)5
ii. 𝑦 = (𝑥 2 + 2)3
iii. 𝑦 = (3𝑥 4 − 7)7
iv. 𝑦 = (2𝑥 + 1)7
Solution
𝑦 = (3𝑥 + 4)5
𝐿𝑒𝑡 𝑢 = 3𝑥 + 4 ⇒ 𝑦 = 𝑢5
𝑑𝑢 𝑑𝑦
⇒ = 3 𝑎𝑛𝑑 = 5𝑢4
𝑑𝑥 𝑑𝑢
𝑑𝑦 𝑑𝑦 𝑑𝑢
Using the chain rule: = ×
𝑑𝑥 𝑑𝑢 𝑑𝑥
𝑑𝑦
⇒ = 5𝑢4 3 = 15𝑢4
𝑑𝑥
4
= 15(3𝑥 + 4)
Solution
𝑦 = (3𝑥 + 4)5
𝑦 = (𝑎𝑥 + 𝑏)𝑛 , then
𝑑𝑦 𝑛−1
𝑑
= 𝑛(𝑎𝑥 + 𝑏) × 𝑎𝑥 + 𝑏
𝑑𝑥 𝑑𝑥
𝑑𝑦
= 5(3𝑥 + 4)4 × (3)
𝑑𝑥
𝑑𝑦
= 15(3𝑥 + 4)4
𝑑𝑥
Solution
𝑦 = (𝑥 2 + 2)3
𝑦 = (𝑎𝑥 + 𝑏)𝑛 , then
𝑑𝑦 𝑑
= 𝑛(𝑎𝑥 + 𝑏)𝑛−1 × 𝑎𝑥 + 𝑏
𝑑𝑥 𝑑𝑥
𝑑𝑦
= 3(𝑥 2 + 2)2 × (2𝑥)
𝑑𝑥
𝑑𝑦
= 6𝑥(𝑥 2 + 2)2
𝑑𝑥
HIGHER DERIVATIVES
𝑑𝑦 𝑑𝑦
If y is a function of x, then will also be a function of x. The result of differentiating with
𝑑𝑥 𝑑𝑥
𝑑2 𝑦
respect to x is called the second derivative of y with respect to x and is denoted by . If the
𝑑𝑥 2
𝑑3 𝑦
second derivative is also differentiated with respect to x, the third derivative is obtained and
𝑑𝑥 3
so on.
𝑑2 𝑦 𝑑 𝑑𝑦
Note: =
𝑑𝑥 2 𝑑𝑥 𝑑𝑥
𝑑𝑦 𝑑 2 𝑦 𝑑3𝑦 4 3 2
1. Find , 2 , when 𝑦 = 3𝑥 + 2𝑥 + 2
𝑑𝑥 𝑑𝑥 𝑑𝑥 3 𝑥
𝑑𝑦 𝑑 2 𝑦 𝑑3 𝑦
2. Find , 2 , when 𝑦 = 𝑥 6 + 2𝑥 3 − 3𝑥 2 + 4𝑥 + 1
𝑑𝑥 𝑑𝑥 𝑑𝑥 3
Solution
4 3 2
𝑦 = 3𝑥 + 2𝑥 +
𝑥2
𝑑𝑦 3 2 4
= 12𝑥 + 6𝑥 −
𝑑𝑥 𝑥3
𝑑2𝑦 2 12
= 36𝑥 + 12𝑥 +
𝑑𝑥 2 𝑥4
𝑑3𝑦 48
= 72𝑥 + 12 −
𝑑𝑥 3 𝑥5
Differentiation of implicit function
𝑥 3 + 𝑦 3 = 3𝑥𝑦 is an implicit function. To differentiate such an implicit function:
𝑑𝑦
1. Differentiate it term by term to give an equation in ,𝑥 𝑎𝑛𝑑 𝑦;
𝑑𝑥
𝑑𝑦
2. Make the subject of the equation;
𝑑𝑥
𝑑 𝑑𝑦 𝑑 2 𝑑𝑦
𝑦 = ; 𝑦 = 2y
𝑑𝑥 𝑑𝑥 𝑑𝑥 𝑑𝑥
4. Treat terms such as 3𝑥𝑦, 𝑥𝑦 2 etc. as product and use product rule
𝑦 2𝑦
Also treat , etc. as quptients and use the quotient rule.
𝑥2 𝑥
Illustrative Examples
𝑑𝑦
Find , if
𝑑𝑥
1. 𝑥 2 + 𝑦 2 = 0
2. 𝑦 = 𝑥 2 + 3𝑥𝑦 + 6𝑦 2 = 15
3. 𝑥 3 + 𝑦 3 = 3𝑥𝑦
Solution
𝑥2 + 𝑦2 = 0
Differentiating term by term gives
𝑑𝑦
2𝑥 + 2𝑦 =0
𝑑𝑥
𝑑𝑦
⇒ 2𝑦 = −2𝑥
𝑑𝑥
𝑑𝑦 𝑥
⇒ =−
𝑑𝑥 𝑦
Solution
𝑦 = 𝑥 2 + 3𝑥𝑦 + 6𝑦 2 = 15
Differentiating term by term gives;
𝑑𝑦 𝑑𝑦
2𝑥 + 3𝑦 − 3𝑥 + 12𝑦 =0
𝑑𝑥 𝑑𝑥
(treat 3xy as a product)
𝑑𝑦 𝑑𝑦
⇒ 12𝑦 − 3𝑥 = 3𝑦 − 2𝑥
𝑑𝑥 𝑑𝑥
𝑑𝑦 3𝑦 − 2𝑥
⇒ =−
𝑑𝑥 12𝑦 − 3𝑥
Differentiation of simple trignometry functions
𝑑
sin 𝑥 = cos 𝑥
𝑑𝑥
𝑑
cos 𝑥 = − sin 𝑥
𝑑𝑥
𝑑𝑦
Also, if y = sin 𝑎𝑥, then = 𝑎 cos 𝑎𝑥
𝑑𝑥
𝑑𝑦
if 𝑦 = cos 𝑎𝑥, then = −𝑎 sin 𝑎𝑥
𝑑𝑥
𝑑𝑦
General, if y = sin 𝑓(𝑥), then = 𝑓 ′ (𝑥) cos 𝑓(𝑥)
𝑑𝑥
Example; Write down the derivative of sin(2𝑥 3 + 𝑥 2 − 1)
Solution
𝑑
sin(2𝑥 3 + 𝑥 2 − 1)
𝑑𝑥
⇒ (6𝑥 2 + 2𝑥) cos(2𝑥 3 + 𝑥 2 − 1)