1. Simple case: x a x^a x a
d d x ( x a ) = a x a − 1 \frac{d}{dx} (x^a) = a x^{a-1} d x d ( x a ) = a x a − 1
For each term in x x x we can multiply the term by the index of x x x then subtract 1 1 1 from the index of x x x .
By way of example: d d x ( 3 x 2 − 5 x ) = 6 x − 5 \frac{d}{dx} (3x^2 - 5x) = 6x - 5 d x d ( 3 x 2 − 5 x ) = 6 x − 5
2. Simple case: sin x \sin x sin x and cos x \cos x cos x
sin x \sin x sin x and cos x \cos x cos x , where x x x is a small angle in radians:
d d x ( sin k x ) = k cos k x d d x ( cos k x ) = − k sin k x \frac{d}{dx}(\sin kx) = k \cos kx \\
\frac{d}{dx}(\cos kx) = - k \sin kx d x d ( sin k x ) = k cos k x d x d ( cos k x ) = − k sin k x
Note: need to always use radians when differentiating trigonometric functions.
There are also small angle approximations:
sin x ≈ x cos x ≈ 1 − 1 2 x 2 tan x ≈ x \sin x \approx x \\
\cos x \approx 1 - \frac 1 2 x^2 \\
\tan x \approx x sin x ≈ x cos x ≈ 1 − 2 1 x 2 tan x ≈ x
3. Simple case: exponentials and logarithms
The definition of e x e^x e x is that the graph of the gradient is the same as the graph of y = e x y = e^x y = e x ; d d x ( e x ) = e x \frac{d}{dx}(e^x) = e^x d x d ( e x ) = e x
d d x ( e k x ) = k e k x d d x ( ln ( x a ) ) = a x d d x ( a k x ) = a k x k ln a \frac{d}{dx}(e^{kx}) = ke^{kx} \\
\frac{d}{dx}(\ln (x^a)) = \frac a x \\
\frac{d}{dx}(a ^{kx}) = a ^{kx} k \ln a d x d ( e k x ) = k e k x d x d ( ln ( x a )) = x a d x d ( a k x ) = a k x k ln a
where k k k is a real constant and a > 0 a \gt 0 a > 0
4. Chain rule
The chain rule is used to differentiate composite functions i.e. a function of a function.
d y d x = d y d u × d u d x \frac{dy}{dx} = \frac{dy}{du} \times \frac{du}{dx} d x d y = d u d y × d x d u
where y y y is a function of u u u , and u u u is a function of x x x
In general:
If y = ( f ( x ) ) n y = (f(x))^n y = ( f ( x ) ) n then d y d x = n ( f ( x ) ) n − 1 f ′ ( x ) \frac{dy}{dx} = n(f(x))^{n-1} f'(x) d x d y = n ( f ( x ) ) n − 1 f ′ ( x )
If y = f ( g ( x ) ) y = f(g(x)) y = f ( g ( x )) then d y d x = f ′ ( g ( x ) ) g ′ ( x ) \frac{dy}{dx} = f'(g(x)) g'(x) d x d y = f ′ ( g ( x )) g ′ ( x )
By way of example, to differentiate y = ( 3 x 2 − 5 x ) 3 y = (3x^2 - 5x)^3 y = ( 3 x 2 − 5 x ) 3 :
Let u = 3 x 2 − 5 x ⟹ d u d x = 6 x − 5 y = u 3 ⟹ d y d u = 3 u 2 d y d x = d y d u × d u d x ⟹ d y d x = 3 u 2 × ( 6 x − 5 ) = 3 ( 3 x 2 − 5 x ) 2 ( 6 x − 5 ) \text{Let } u = 3x^2 - 5x \implies \frac{du}{dx} = 6x - 5 \\
y = u^3 \implies \frac{dy}{du} = 3u^2 \\
\frac{dy}{dx} = \frac{dy}{du} \times \frac{du}{dx}
\implies \frac{dy}{dx} = 3u^2 \times (6x - 5) \\
= 3(3x^2 - 5x)^2 (6x - 5) Let u = 3 x 2 − 5 x ⟹ d x d u = 6 x − 5 y = u 3 ⟹ d u d y = 3 u 2 d x d y = d u d y × d x d u ⟹ d x d y = 3 u 2 × ( 6 x − 5 ) = 3 ( 3 x 2 − 5 x ) 2 ( 6 x − 5 )
5. Product rule
Used for the product of two functions
If y = u v y = uv y = uv then d y d x = u d v d x + v d u d x \frac{dy}{dx} = u \frac{dv}{dx} + v \frac{du}{dx} d x d y = u d x d v + v d x d u
where u u u and v v v are both functions of x x x
e.g. y = x 2 ( 3 x + 1 ) y = x^2 (3x + 1) y = x 2 ( 3 x + 1 )
Let u = x 2 ⟹ d u d x = 2 x Let v = ( 3 x + 1 ) ⟹ d v d x = 3 \text{Let } u = x^2 \implies \frac{du}{dx} = 2x \\
\text{Let } v = (3x + 1) \implies \frac{dv}{dx} = 3 Let u = x 2 ⟹ d x d u = 2 x Let v = ( 3 x + 1 ) ⟹ d x d v = 3
d y d x = u d v d x + v d u d x = x 2 ( 3 ) + ( 3 x + 1 ) 2 x = 3 x 2 + 2 x ( 3 x + 1 ) = 3 x 2 + 6 x 2 + 2 x = 9 x 2 + 2 x = x ( 9 x + 2 ) \frac{dy}{dx} = u \frac{dv}{dx} + v \frac{du}{dx} = x^2 (3) + (3x + 1) 2x \\
= 3x^2 + 2x(3x + 1) \\
= 3x^2 + 6x^2 + 2x = 9x^2 + 2x = x(9x + 2) d x d y = u d x d v + v d x d u = x 2 ( 3 ) + ( 3 x + 1 ) 2 x = 3 x 2 + 2 x ( 3 x + 1 ) = 3 x 2 + 6 x 2 + 2 x = 9 x 2 + 2 x = x ( 9 x + 2 )
6. Quotient rule
If y = u v y = \frac u v y = v u then d y d x = 1 v 2 ( v d u d x − u d v d x ) \frac{dy}{dx} = \frac{1}{v^2} ( v \frac{du}{dx} - u \frac{dv}{dx} ) d x d y = v 2 1 ( v d x d u − u d x d v )
where u u u and v v v are functions of x x x
Or in function notation:
If f ( x ) = g ( x ) h ( x ) f(x) = \frac{g(x)}{h(x)} f ( x ) = h ( x ) g ( x ) then f ′ ( x ) = 1 ( h ( x ) ) 2 ( h ( x ) g ′ ( x ) − g ( x ) h ′ ( x ) ) f'(x) = \frac{1}{(h(x))^2} ( h(x) g'(x) - g(x) h'(x)) f ′ ( x ) = ( h ( x ) ) 2 1 ( h ( x ) g ′ ( x ) − g ( x ) h ′ ( x ))
By way of example:
y = tan x = sin x cos x = u v d y d x = 1 v 2 ( v d u d x − u d v d x ) u = sin x ⟹ d u d x = cos x v = cos x ⟹ d v d x = − sin x d y d x = 1 cos 2 x × ( ( cos x ) ( cos x ) − ( sin x ) ( − sin x ) ) = cos 2 x + sin 2 x cos 2 x = 1 cos 2 x = sec 2 x y = \tan x = \frac{\sin x}{\cos x} = \frac u v \\
\frac{dy}{dx} = \frac{1}{v^2} ( v \frac{du}{dx} - u \frac{dv}{dx} ) \\
u = \sin x \implies \frac{du}{dx} = \cos x \\
v = \cos x \implies \frac{dv}{dx} = - \sin x \\
\frac{dy}{dx} = \frac{1}{\cos^2 x} \times ( (\cos x) (\cos x) - (\sin x) (- \sin x) ) \\
= \frac{\cos^2 x + \sin^2 x}{\cos^2 x} = \frac{1}{\cos^2 x} = \sec^2 x y = tan x = c o s x s i n x = v u d x d y = v 2 1 ( v d x d u − u d x d v ) u = sin x ⟹ d x d u = cos x v = cos x ⟹ d x d v = − sin x d x d y = c o s 2 x 1 × (( cos x ) ( cos x ) − ( sin x ) ( − sin x )) = c o s 2 x c o s 2 x + s i n 2 x = c o s 2 x 1 = sec 2 x
Generalising; d d x ( tan k x ) = k sec 2 k x \frac{d}{dx} (\tan kx) = k \sec^2 kx d x d ( tan k x ) = k sec 2 k x
Using the quotient rule and differentiating sin x \sin x sin x and cos x \cos x cos x we can derive:
d d x ( tan k x ) = k sec 2 k x d d x ( csc k x ) = − k csc k x cot k x d d x ( sec k x ) = k sec k x tan k x d d x ( cot k x ) = − k csc 2 k x \frac{d}{dx} ( \tan kx ) = k \sec ^2 kx \\
\frac{d}{dx} ( \csc kx ) = -k \csc kx \cot kx \\
\frac{d}{dx} ( \sec kx ) = k \sec kx \tan kx \\
\frac{d}{dx} ( \cot kx ) = -k \csc^2 kx d x d ( tan k x ) = k sec 2 k x d x d ( csc k x ) = − k csc k x cot k x d x d ( sec k x ) = k sec k x tan k x d x d ( cot k x ) = − k csc 2 k x
d y d x = 1 / d x d y \frac{dy}{dx} = 1 / \frac{dx}{dy} d x d y = 1/ d y d x can be used to differentiate the inverse of the trigonometric functions e.g. arcsin x \arcsin x arcsin x
By way of example for arcsin x \arcsin x arcsin x
Let y = arcsin x So x = sin y d x d y = cos y ⟹ d y d x = 1 cos y Using sin 2 y + cos 2 y ≡ 1 cos 2 y = 1 − sin 2 y cos y = 1 − sin 2 y = 1 1 − x 2 \text{Let } y = \arcsin x \\
\text{So } x = \sin y \\
\frac{dx}{dy} = \cos y \implies \frac{dy}{dx} = \frac{1}{\cos y} \\
\text{Using } \sin^2 y + \cos^2 y \equiv 1 \\
\cos^2 y = 1 - \sin^2 y \\
\cos y = \sqrt{1 - \sin^2 y} = \frac{1}{\sqrt{1 - x^2}} Let y = arcsin x So x = sin y d y d x = cos y ⟹ d x d y = c o s y 1 Using sin 2 y + cos 2 y ≡ 1 cos 2 y = 1 − sin 2 y cos y = 1 − sin 2 y = 1 − x 2 1
d d x ( arcsin x ) = 1 1 − x 2 \frac{d}{dx} (\arcsin x) = \frac 1 {\sqrt{1-x^2}} d x d ( arcsin x ) = 1 − x 2 1
d d x ( arccos x ) = − 1 1 − x 2 \frac{d}{dx} (\arccos x) = - \frac 1 {\sqrt{1-x^2}} d x d ( arccos x ) = − 1 − x 2 1
d d x ( arctan x ) = 1 1 + x 2 \frac{d}{dx} (\arctan x) = \frac 1 {1+x^2} d x d ( arctan x ) = 1 + x 2 1
7. Parametric differentiation
If x x x and y y y are both given as functions of a parameter t t t then
d y d x = d y d t / d x d t = d y d t × d t d x \frac{dy}{dx} = \frac{dy}{dt} / \frac{dx}{dt} = \frac{dy}{dt} \times \frac{dt}{dx} d x d y = d t d y / d t d x = d t d y × d x d t
8. Implicit differentiation
Implicit differentiation allows for differentiation to happen more easily when it is difficult to algebraicly manipulate the function you are trying differentiate into the usual y = … y = \dots y = … form.
There are two useful results to bear in mind for implicit differentiation:
d d x ( y n ) = n y ( n − 1 ) d y d x \frac{d}{dx}(y^n) = ny^{(n-1)} \frac{dy}{dx} d x d ( y n ) = n y ( n − 1 ) d x d y
d d x ( x y ) = x d y d x + y \frac{d}{dx}(xy) = x \frac{dy}{dx} + y d x d ( x y ) = x d x d y + y
The first means you can treat y y y just as you would x x x , and then include (multiply by) d y d x \frac{dy}{dx} d x d y . All the d y d x \frac{dy}{dx} d x d y terms can then be collected on one side to be left with the usual d y d x = … \frac{dy}{dx} = \dots d x d y = …
The second can be verified by the use of the product rule, using x y xy x y for u v uv uv .
By way of example:
e 2 x + e 2 y = x y (1) e^{2x} + e^{2y} = xy \text{ (1)} e 2 x + e 2 y = x y (1)
Using the product rule for d d x ( x y ) \frac{d}{dx}(xy) d x d ( x y ) :
d d x ( u v ) = v d u d x + u d v d x Let u = x ⟹ d u d x = 1 Let v = y ⟹ d v d x = 1 d y d x So d d x ( x y ) = y + x d y d x \frac{d}{dx} (uv) = v \frac{du}{dx} + u \frac{dv}{dx} \\
\text{Let } u = x \implies \frac{du}{dx} = 1 \\
\text{Let } v = y \implies \frac{dv}{dx} = 1 \frac{dy}{dx} \\
\text{So } \frac{d}{dx} (xy) = y + x \frac{dy}{dx} d x d ( uv ) = v d x d u + u d x d v Let u = x ⟹ d x d u = 1 Let v = y ⟹ d x d v = 1 d x d y So d x d ( x y ) = y + x d x d y
Differentiating (1) with regard to x x x :
2 e 2 x + 2 e 2 y d y d x = y + x d y d x ⟹ 2 e 2 x − y = x d y d x − 2 e 2 y d y d x = ( x − 2 e 2 y ) d y d x ⟹ d y d x = 2 e 2 x − y x − 2 e 2 y 2e^{2x} + 2e^{2y} \frac{dy}{dx} = y + x \frac{dy}{dx} \\
\implies 2e^{2x} - y = x \frac{dy}{dx} - 2e^{2y} \frac{dy}{dx} = (x - 2e^{2y}) \frac{dy}{dx} \\
\implies \frac{dy}{dx} = \frac{2e^{2x}-y}{x-2e^{2y}} 2 e 2 x + 2 e 2 y d x d y = y + x d x d y ⟹ 2 e 2 x − y = x d x d y − 2 e 2 y d x d y = ( x − 2 e 2 y ) d x d y ⟹ d x d y = x − 2 e 2 y 2 e 2 x − y
—
Appendix — things to remember
If you need to take logs of both sides, use ln \ln ln as this can be differentiated into 1 x \frac 1 x x 1