Differentiation Full Text
Differentiation Full Text
dy
Function: y = f (x) Derivative: = f 0 (x) Comments
dx
xn nxn−1 n must be constant
sin(x) cos(x) angles always in radians!
cos(x) − sin(x)
tan(x) sec2 (x) [= 1/ cos2 (x)]
cot(x) − csc2 (x) [= −1/ sin2 (x)] csc also written as cosec
ex ex
1
ln x needs x > 0
x
1
arcsin(x) √ needs −1 < x < 1
1 − x2
−1
arccos(x) √ needs −1 < x < 1
1 − x2
1
arctan(x)
1 + x2
1
2
Illustration: Find the points on the graph of y = x3 − 5x2 − 8x + 12 at which the tangent
is parallel to the x-axis.
Solution “Parallel to the axis” means that the gradient is zero, and the derivative gives
a formula for the gradient.
dy
Since y = x3 − 5x2 − 8x + 12, = 3x2 − 10x − 8. This factorises into
dx
dy
= (3x + 2)(x − 4)
dx
... which is zero (only) when x = −2/3 and when x = 4.
When x = −2/3, y = x3 − 5x2 − 8x + 12 calculates out as 4 22
27 .
Illustration: Find the equation of the tangent to the graph of tan(x) at the point where
x = π/4.
Solution The tangent, being a straight line, has an equation of the form y = mx + C
where m is the gradient (of curve and of tangent), and the derivative gives a formula for
the gradient.
dy √
Since y = tan(x), = sec2 (x) = 1/ cos2 (x). When x = π/4, cos(x) = 1/ 2 so
dx
1/ cos2 (x) = 2. The gradient is 2.
Now we know the tangent’s equation to be of the form y = 2x + C, and only C remains
to identify.
When x = π/4, y = tan(x) calculates out as 1. Now for the point (π/4, 1) to lie on the
line y = 2x + C, we need 1 = π/2 + C, that is, C = 1 − π/2.
π
AN SW ER : y = 2x + 1 −
2
Turning to the rules for differentiating expressions that are built up out of simple
standard functions, the critical thing to look out for is HOW they are built up.
dy dz π
then = 48x3 and = sec2 (x).
dx dx 3
However, it does not “work straight through” multiplication or division in the same
natural and obvious fashion:
RULE 3: THE PRODUCT RULE
d dv du
(uv) = u +v
dx dx dx
or, in the other (the “dashed”) notation,
Example:
Differentiate x2 cos(x).
Solution and discussion: The critical thing is to realise that this is a product: it is
f (x) times g(x) where f (x) = x2 and g(x) is cos(x). Once you see this, the rest is easy:
f 0 (x) = 2x and g 0 (x) = − sin(x), so the Product Rule gives us an answer of
d
x2 cos(x) = x2 (− sin(x)) + cos(x)(2x)
dx
d u v du − u dv
= dx 2 dx
dx v v
or, in the dashed notation (which might be a bit easier to read this time),
0
g(x)f 0 (x) − f (x)g 0 (x)
f (x)
=
g(x) (g(x))2
Example: √
x + ln x
Differentiate .
sin(x) − x4
Solution and discussion: The critical thing is to realise that this is a quotient: it is
√
f (x) divided by g(x) where f (x) = x + ln x and g(x) is sin(x) − x4 . Once you see this,
√
and remember that x is x1/2 , the rest is routine: f 0 (x) = 21 x−1/2 + x1 (which can be tidied
up in various ways) and g 0 (x) = cos(x) − 4x3 , so the Quotient Rule gives us an answer of
√
(sin(x) − x4 ) 12 x−1/2 + x1 − ( x + ln x)(cos(x) − 4x3 )
(sin(x) − x4 )2
... which, if we had to do anything else with it, we would need to tidy up further, but let’s
leave it like that for the moment!
dv du
• swopping over the u and the v , that is, having u −v as the top line, and
dx dx
• forgetting about the minus in the middle of the top line, thus writing the top line
du dv
as v +u instead of what it should be.
dx dx
Also watch out for disguised divisions: if you are asked to differentiate (for instance)
x3 (sin(x)+ tan(x))−1 , one of your options is first to write it as
x3
sin(x) + tan(x)
A problem involving both product and quotient needs to be broken down into smaller
pieces for safety. For example:
Example:
x cos(x)
Differentiate .
(3 + sin(x))ex
u du dv
Solution and discussion: Begin by seeing this as , and calculating and sepa-
v dx dx
rately, because it would be too messy/risky to try to digest it all at once.
u = x cos(x) is a product so, using the product rule,
du
= x(− sin(x)) + cos(x)(1) = cos(x) − x sin(x).
dx
v = (3 + sin(x))ex is a product so, using the product rule,
dv
= (3 + sin(x))ex + ex (cos(x)) = ex (3 + sin(x) + cos(x)).
dx
u
Now is a quotient so, using the quotient rule,
v
d u (3 + sin(x))ex (cos(x) − x sin(x)) − x cos(x)ex (3 + sin(x) + cos(x)))
=
dx v (3 + sin(x)ex )2
... which, again, we could tidy up and simplify a bit - but we’d need a decent reason for
doing so!
Likewise, a product involving three or more factors should be broken up into bite-sized
pieces. For instance, to differentiate x6 ex tan(x),
• then, knowing what du/dx is, use the product rule again to get the derivative of the
product uv.
0.1. DERIVATIVES OF STANDARD FUNCTIONS 5
Example:
Differentiate f (x) = esin(x) .
Solution and discussion: This visibly involves the exponential function and the sine
function, but how are they connected? Not just by multiplying, for sure!
Think: if I give you a numerical value for x, and ask you to work out f (x), what would
you do?
I think you would first calculate the sine of the number I gave you.
Then you would take that number and “feed it into” the exponential function.
Critically, then, f (x) is not just a function of x, it is a function of a function of x –
a so-called composite function. The fingerprints of these are that you need to take the
output of one function, and put it through the machinery of another function.
To see (in slow motion) how to differentiate this, let’s again break it down into smaller,
simpler pieces. Instead of, say, y = esin(x) , let’s write
y = eu where u = sin(x).
On the first half of that line, only the exponential function is working, so it is easy to
differentiate... but since y is presented as a function of (the controlling variable) u, it is
dy
that we shall find:
du
dy
= eu .
du
Go again... On the second half of that line, only the sine function is working, so it is
easy to differentiate... but since u is presented as a function of (the controlling variable)
du
x, it is that we shall find:
dx
du
= cos(x).
dx
dy du
Story so far: = eu and = cos(x).
du dx
dy du dy
Now if only we had a way to combine and to get at , we’d be finished.
du dx dx
dy du
Of course, anybody’s first reasonable guess is that if we multiply together and ,
du dx
dy
we really ought to get . That is poor logic, because these objects are not fractions.
dx
Nevertheless, they combine as if they were fractions. So, in the present case,
dy dy du
=
dx du dx
6
= eu cos(x)
which, for politeness and for future use (since u was a temporary label that we introduced
to help us work, and not part of the original question) we should rewrite as
dy
= cos(x)esin(x) .
dx
This is what the Chain Rule says: that derivatives, when we choose to write them in
the form of “fractions”
d[something]
,
d[something else]
multiply as if they really were fractions.
CHAIN RULE:
dy du dy
=
du dx dx
or, in the dashed notation (which honestly is more awkward-looking this time),
Example:
Differentiate tan(x2 − 4x3 ).
Strategy: pick it apart: could choose y = tan(u) where u = x2 − 4x3 .
dy du
Then = sec2 (u) and = 2x − 12x2 .
du dx
dy dy du
Chain Rule says = = sec2 (u)(2x − 12x2 ) = 2x(1 − 6x) sec2 (u).
dx du dx
ANSWER: 2x(1 − 6x) sec2 (x2 − 4x3 ).
Example:
Differentiate ln(x + ex ).
Strategy: pick it apart: for instance, y = ln(u) where u = x + ex .
dy 1 du
Then = and = 1 + ex .
du u dx
dy dy du 1
Chain Rule says = = (1 + ex ).
dx du dx u
1 + ex
ANSWER: .
x + ex
Example:
Differentiate (sin(x) + tan(x))−1 .
Strategy: pick it apart: y = u−1 ) where u = sin(x) + tan(x).
dy 1 du
Then = −u−2 = − 2 and = cos(x) + sec2 (x).
du u dx
dy dy du cos(x) + sec2 (x)
Chain Rule says = =− .
dx du dx (sin(x) + tan(x))2
0.1. DERIVATIVES OF STANDARD FUNCTIONS 7
Example:
√
Differentiate sin(ln(2 + x)).
[Function of a function of a function of x? Works in exactly the same way.]
√
Strategy: pick it apart: let’s go for y = sin(u) where u = ln v andv = 2 + x.
dy du 1 dv
Then = cos(u) and = and = 12 x−1/2 .
du dv v dx
dy dy du dv 11 cos(u)
Chain Rule says = = cos(u) x−1/2 = √ .
dx du dv dx v2 2v x
[Don’t forget to translate back into terms of the original variables.]
√
cos(ln(2 + x)
ANSWER: √ √ .
2 x(2 + x))