Advanced Higher Notes (Unit 1) Differential Calculus and Applications
Differential Calculus and Applications
Prerequisites: Differentiating x n , sin x and cos x ; sum/difference and
chain rules; finding max./min.; finding tangents to curves;
finding stationary points and their nature; optimising a
function.
Maths Applications: Higher derivatives; integration.
Real-World Applications: Particle motion; chemical reaction rates; generic
rates of change.
Differentiation from First Principles
Recall from Higher that the derivative of a function f is defined by,
def f ( x + h ) − f ( x )
f ′ (x) = lim
h →0
h
This frightening formula gives a recipe for calculating the derivative of
any function. Using this recipe to calculate the derivative of a function is
called differentiation from first principles. Although not required, it is
useful to see just how painful it is to differentiate a function from first
principles, as we can then be grateful for simpler differentiation
techniques (which come from the definition).
Example 1
1
Differentiate f (x) = x 2
from first principles.
(x + h ) 1 2 − x 1 2
f ′ (x) = lim
h →0 h
1 1
Multiplying the numerator and denominator by (x + h ) 2
+ x 2
gives,
((x + h ) 1 2 − x 1 2 )((x + h ) 1 2 + x 12 )
f ′ (x) = lim
h →0
1 1
h ((x + h ) 2 + x 2 )
Multiplying out the numerator and simplifying gives,
M Patel (April 2012) 1 St. Machar Academy
Advanced Higher Notes (Unit 1) Differential Calculus and Applications
x + h − x
f ′ (x) = lim 1 1
h ((x + h ) + x )
h →0 2 2
Further simplification and rewriting the denominator gives,
1
f ′ (x) = lim
h →0
x + h + x
Taking the limit as h → 0 finally gives,
1
f ′ (x) =
x + x
1
f ′ (x) =
2 x
Notation for Derivatives
The derivative of a function can be written in different ways. Below are
listed some common types.
Notation:
The derivative of a function y = f (x) is written variously as,
y ′ or f ′ (x) (Dash notation aka prime notation or Lagrange notation)
df d dy
or f (x) or (d by dx notation aka Leibniz notation)
dx dx dx
Dy or Df (Big D notation aka Euler notation)
The derivative of a function of time t has an alternative notation.
Notation:
The derivative of a function of time t is often written as,
def
df
f (t) = (Dot notation aka Newton notation)
dt
M Patel (April 2012) 2 St. Machar Academy
Advanced Higher Notes (Unit 1) Differential Calculus and Applications
Higher-Order Derivatives
Sometimes, the derivative of a function can be differentiated.
Definition:
Given a function y = f (x), the higher-order derivative of order n
(aka the n th derivative) is defined by,
d nf def
d d d d d
= f
dx n dx dx dx dx dx
n times
An important special case of this is the second derivative,
d 2f def
d df
=
dx 2 dx dx
In the Euler and Lagrange notations, higher-order derivatives are written
respectively as,
D n f and f (n )
(x)
this Lagrange notation mainly being used for derivatives usually greater
than or equal to 4 (as then the dashes become too numerous). To avoid
ambiguity, sometimes the case when n = 1 is called the first derivative.
The derivatives we consider are technically called ordinary derivatives, in
comparison to partial derivatives, which are derivatives of functions that
are of more than 1 variable. Most interesting equations in science involve
partial derivatives (as the description of most phenomena depends on
more than 1 physical quantity).
Example 2
Find the first and second derivatives of f (x) = x 4 + sin 3x.
f ′ (x) = 4 x 3 + 3 cos 3x
f ′′ (x) = 12 x 2 − 9 sin 3x
M Patel (April 2012) 3 St. Machar Academy
Advanced Higher Notes (Unit 1) Differential Calculus and Applications
Example 3
Find the smallest value of n for which f (n )
(x) = 0 when f (x) = x 3 .
f ′ (x) = 3 x 2
f ′′ (x) = 6x
f ′′’ (x) = 6
(4 )
f (x) = 0
Clearly, all other higher derivatives will be 0 too, so n = 4.
Product and Quotient Rules
The sum, difference and chain rules for differentiating functions are
assumed in this course. In order to differentiate more types of
functions, 2 new rules will be introduced, the first to enable
differentiation of a product of functions, the second to differentiate a
quotient.
Theorem (Product Rule):
Given 2 functions f and g, the derivative of their product is given by,
(f g )′ = f ′ g + f g ′
Theorem (Quotient Rule):
Given 2 functions f and g, the derivative of their quotient (f / g ) is given
by,
1
(f / g )′ = (f ′ g − f g ′ )
g2
The Product Rule is easy to remember because of the + sign. The
Quotient Rule takes more care because of the − sign and the division by
g2 .
M Patel (April 2012) 4 St. Machar Academy
Advanced Higher Notes (Unit 1) Differential Calculus and Applications
Try writing both these rules in Leibniz notation and Euler notation to see
which form is easier (or preferable) to remember.
Example 4
Differentiate h (x) = x 3 cos 2x.
Let f (x) = x 3 and g (x) = cos 2x. The following way of setting out the
working is useful,
f (x) = x 3 , g (x) = cos 2x
f ′ (x) = 3 x 2 , g ′ (x) = − 2 sin 2x
Now substitute everything into the Product Rule,
h ′ (x) = f ′ (x) g (x) + f (x) g ′ (x)
h ′ (x) = (3 x 2 ) cos 2x + x 3 ( − 2 sin 2x)
h ′ (x) = 3 x 2 cos 2x − 2 x 3 sin 2x
h ′ (x) = x 2 (3 cos 2x − 2x sin 2x)
Example 5
x2
Differentiate h (x) = ( x ≠ 1 ), simplifying as much as possible.
(x − 1)3
Let f (x) = x 2 and g (x) = (x − 1) 3 . Then,
f (x) = x 2 , g (x) = (x − 1) 3
f ′ (x) = 2x , g ′ (x) = 3 (x − 1) 2
2
and g ( x ) = (x − 1) 6 (remember rules of indices – power of a power).
Then apply the Quotient Rule to get,
(2x ) (x − 1)3 − x 2 (3 (x − 1)2 )
h ′ (x) =
(x − 1)6
M Patel (April 2012) 5 St. Machar Academy
Advanced Higher Notes (Unit 1) Differential Calculus and Applications
x (x − 1)2 (2 (x − 1) − 3x )
h ′ (x) =
(x − 1)6
x (x − 1)2 ( − x − 2)
h ′ (x) =
(x − 1)6
−x (x + 2)
h ′ (x) =
(x − 1) 4
Reciprocal Trigonometric Functions
There are 3 new trigonometric functions that will be studied in this
course. They are defined using the sine, cosine and tangent functions.
Definition:
The secant function is defined by,
def
1
sec x =
cos x
The domain and range of the secant function are,
π
dom (sec x) = ∖ x ∈ : x = + n π, n ∈
2
ran (sec x) = ∖ ( − 1, 1)
Definition:
The cosecant function is defined by,
def
1
cosec x =
sin x
The domain and range of the cosecant function are,
dom (cosec x) = ∖ {x ∈ : x = n π, n ∈ }
ran (cosec x) = ∖ ( − 1, 1)
M Patel (April 2012) 6 St. Machar Academy
Advanced Higher Notes (Unit 1) Differential Calculus and Applications
Definition:
The cotangent function is defined by,
def
cos x
cot x =
sin x
The domain and range of the cotangent function are,
dom (cot x) = ∖ {x ∈ : x = n π, n ∈ }
ran (cot x) =
Derivatives of Trigonometric Functions
The derivatives of tan x, sec x, cosec x and tan x can be obtained by
using the quotient rule and the derivatives of sin x and cos x.
d
• tan x = sec 2 x
dx
d
• sec x = sec x tan x
dx
d
• cosec x = − cosec x cot x
dx
d
• cot x = − cosec 2 x
dx
Derivatives of exp x and ln x
The derivatives of exp x ( ≡ ex ) and ln x ( ≡ loge x ) require more effort
to obtain. The results will be stated here.
d
• ex = ex
dx
d 1
• ln x =
dx x
M Patel (April 2012) 7 St. Machar Academy
Advanced Higher Notes (Unit 1) Differential Calculus and Applications
Example 6
Differentiate p (x) = e2x sin x.
p ′ (x) = (2 e2x ) sin x + e2x (cos x)
p ′ (x) = e2x (2 sin x + cos x)
Example 7
x2
Differentiate m (x) = .
ln 4x
4 2
(2x ) ln 4x − x
m ′ (x) = 4x
(ln 4x )2
2x ln 4x − x
m ′ (x) =
(ln 4x )2
x (2 ln 4x − 1)
m ′ (x) =
(ln 4x )2
Rectilinear Motion
The derivative of a function gives a measure of the rate of change of a
function with respect to a certain variable. Historically, Calculus was
invented to satisfy the needs of describing physical phenomena. In
particular, the rate of change of functions with respect to time played a
very important role in understanding dynamics through mathematics.
Definition:
Motion in a straight line is called rectilinear motion.
Unless otherwise stated, time will be measured in seconds and distance in
metres.
M Patel (April 2012) 8 St. Machar Academy
Advanced Higher Notes (Unit 1) Differential Calculus and Applications
Definition:
The displacement of a particle from the origin O is the location of the
particle from O after time t. Displacement is denoted by s (t).
Definition:
The velocity of a particle is defined by,
def
ds
v (t) = = s (t)
dt
Definition:
The acceleration of a particle is defined by,
def
dv d 2s
a (t) = = = s (t)
dt dt 2
Example 8
The displacement of a particle from the origin after time t is described
by the function s (t) = 4t 2 − 3t 3 . Find the velocity and acceleration of
the particle when t = 3.
s (t) = 8t − 9t 2 ⇒ s (3) = 8(3) − 9(3) 2 ⇒ s (3) = − 57 m/s
s (t) = 8 − 18t ⇒ s (3) = 8 − 18(3) ⇒ s (3) = − 46 m/s 2
Differentiability of a Function
Recall that a function is differentiable at a point if a unique tangent line
can be drawn through that point. This can be understood in terms of
tangent lines approaching from the left and right to the point in question.
As tangent lines approach from the left and right, the gradients of these
tangent lines should approach the same value. The function should be
‘smooth’ and ‘curvy’ at the point in question.
M Patel (April 2012) 9 St. Machar Academy
Advanced Higher Notes (Unit 1) Differential Calculus and Applications
Definition:
The left-hand derivative of f at x = a is defined by,
def f (a + h) − f (a)
f− ′ (a) = lim−
h →0 h
The right-hand derivative of f at x = a is defined by,
def f (a + h) − f (a)
f+ ′ (a) = lim+
h →0 h
Theorem:
A function is differentiable at a point if and only if both the left-hand
and right-hand derivatives exist at that point and are equal to each other.
Thus, to determine if a function is not differentiable at a point, it
suffices to show one of the following (i) the left-hand derivative does not
exist (ii) the right-hand derivative does not exist (iii) if they both exist,
they are not equal. In terms of the graph of a function, this usually means
identifying a sharp corner (aka ‘ kink ’) or an endpoint (at an endpoint,
obviously one of the derivatives won’t exist).
Example 9
Determine where the function f defined by,
x (0 ≤ x ≤ 3)
f (x) =
3 (x > 3)
is differentiable and where it is not differentiable.
First sketch the graph of f.
M Patel (April 2012) 10 St. Machar Academy
Advanced Higher Notes (Unit 1) Differential Calculus and Applications
y
3
3 x
For 0 < x < 3 , f ′ = 1, so f is differentiable for 0 < x < 3 .
For x > 3 , f ′ = 0, so f is differentiable for x > 3 .
The only unclear points are where x = 0 and x = 3. For x = 0, the left-
hand derivative does not exist, so f is not differentiable at x = 0. For
x = 3, f− ′ (3) = 1 and f+ ′ (3) = 0, so f is not differentiable at x = 3.
Critical Points
A function may have points where the derivative is 0 or where the
derivative does not exist. Such points have a special name.
Definition:
A function f has a critical point at x = a if either f ′ (a) = 0 or f ′ (a)
does not exist. a is called the critical number and f (a) is called the
critical value.
Note that all stationary points are critical points, but not all critical
points are stationary points. Referring to the previous example, f has
critical points at (0, 0), (3, 3) and (x, 3) ( x > 3 ). At (0, 0) and (3, 3), the
derivative doesn’t exist, whereas for (x, 3) ( x > 3 ) the derivative is 0
(i.e. all the points (x, 3) ( x > 3 ) are stationary points).
Extrema of a Function
It is important to know the maximum and minimum values of a function.
Definition:
Maxima and minima of a function are known as extrema.
M Patel (April 2012) 11 St. Machar Academy
Advanced Higher Notes (Unit 1) Differential Calculus and Applications
There are 3 types of extrema.
• Local.
• Endpoint.
• Global.
Definition:
A function f has a local (relative) maximum at x = a if ∃ an open
interval I about a for which f (a) ≥ f (x) ∀x ∈ I .
A function f has a local (relative) minimum at x = a if ∃ an open
interval I about a for which f (a) ≤ f (x) ∀x ∈ I .
Theorem:
All local extrema occur at critical points. Stated differently, if f has a
local extremum, then that local extremum point is also a critical point.
Note that not all critical points are local extrema. Referring back to
Example 9, the point (0, 0) is not a local minimum, but it is a critical point.
Definition:
If a is an endpoint in dom f , f has an endpoint maximum at x = a if ∃
p ∈ dom f for which f (a) ≥ f (x) ( ∀x ∈ [a, p) or (p, a]).
If a is an endpoint in dom f , f has an endpoint minimum at x = a if ∃
p ∈ dom f for which f (a) ≤ f (x) ( ∀x ∈ [a, p) or (p, a]).
Definition:
A function f function has a global (absolute) maximum at x = a if
f (a) ≥ f (x) ( ∀x ∈ dom f ).
A function f function has a global (absolute) minimum at x = a if
f (a) ≤ f (x) ( ∀x ∈ dom f ).
M Patel (April 2012) 12 St. Machar Academy
Advanced Higher Notes (Unit 1) Differential Calculus and Applications
Theorem:
Every global extremum is either a local extremum or endpoint extremum.
Example 10
Classify the extrema for the function f with the graph shown.
y D
A G
B E x
The small circles indicate the extent of where f is defined. The white
circle means that the point is not in dom f, whereas the black circle
means that the point is in dom f.
Let’s analyse the labelled points in turn. Remember, all extrema occur at
critical points.
A is not an endpoint max., as A ∉ dom f (if A were in dom f, then A would
be an endpoint max.). A is not a critical point.
B is a critical point, as f− ′ (B) < 0 and f+ ′ (B) > 0, so ∃ f ′ (B). In
particular, a local min. occurs at B, as all y – values in the immediate
vicinity of f (B) are bigger than f (B); the local min. is also a global min., as
is clear from the graph. So, B is a global minimum.
C is a critical point (even though f− ′ (C) > 0 and f+ ′ (C) > 0, the actual
values are different and there is clearly no smooth transition between
these values; the function is kinky at C, so ∃ f ′ (C)). C is not a local
M Patel (April 2012) 13 St. Machar Academy
Advanced Higher Notes (Unit 1) Differential Calculus and Applications
extremum, as there y – values close to f (C) which are both bigger and
smaller than f (C). C is a critical point.
D is a critical point, as f− ′ (D) > 0 and f+ ′ (D) < 0, so ∃ f ′ (D). D is
obviously a local max. and from the graph it clearly has the largest y –
value. So, D is a global maximum.
E is a critical point, as f ′ (E) = 0. Thus, E is a stationary point. It is a
local as well as a global min. So, E is a global minimum.
F is clearly a critical point (for a similar reason cited for D). It is also a
local max., but not a global max. So, F is a local maximum.
G is a critical point, as ∃ f+ ′ (G). There are x – values to the left of G for
which f (x) > f (G) and G is an endpoint. So, G is an endpoint minimum.
Second Derivatives, Concavity and Points of Inflexion
The second derivative provides a useful measure of how curvy a function
is and how the curviness changes.
Definition:
A function f is concave up on an interval if f ′′ (x) ≥ 0 on that interval.
A function f is concave down on an interval if f ′′ (x) ≤ 0 on that
interval.
Definition:
A function f has a point of inflexion (inflection) at x = a if there is a
change of concavity as the graph passes through x = a.
The above definitions lead to an alternative way of spotting inflexion
points.
Theorem:
If a function f has a point of inflexion at x = a, then either ∃ f ′′ (x) or
f ′′ (x) = 0.
M Patel (April 2012) 14 St. Machar Academy
Advanced Higher Notes (Unit 1) Differential Calculus and Applications
Note that if a function has f ′′ (a) = 0, this does not necessarily mean
that x = a is a P of I. For example, f (x) = x 4 has f ′’ (x) = 12 x 2 and
thus f ′’ (0) = 0. However, (0, 0) is clearly a minimum (sketch the graph).
Inflexion points may be further classified depending on the value of f ′.
Definition:
A function f has a horizontal (stationary) point of inflexion at
x = a if f ′ (a) = 0.
A function has a non-horizontal (non-stationary) point of inflexion at x
= a if f ′ (a) ≠ 0.
For stationary points, there is a useful test for finding local maxima and
minima.
Theorem (Second Derivative Test):
If f ′ (a) = 0 and f ′’ (a) > 0, then f has a local minimum at a.
If f ′ (a) = 0 and f ′’ (a) < 0, then f has a local maximum at a.
If f ′ (a) = 0 and f ′’ (a) = 0, then f may have a local maximum, a local
minimum or a (horizontal) point of inflexion.
In the third case, the P of I must be horizontal, as f ′ = 0.
A nature table is normally used to find maxima, minima and inflexion
points. The Second Derivative Test gives a quick way of deciding whether
a function has maxima or minima. In the third case, a nature table must
be drawn to determine the stationary point.
Example 11
Find all maxima, minima and inflexion points of f (x) = sin x in the
interval (0, 2π).
f ′ (x) = cos x. The stationary points occur at (π/2, 1) and (3π/2, − 1).
M Patel (April 2012) 15 St. Machar Academy
Advanced Higher Notes (Unit 1) Differential Calculus and Applications
f ′’ (x) = − sin x. f ′’ (π/2) = − 1 < 0 and f ′’ (3π/2) = 1 > 0. So, (π/2,
1) is a global maximum and (3π/2, − 1) is a global minimum. As neither the
max. nor min. have f ′’ = 0, any inflexion points will be found by solving
this equation. So, solving − sin x = 0 gives x = π. When x = π, f (π) =
0 and f ′ (π) = − 1 ≠ 0. Thus, (π, 0) is a non-horizontal P of I.
If a function f has a P of I (and f ′’ exists at the point in question), then
f ′′ = 0. Hence, if f ′′ ≠ 0, there do not exist any inflexion points.
Example 12
x − 5
Show that f (x) = has no stationary points and no inflexion
x + 3
points.
Rewriting f using long division gives,
8
f (x) = 1 −
x + 3
8
f ′ (x) =
(x + 3)2
For stationary points, f ′ (x) = 0. However, the equation,
8
= 0
(x + 3)2
obviously has no solutions. Hence, there are no maxima or minima. For any
inflexion points, we need to analyse the second derivative,
16
f ′’ (x) = −
(x + 3)3
Similarly, the equation
16
− = 0
(x + 3)3
has no solutions. Thus, there are no inflexion points.
M Patel (April 2012) 16 St. Machar Academy