Introduction to Differentiation
Chapter 5
Differentiating a linear function
A straight line has a constant gradient, or in other words,
the rate of change of y with respect to x is a constant.
Consider the straight line y = 3x + 2;
We can find the gradient of this line by taking two points
and calculating the change in y divided by the change in
x.
No matter which pair of points we choose the value of
the gradient is always 3.
3
1
3
(-1) - 0
(-1) - 2
Gradient The = = =
Above note that y increases as a rate of 3 units, for
every unit increase in x.
We say that the rate of change of y with respect to x is
3.
Observe that the gradient of the straight line is the same
as the rate of change of y with respect to x.
Key Point
For a straight line:
the rate of change of y with respect to x is
the same as the gradient of the line.
Differentiation from first principles of
some simple curves
Consider the curve y = x
2
Above for different pairs of points we will get different
lines, with very different gradients.
For a simple function like y = x
2
we see that y is not
changing constantly with x.
The rate of change of y with respect to x is not a
constant.
Calculating the rate of change at a
point
Calculating the rate of change at any point on a curve
y = f(x) is defined to be the gradient of the tangent drawn
at that point as shown below.
The rate of change at a point P is defined to be the
gradient of the tangent at P.
Key Point
The gradient of a curve y = f(x) at a given
point is defined to be the gradient of the
tangent at that point.
Consider the figure below which shows a fixed point P
on a curve y=x
2
.
The lines through P and Q approach the tangent at P
when Q is very close to P.
Calculate the gradient of one of these lines, and let the
point Q approach the point P along the curve, then the
gradient of the line should approach the gradient of the
tangent at P, and hence the gradient of the curve.
Consider a general point P which has coordinates (x, y).
Choose point Q to be close to P on the curve.
Because we are considering the graph of y = x
2
;
So the gradient of PQ is;
2 2
2
) ( ) ( 2
)
x x x x y y
x (x y y
o o + + = +
+ = +
2
2
) ( ) ( 2
;
x x x y
x y
o o + =
=
x x
x
y
x
x x x
x
y
x
x x x
x
y
o
o
o
o o
o
o
o o
o
+ =
+
=
+
=
2
) 2 (
) ( ) ( 2
2
As we let become zero we are left with just 2x, and
this is the formula for the gradient of the tangent at P.
Gradient of tangent =
We can do this calculation in the same way for lots of
curves. We have a special symbol for the phrase
This is again written as dy/dx and referred to as
derivative of y with respect to x.
x x x
x
y
x x
2 ) 2 (
lim lim
0 0
= + =
o
o
o
o o
x
y
x
o
o
o
lim
0
x o
Use of function notation
We often use function notation y = f(x).
Then, the point P has coordinates (x, f(x)). Point Q has
coordinates
So, the change in y, that is is . Then;
) ( ) ( x f x x f +o
y o
)) ( , ( x x f x x o o + +
x
x f x x f
dx
dy
x
x f x x f
x
y
x
x f x x f
x
y
x
x x
o
o
o
o
o
o
o
o
o
o
o
o o
) ( ) (
lim
) ( ) (
lim lim
) ( ) (
0
0 0
+
=
+
=
+
=
Key Point
Given y = f(x), its derivative, or rate of change
of y with respect to x is defined as;
x
x f x x f
dx
dy
x
o
o
o
) ( ) (
lim
0
+
=
Differentiation of y = x
n
when n is a
positive integer
Apply previous definition to the function y = x
n
We have;
And so;
n n n n
n
n
x x nx x x x
x x x x f
x x f
) ( ... ) (
) ( ) (
) (
1
o o o
o o
+ + + = +
+ = +
=
Then, from the formula for the derivative;
In the limit as x tends to zero, all the terms on the right,
apart from the first become zero. We are left with the
result that
1
=
n
nx
dx
dy
1 1
0
1 1
0
1
0
1
0
) ( ...
lim
) ) ( ... (
lim
) ( ...
lim
] ) ( ... [
lim
+ + =
+ +
=
+ +
=
+ + +
=
n n
x
n n
x
n n
x
n n n n
x
x nx
x
x nx x
x
x x nx
x
x x x nx x
dx
dy
o
o
o o
o
o o
o
o o
o
o
o
o
When n is a positive integer;
If y = x
n
then
The result is true when n is a negative integer
and when n is a fraction although we will not
prove this here.
1
=
n
nx
dx
dy
Key Point
Exercises
1.
2.
3.
4.
2
1
x y =
6 1 7
7 7 x x
dx
dy
= =
x x x
dx
dy
2 2 2
1 1 2
= = =
1
= x y
2
x y =
2 1 1
1
= = x x
dx
dy
2
1
1
2
1
2
1
2
1
= = x x
dx
dy
7
x y =
5. .
We obtain the result that the derivative of y = x is simply 1,
as we would expect since y = x is the equation of a straight
line with gradient 1.
6.
Note also that x
0
= 1 and so we are really considering the
constant function y = 1.
Because the graph of this function is a horizontal straight
line the result that its derivative is zero should come as no
surprise.
0 0
1 0
= =
x
dx
dy
x y =
0
x y =
1 1 1
0 1 1
= = =
x x
dx
dy
Exercises
Find the derivative of each of the following:
Linearity rules
If y = f(x) g(x)
then,
This means that we can differentiate sums (and differences)
of functions, term by term.
Also, if y = k f(x) where k is a constant
then,
This means that we can differentiate a constant multiple of a
function, simply by differentiating the function and multiplying
by the constant.
dx
dg
dx
df
dx
dy
=
dx
df
k
dx
dy
=
Exercises
1.
2.
5 12 6
4 3
+ = x x y
25 6 5
7 5
+ + = x x x y
6 4
42 25 1 x x
dx
dy
+ =
3 2 3 2
48 18 0 ) 4 ( 12 ) 3 ( 6 x x x x
dx
dy
= + =
Exercises
3.
4.
4 3 2
18 5
3
4
= x x
dx
dy
3
3
1
6 5 4 x x x y + =
2
1
2
6 6 x x
dx
dy
+ =
8 4 6
1
2
3
+ + = x x
x
y
Exercises
Find the derivative of each of the following:
The Chain Rule
The chain rule, exists for differentiating a function of
another function.
Consider the expression (x
4
+x
2
-9)
10
. We can call such an
expression a function of a function.
Suppose, in general, that we have two functions, f(x) and
g(x). Then y = f(g(x)) is a function of a function.
g(x) = x
4
+x
2
-9 and f(x) = x
10
f(g(x)) = f(x
4
+x
2
-9) = (x
4
+x
2
-9)
10
Key Point
To differentiate y = f(g(x)), let u = g(x).
Then y = f(u) and
dx
du
du
dy
dx
dy
=
Exercise
Differentiate y = (2x-5)
10
Let u = 2x-5 so that y = u
10
. It follows that
9
10
2
u
du
dy
dx
du
=
=
9
9
) 5 2 ( 20
2 10
=
=
=
x
u
dx
du
du
dy
dx
dy
The Product Rule
The product rule: if y = uv then
dx
du
v
dx
dv
u
dx
dy
+ =
Exercise
Find the derivative of y = (3x 2x
2
) (5 +4x).
] 2 3 [ ) 4 5 ( ] 4 5 [ ) 2 3 (
2 2
x x
dx
d
x x
dx
d
x x
dx
dy
+ + + =
2
2 2
2
24 4 15
) 16 8 15 ( ) 8 12 (
) 4 3 )( 4 5 ( ) 4 )( 2 3 (
x x
x x x x
x x x x
+ =
+ =
+ + =
Exercise
1. differentiate.
Find the derivative of the following:
1.
2.
3.
The Quotient Rule
The quotient rule: if y = u then
v
2
v
dx
dv
u
dx
du
v
dx
dy
=
Exercise
Find the derivative of
3 2
1
+
=
x
x
y
2
) 3 2 (
) 3 2 ( ) 1 ( ] 1 [ ) 3 2 (
+
+ +
=
x
x
dx
d
x x
dx
d
x
dx
dy
2
2
3) (2x
5
3) (2x
1)(2) (x 3)(1) (2x
+
=
+
+
=
Exercise
1. Differentiate
2. Find the derivative of the following:
Higher- order derivatives
The derivative of f is the second derivative of f and is
denoted by f .
The derivative of f is the third derivative of f and is
denoted by f '.
) ( )] ( [
" '
x f x f
dx
d
=
Example
0 ) (
48 ) (
48 ) (
6 24 ) (
6 8 ) (
3 2 ) (
) 5 (
) 4 (
" '
2 "
3 '
2 4
=
=
=
=
=
=
x f
x f
x x f
x x f
x x x f
x x x f
Implicit differentiation
Sometimes functions are given not in the form y = f(x) but in a more
complicated form in which it is difficult or impossible to express y
explicitly in terms of x.
Such functions are called implicit functions.
Now we look at how we might differentiate functions of y with
respect to x.
Consider an expression such as;
x
2
+ y
2
4x + 5y 8 = 0
It would be quite difficult to re-arrange this so y was
given explicitly as a function of x.
Key Point
dx
dy
y f
dy
d
y f
dx
d
= )) ( ( )) ( (
Remember, every time we want to differentiate a function
of y with respect to x, we differentiate with respect to y and
then multiply by (dy/dx).
Example -
) 3 2 3 (
3
) 3 2 3 ( 3
3 2 3 3
3 3 3 2
) 3 ( 0 ) ( 3 ) (
) 3 ( ) 6 ( ) ( ) ( ) (
3 6
2
2
2 2
2 2
2 2
3 2 2
3 3 2
3 3 2
+
=
+ =
+ =
= +
= + +
= + +
= + +
y y
x
dx
dy
dx
dy
y y x
dx
dy
dx
dy
y
dx
dy
y x
dx
dy
dx
dy
y x
dx
dy
y
dx
dy
y
dy
d
dx
dy
y
dy
d
x
dx
dy
y
dy
d
y
dx
d
dx
d
y
dx
d
x
dx
d
y
dx
d
y y x y
Suppose we want to differentiate the implicit function
with respect to x.
We differentiate each
term with respect to x:
rearrange
Derivatives of exponential
functions
If f(x) = e
x
1. d[e
x
] = e
x
dx
2. d[e
u
] = e
u
.u
dx
Remember Chain Rule???
Example 1
Differentiate the following functions
-3x
3e f(x) 3. =
2x 2x
2e (2) e (x) f' = =
2x
e f(x) 1. =
-x
e f(x) 2. =
-x -x
-e (-1) e (x) f' = =
-3x -3x
9e (-3) e 3 (x) f' = =
Example 2
Differentiate the following functions
a. f(x)= xe
x
b. f(x)= e
x
x
c. f(x)= xe
x
- e
x
1) (x e
e xe
(1) e xe (x) f'
xe f(x)
x
x x
x x
x
+ =
+ =
+ =
=
x
xe =
+ =
+ =
=
x x x
x x x
x x
e e xe
e (1)] e [xe (x) f'
e xe f(x)
2
x
2
x x
x
x
1) (x e
x
(1) e xe
(x) f'
x
e
f(x)
=
=
Derivatives of the Natural Logarithmic
Function
1.
2.
x
1
x] [ln
dx
d
=
u'
u
1
u] [ln
dx
d
=
Example
Find the derivatives of the functions.
2x ln f(x) 1) =
4) (2x ln f(x) 2)
2
+ = x ln x f(x) 3) =
1) (x ln f(x) 4) + =
1) (2x
1) x(x
ln f(x) 5)
3
2 2
+
+
=