CALCULUS
1 Differentiation
Learning Outcome
On successful completion of the Unit, you will be able to:
• Define a derivative.
• Recognise that a derivative of a function is simply a limit.
• Find derivatives of functions from first principles, i.e., using limits.
• Find derivatives of functions using techniques of differentiation.
• Evaluate the derivatives of trigonometric, exponential and logarithmic functions.
• Find derivatives of functions using implicit differentiation technique.
2 Differentiable Function
A function f (x) is said to be differentiable at x = a if its derivative exists at that point, and f (x)
is said to be differentiable on an interval if the derivative exists at at each point in that interval.
The process of finding the derivative is called differentiation. Let f be defined (and real-valued) on
[a, b]. For any x ∈ [a, b] form the quotient
f (t) − f (x)
φ(t) = (a < t < b, t 6= x)
t−x
and define
f 0 (x) = lim φ(t),
t→x
provided this limit exists.
Definition 1
0 f (x + h) − f (x)
The first derivative of a function f (x) is defined as f (x) = lim , provided the limit
h→0 h
exists.
2.1 Notation for Derivative
If y = f (x) defines a function, then the derivative maybe denoted as
0 dy
f (x), , y0
dx
2.2 Differentiation from First Principles
We want to find the derivative of a function from ”basics”, that is, from the definition of derivative.
Example 2 .
Differentiate the following functions from the first principles
1. f (x) = 4x
2. f (x) = x2 + 1
3. f (x) = 2x2 + x
Solution
(a)
0 f (x + h) − f (x)
f (x) = lim
h→0 h
4(x + h) − 4(x)
= lim
h→0 h
4x + 4h − 4x
= lim
h→0 h
4h
= lim
h→0 h
= lim 4
h→0
=4
(b)
0 f (x + h) − f (x)
f (x) = lim
h→0 h
[(x + h)2 + 1] − [x2 + 1]
= lim
h→0 h
x2 + 2xh + h2 + 1 − x2 − 1
= lim
h→0 h
2xh + h2
= lim
h→0 h
h(2x + h)
= lim
h→0 h
= lim 2x + h
h→0
= 2x
(c)
0 f (x + h) − f (x)
f (x) = lim
h→0 h
[2(x + h)2 + x + h] − [2x2 + x]
= lim
h→0 h
2x + 4xh + 2h2 + x + h − 2x2 − x
2
= lim
h→0 h
2
4xh + 2h + h
= lim
h→0 h
h(4x + 2h + 1)
= lim
h→0 h
= lim (4x + 1 + 2h)
h→0
= 4x + 1
Differentiation “Winners don’t do different things. They do things differently” 2
2.3 Derivative of a Constant
0
Theorem 3 The derivative of a constant is zero.(That is, if f(x)=c, then f (x) = 0)
Proof
0 f (x + h) − f (x)
f (x) = lim
h→0 h
c−c
= lim
h→0 h
= lim 0
h→0
=0
2.4 The Derivative of a Sum of Functions
We now consider the derivative of a function that is obtained by adding two functions. Remmember
that a function is differentiable if it satisfies the definition ??
Theorem 4 Let g and k be differentiable functions.
0 0 0
1. If f (x) = g(x) + k(x), then f is differentiable and f (x) = g (x) + k (x)
0 0
2. If f (x) = cg(x) where c is constant then f if differentiable and f (x) = cg (x)
proof (a)
0 f (x + h) − f (x)
f (x) = lim
h→0 h
g(x + h) + k(x + h) − (g(x) + k(x))
= lim
h→0 h
g(x + h) − g(x) + k(x + h) − k(x)
= lim
h→0 h
g(x + h) − g(x) k(x + h) − k(x)
= lim + lim
h→0 h h→0 h
0 0
= g (x) + k (x)
(b)
0 f (x + h) − f (x)
f (x) = lim
h→0 h
cg(x + h) − cg(x)
= lim
h→0 h
g(x + h) − g(x)
= c lim
h→0 h
0
= cg (x)
Thus, if g and f are differentiable and f (x) = g(x) + k(x) then
df dg dk 0 0 0
dx
= dx + dx or f (x) = g (x) + k (x)
Example 5 Differentiate the following with repect to x
1. x2 + 1
2. 3x2 − 2x
Differentiation “Winners don’t do different things. They do things differently” 3
0 f (x + h) − f (x)
Solution (a) f (x) = lim
h→0 h
(x + h)2 − x2 1−1
= lim + lim
h→0 h h→0 h
x2 + 2xh + h2 − x2
= lim +0
h→0 h
2xh + h2
= lim
h→0 h
h(2x + h)
= lim
h→0 h
= lim 2x + h
h→0
= 2x
0
(b) f (x) = 9x2 − 2. The method is left out as an exercise.
Exercise 6 a. Differentiate with respect to x from first principles
i. y = sin x [7 marks]
1
ii. y = x 2 [6 marks]
2
iii. y = x [7 marks]
2.5 Power Rule
From the above discussions you might have noted that
dy
Lemma 7 If y = Axn , then = Anxn−1
dx
Proof For positive integer r, we can define x 7→ xr for all r, and the formula follows from the
definition of derivative and the Binomial Theorem:
d r (x + h)r − xr xr + rxr−1 h + h2 (some factors) − xr
x = lim = lim
dx h→0 h h→0 h
rxr−1 h + h2 (some factors)
= lim rxr−1 + h(some factors)
= lim
h→0 h h→0
r−1 r−1
= rx + 0 = rx
1 5
Example 8 Differentiate the following with respect to x, given that the values of y are 3x2 , 5x4 , x 2 , x−4 , , x
x
5x2 − 3x + 7
Solution
Exercise 9 Differentiate the following with respect to x,
1. x6
2. 4x2
1
3. x− 2
4. 2x−3
2
5.
x2
6. 6x4 + 7x6 − 3x + 7/3
Differentiation “Winners don’t do different things. They do things differently” 4
2.6 Chain Rule
dy df dg
Lemma 10 If y = f (g(x)), then =
dx dg dx
dy
Example 11 If y = u2 , and u = 3x − 1, find .
dx
dy dy du
Solution = = 2u · 3 = 6u = 6(3x − 1)
dx du dx
dy
Exercise 12 Find in the following
dx
1. y = u4 , and u = 2x + 1
2. y = 5u, and u = 1 − x2
Example 13 Differentiate the following with respect to x (x2 − 1)3
dy
Solution = 3(x2 − 1)2 · 2x = 6x(x2 − 1)
dx
Exercise 14 Differentiate the following with respect to x
1. (3x + 2)3
4
2. (1 − x2 )
3
3. (1 − 4x2 )
2.7 Product Rule
We present a lemma for evaluating a derivative of a product of two functions.
Lemma 15 (uv)0 = vu0 + uv 0
Proof
d(f (x)g(x)) f (x + h)g(x + h) − f (x)g(x)
= lim
dx h→0 h
f (x + h)g(x + h) + f (x + h)g(x) − f (x + h)g(x) − f (x)g(x)
= lim
h→0 h
f (x + h)(g(x + h) − g(x)) + g(x)(f (x + h) − f (x))
= lim
h→0 h
Then you can consider that lim f (x + h) = f (x)
h→0
d(f (x)g(x)) g(x + h) − g(x) f (x + h) − f (x)
= lim f (x + h) lim + g(x) lim
dx h→0 h→0 h h→0 h
= f (x)g 0 (x) + g(x)f 0 (x)
dy
Example 16 Find , if y = x3 (2x + 1)2
dx
Solution Let u = x3 , and v = (2x + 1)2 ,
Then y = uv, u0 = 3x2 , v 0 = 2(2x + 1)2 = 4(2x + 1).
dy
Hence, = 3x2 (2x + 1)2 + x3 · 4(2x + 1) = x2 (2x + 1)(10x + 3)
dx
Differentiation “Winners don’t do different things. They do things differently” 5
dy
Exercise 17 Find if
dx
1. y = x2 · 3x
2. y = x4 · x3
3. y = x3 (x2 + 1)
4. y = (x + 3)(x2 − 1)
5. (1 − x2 )3 (x2 + 1)
√
6. x2 1 + x2
2.8 Quotient Rule
We present a lemma for evaluating a derivative of a quotient of two functions.
u 0 u0 v − uv 0
Lemma 18 =
v v2
Proof
d f 1 f (x + h) f (x)
= lim −
dx g h→0 h g(x + h) g(x)
1 f (x + h)g(x) − g(x + h)f (x)
= lim
h→0 h g(x + h)g(x)
1 f (x + h)g(x) − f (x)g(x) + f (x)g(x) − g(x + h)f (x)
= lim
h→0 h g(x + h)g(x)
0 0
f (x)g(x) − f (x)g (x)
=
(g(x))2
dy x3
Example 19 Find if y
dx (x + 1)2
dy 3x2 · (x + 1) − x3 · 2(x + 1) x2 (x + 3)
Solution = =
dx (x + 1)4 (x + 1)3
Exercise 20 Differentiate with respect to x
x2
1.
3x
x3
2.
x2 + 1
x+3
3.
x2 − 1
x2
4.
(x + 1)3
(x + 1)2
5.
1 − x2
x2
6. √
1 + x2
Differentiation “Winners don’t do different things. They do things differently” 6
2.9 Implicit differentiation
There are some function in which y can not be easily expressed explicitly, that is can not be easily
dy
made subject of the formula, for example, y 3 + xy 2 + x3 y = 2. We can still get . The following
dx
guide lines are necessary.
2.9.1 Investigation
dg
Let g = f (x), find if y = (f (x))2 .
dx
dy df dg dg 1 dy
= 2f (x) = 2g ⇒ =
dx dx dx dx 2g dx
The table below is important summary needed for implicit
Example 21 Differentiate x2 + y 2 = 25 with respect to x.
Solution When you implicitly differentiate x2 + y 2 = 25, you are differentiating with respect to a
particular variablein this case, x, so:
d 2 d
(x + y 2 ) = 25
dx dx
d 2 d
(x ) + (y 2 ) = 0
dx dx
dy
2x + 2y =0
dx
dy
2y = −2x
dx
dy x
=−
dx y
√
Example 22 Use implicit differentiation to find the derivative of y =arccos( x) as a function of
x and say where this derivative is defined.
Solution
√
y = arccos x
x = cos2 y
dx d
= (cos2 y)
dx dx
d dy
1= (cos2 y) ·
dy dx
dy
1 = (2)(cos y)(− sin y) ·
dx
dy 1 1
=− =± p
dx 2 cos y sin y 2 x(1 − x)
Differentiation “Winners don’t do different things. They do things differently” 7
Now think about where that is defined (when is the denominator positive?)
Whatever method you used, you must have obtained 0 < x < 1.
Hence, we write
dy 1 1
=− =± p , 0<x<1
dx 2 cos y sin y 2 x(1 − x)
dy
Exercise 23 Use implicit differentiation to find if
dx
1. y = arcsin x
2. y 2 x + y = 2
3. x3 + y 3 x = 4x
3 Differentiation of Trigonometric, Logarithmic and Expo-
nential Functions
3.1 Trigonometric Functions
The aim of this subsection is for you to be able to
1. Prove and apply the following ideas
d sin x
(a) = cos x
dx
d cos x
(b) = − sin x
dx
d tan x
(c) = sec2 x
dx
d sec x
(d) = sec x tan x
dx
d csc x
(e) = − csc x cot x
dx
d cot x
(f) = − csc2 x
dx
We assume that you have read the ideas in the earlier topics in this module. Therefore, you know
trigonometric identities as well as the following ideas
sin θ
1. lim =1
θ→0 θ
cos θ − 1
2. lim =0
θ→0 θ
3. lim sin θ = 0
θ→0
Example 24 Find f 0 (x) if f (x) = sin x from first principles
Solution
sin(x + h) − sin x sin x cos h + sin h cos x − sin x
lim = lim
h→0 h h→0 h
(cos h − 1) sin h
= lim cos x cos x
h→0 h h
= cos x
Differentiation “Winners don’t do different things. They do things differently” 8
Example 25 Find f 0 (x) if f (x) = cos x from first principles
Solution
cos(x + h) − cos x cos x cos h − sin h sin x − cos x
lim = lim
h→0 h h→0 h
(cos h − 1) sin h
= lim cos x − sin x
h→0 h h
= − sin x
d tan x
Example 26 Show that = sec2 x
dx
Solution
d tan x d sin x
=
dx dx cos x
sin2 x + cos2 x 1
= 2
=
cos x cos2 x
2
= sec x
Exercise 27 Show that
d sec x
1. = sec x tan x
dx
d csc x
2. = − csc x cot x
dx
d cot x
3. = − csc2 x
dx
Exercise 28 Differentiate the following with respect to x:
1. sin 2x
2. cos 3x
3. sin(x2 )
4. cos(x3 )
5. sin2 x
6. tan(2x + 1)
7. cos3 x
8. x3 sin 2x
9. 3x tan(2x + 1)
cos 3x
10.
x3
11. sin 3x · cos 4x
Differentiation “Winners don’t do different things. They do things differently” 9
3.1.1 Derivatives of exponential functions
This time we present the following facts without proof
d x
e = ex
dx
d x
a = ax ln a
dx
d 1
ln x =
dx x
We expect to use them in this subsection
dy 2
Example 29 Find if y = ex
dx
Solution
dy d x2 2 d 2
= e = ex x2 = 2xex
dy dx dx
dy
Exercise 30 Find , if
dx
1. y = ln(x2 + 1)
2. y = ln(x2 + 3x + 2)
2 +3x+2
3. y = ex
4. y = e3x+4
5. y = 23x+4
6. y = 43x+4
Differentiation “Winners don’t do different things. They do things differently” 10
dy
y dx
3x2 6x
5x4 20x3
1 1 −1
x2 2
x2
x−4 −4x−5
5
x
= 5x−1 −5x−2 = −5
x2
x + 5x2 − 3x + 7
3
3x2 + 10x − 3
Function Derivative
dy
y
dx
dy
y2 2y
dx
2 dy
y3 3y
dx
n−1 dy
yn ny
dx
Differentiation “Winners don’t do different things. They do things differently” 11