CHAPTER 1.
DIFFERENTIATION 11
In general if y = uv then applying the product rule gives:
y (1) = u(1) v + uv (1)
y (2) = u(2) v + u(1) v (1) + u(1) v (1) + uv (2)
y (3) = u(3) v + 3u(2) v (1) + 2u(2) v (1) + 2u(1) v (2)
+ u(1) v (2) + uv (3)
= u(3) + 3u(2) v (1) + 3u(1) v (2) + uv (3) .
Notice that the binomial coefficients are appearing.
In fact. . .
! " ! "
(n) (n) n (n−1) (1) n (n−2) (2)
y = u v+ u v + u v + ···
1 2
! "
n
+ u(1) v (n−1) + uv (n)
n−1
#n ! "
n (n−k) (k)
= u v , (1.1)
k
k=0
where ! "
n n!
= .
k (n − k)!k!
Equation 1.1 is known as the Leibniz rule for differentiating a product n times.
Example 1.21.
dn y
If y = xex , what is ?
dxn
Using the Leibniz rule with v = x, u = ex gives
! "
dn n d dn−1
y (n) = x n (ex ) + (x) n−1 (ex )
dx 1 dx dx
! " 2 ✿
✘ 0
n d d✘ ✘✘✘
n−2
✘ ✘ x
+ ✘2✘(x) dxn−2 (e ) + 0
2 ✘dx
✘✘
= xex + [Link]
= ex (x + n).
Example 1.22.
d17 y
Let y = x2 sin x. Find.
dx17
Tip: When applying the Leibniz rule for the function uv you should choose v such that it
becomes zero when differentiated a relatively few number of times (if this is possible). So
we choose u = sin x, v = x2 .
17
! "
(17) 2 d 17 d16
y =x (sin x) + 2x (sin x)
dx17 1 dx16
! " 15
17 d
+ 2 15 (sin x) + 0.
2 dx
CHAPTER 1. DIFFERENTIATION 12
Now it can be shown that
d16 d17 d15
(sin x) = sin x, ∴ (cos x) , (− cos x) .
dx16 dx17 dx15
17.16
∴ y (17) = x2 cos x + 17.2x sin x + .2✁. (− cos x)
2✁
= x2 cos x + 34x sin x − 272 cos x.
1.4.2 Parametric differentiation
In many applications a function is expressed using a PARAMETER, e.g.
y = cos 2t, x = sin t,
where the parameter t ≡time (for example).
• For a given value of t, both x and y may be found.
• This implies that we can generate a curve y = f (x).
Example 1.23. If a curve is defined parametrically as
dy d2 y
y = cos 2t, x = sin t, then find and .
dx dx2
First,
dy dx
= −2 sin 2t and = cos t.
dt dt
dy
dy dy dt dt
Thus = . = dx
.
dx $dt%&dx' dt
Chain Rule
Then ✘t
dy −2 sin 2t 4 sin t✘
cos✘
= =− ✘✘t = −4 sin t.
dx cos t ✘cos
What about. . . ? ! "
d2 y d2 y ( d2 x
̸=
dx2 dt2 dt2
By definition
! "
d2 y d dy d
2
= = (−4 sin t)
dx dx dx dx
d dt
= (−4 sin t) (Chain Rule!)
dt dx
cos t 4✘ ✘✘
cos t
= −4 dx = − ✘ = −4.
dt
✘cos✘t
CHAPTER 1. DIFFERENTIATION 13
Example 1.24.
dy d2 y
y = 3 sin θ − sin3 θ, x = cos3 θ, Find , .
dx dx2
In this example θ is the parameter.
dy dy ( dx 3✁ cos θ − 3✁ sin2 θ cos θ
= = ,
dx dθ dθ ) −*3✁ cos2 θ sin
) θ *
cos θ 1 − sin2 θ ✘✘
cos θ✘cos 2 θ✘
=
− cos2 θ sin θ
=
−✘cos✘2✘θ sin θ
cos θ
= − = − cot θ.
sin θ
Meanwhile,
d2 y d d dθ
= (− cot θ) = (− cot θ)
dx2 dx! "( dθ dx
1 ) *
= − − 2 −3 cos2 θ sin θ
sin θ
1
= − .
3 cos θ sin3 θ
2
1.5 Using differentiation
1.5.1 Finding stationary points
Consider the following diagram...
First observe that
1. If f ′ (a) < 0 then f is decreasing near a,
2. If f ′ (b) > 0 then f is increasing near b.
dy
A stationary point is where dx = 0. It can correspond to either. . .
CHAPTER 1. DIFFERENTIATION 14
dy d2 y dy
dx dx2 dx is Classification
0 >0 ⇒ Increasing ⇒ Minimum
0 <0 ⇒ Decreasing ⇒ Maximum
0 =0 ⇒ ??? ⇒ Need more info!
Table 1.3: Using second derivatives to classify stationary points
1. A maximum (derivative changes from positive to negative)
2. A minimum (derivative changes from negative to positive)
3. A point of inflection (second derivative changes sign)
Remark 1.1. A point of inflection does not have to be a stationary point. So watch out!
Second Derivative Tests for stationary points. . .
Example 1.25. For
dy
y = x4 , = 4x3
dx
∴ Stationary point at x = 0.
d2 y
= 12x2 = 0 at x = 0.
dx2
But clearly x = 0 is a minimum, as shown in Figure 1.1.
. . . hence we need a different test. Fortunately, we do have one. . . we can construct a sign
dy d2 y
diagram of dx , as done in Figure 1.2. This works even when dx 2 = 0!
Hence the point x = 0 must be a minimum.
Example 1.26. Find all the stationary points and their nature for
y = f (x) = 3x4 − 4x3 + 1.
CHAPTER 1. DIFFERENTIATION 15
Figure 1.1: A plot of y = x4 . We can see that there is a minimum at x = 0; however, the
usual second derivative test doesn’t work on this one!
dy
Figure 1.2: The sign test for y = x4 . This is done by checking the sign of dx on either
side of the stationary point x = 0., which tells you whether the he tangent to the curve
points up or down for each side of the stationary point.
Calculating the first derivative yields
dy
= 12x3 − 12x2 = 12x2 (x − 1).
dx
At the stationary points
dy
= 0, and so 12x2 (x − 1) = 0,
dx
∴ Stationary points at x = 0, 1.
Now apply the second derivative test. Calculating the second derivative yields
d2 y
= 36x2 − 24x.
dx2
Evaluating the value of the second derivative at the stationary points gives
d2 y
At x=1 = 36 − 24 > 0 ∴ Minimum.
dx2
d2 y
At x=0 = 0 ∴ Use different test.
dx2
dy
For the point x = 0, construct a sign diagram for dx , as done in Figure 1.3
Therefore x = 1 is a minimum, while x = 0 is a point of inflection.
CHAPTER 1. DIFFERENTIATION 16
Figure 1.3: Sign test for the derivative of 3x4 − 4x3 + 1, which demonstrates that x = 0
has a point of inflection.
Example 1.27 (Exam Question (2007)). A curve is given by
x = t2 , y = te−t . (1.2)
dy d2 y
Find dx and dx2
.
Where does the curve have a critical (stationary) point? Is it a maximum, minimum
or point of inflection? Justify your answer.
Solution: First calculate the derivatives using the chain rule...
dy e−t − te−t (1 − t)e−t
= =
dx + 2t −t 2t ,
d2 y 2t −e − (1 − t)e−t − (1 − t)e−t (2)
= .
dx2 (2t)3
−2t − ✚2✚t + 2t2 − 2 + ✚
2✚t
= e−t 3
.
8t
e−t 2
= (t − t − 1).
4t3
e−t e−t e−t
= − 2 − 3.
4t 4t 4t
dy
Note that dx = 0 only when t = 1 (therefore it is the only possible stationary point). For
the second derivative
d2 y -- e−1✓ e−1✓ e−1
- = ✓ − ✓ − < 0,
dx t=1 ✓4
2
✓4 4
so our stationary point is a maximum.
Don’t forget to give the Cartesian coordinates for the maximum! To do this, simply
substitute t = 1 into Equations (1.2). You end up with:
y = 1 × e−1 = e−1 , x = 12 = 1,
1
i.e. the maximum is at (1, ).
e
1.5.2 Curve sketching
Thanks to modern technology, we can use graphics calculators (or even computers!) as
a guide. However, you should work through the following recipe in order to accurately
sketch a curve.
CHAPTER 1. DIFFERENTIATION 17
First let y = f (x). Then follow this recipe:
1) Where is f defined? (Or put another way, where is it undefined?). Typically we can
sometimes get vertical asymptotes.
2) Is f odd or even or neither?
3) Find where f (x) = 0 (if possible), i.e. where the curve cuts the x axis.
4) Find the value of f when x = 0, i.e. y = f (0), where the curve cuts the y axis.
5) Find ALL stationary points and their nature (and the value of f at such points)
6) Analyse the asymptotes
i. Horizontal asymptotes: What happens to y as x → ±∞?
ii. If x = a is a vertical asymptote, what happens as x → a+ and x → a− ?
Note: When the notation of x → a+ is used, this refers to the right-sided limit, i.e. x→a
lim y.
x>a
Similarly, the notation x → a− represents the left-sided limit x→a
lim y.
x<a
Note 2: Often it is possible to deduce the nature of the turning point without calculating
d2 y
dx2
.
1
Example 1.28. Sketch the curve y = f (x) = x2 −1
.
1) Not defined at x = ±1 (i.e. vertical asymptotes as x = ±1).
2) f (−x) = f (x), therefore f (x) is even.
3) f (x) ̸= 0 or all x, therefore f (x) never cuts the x-axis.
4) f (0) = −1, i.e. the curve passes through the y-axis at (0, −1)
5) For the derivative
2x
f ′ (x) = − = 0 when x = 0,
(x2 − 1)2
where the nature of the turning point can be determined by analysing the vertical
asymptotes; you will see that x = 0 is a maximum.
6i) For the horizontal asymptotes,
As x → ∞, f (x) → ∞,
As x → −∞, f (x) → ∞.
6ii) For the vertical asymptotes, look at x → 1 first.
As x → 1+ , f (x) → ∞,
−
As x→1 , f (x) → −∞,
CHAPTER 1. DIFFERENTIATION 18
and similarly for x → −1,
As x → −1+ , f (x) → −∞,
−
As x → −1 , f (x) → ∞.
At last! We are now in a position to sketch the curve; see Figure 1.4.
Figure 1.4: A sketch of the function y = f (x) = 1/(x2 − 1). Observe the stationary point
at x = 0; the fact that this is a maximum has been deduced with the help of the vertical
asymptotes.
Example 1.29. Sketch the graph of
c. (1.3)
Again, we follow the recipe. . .
1) Note that
x(1 − x)
y2 = ,
(2 − x)(2 + x)
therefore there are vertical asymptotes at x = ±2. Also, are only interested in real
y, thus we require y 2 > 0. Hence it follows that y is defined only when
x(1 − x)
> 0.
4 − x2
The RHS of (1.3) may change sign at x = 0, 1, and possibly at the position of the
vertical asymptotes! Consider the following diagram of the sign of y 2 :
x(1−x)
Figure 1.5: You can make a sign diagram for y 2 = (2−x)(2+x) , too! Because y 2 is non-
negative for any real value of y, the function is undefined wherever we find that y 2 < 0.
Therefore the graph of y is undefined for
−2 ≤ x < 0 and 1 < x ≤ 2.