Once you have the chain rule, you can differentiate any function that is built out of standard pieces, however tangled it looks. So we start there. Then we collect the derivatives of the inverse trigonometric, exponential and logarithmic functions, and learn three techniques for awkward cases: implicit, logarithmic and parametric differentiation.
The chain rule#
If y = f ( u ) y = f(u) y = f ( u ) and u = g ( x ) u = g(x) u = g ( x ) , then d y d x = d y d u ⋅ d u d x \displaystyle \frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx} d x d y = d u d y ⋅ d x d u . In words you can say to yourself while working: differentiate the outside, keep the inside as it is, then multiply by the derivative of the inside.
Example 1. d d x sin ( 3 x 2 + 1 ) = 6 x cos ( 3 x 2 + 1 ) \displaystyle \tfrac{d}{dx}\sin(3x^2 + 1) = 6x\cos(3x^2 + 1) d x d sin ( 3 x 2 + 1 ) = 6 x cos ( 3 x 2 + 1 ) . d d x ( 2 x − 5 ) 7 = 14 ( 2 x − 5 ) 6 \displaystyle \tfrac{d}{dx}(2x - 5)^7 = 14(2x - 5)^6 d x d ( 2 x − 5 ) 7 = 14 ( 2 x − 5 ) 6 . d d x cos x = − sin x 2 cos x \displaystyle \tfrac{d}{dx}\sqrt{\cos x} = -\tfrac{\sin x}{2\sqrt{\cos x}} d x d cos x = − 2 c o s x s i n x .
Standard derivatives to know by heart#
Example 2. d d x e sin x = cos x e sin x \displaystyle \tfrac{d}{dx}e^{\sin x} = \cos x\, e^{\sin x} d x d e s i n x = cos x e s i n x . d d x log ( x 2 + 4 ) = 2 x x 2 + 4 \displaystyle \tfrac{d}{dx}\log(x^2 + 4) = \tfrac{2x}{x^2 + 4} d x d log ( x 2 + 4 ) = x 2 + 4 2 x . d d x tan − 1 ( 3 x ) = 3 1 + 9 x 2 \displaystyle \tfrac{d}{dx}\tan^{-1}(3x) = \tfrac{3}{1 + 9x^2} d x d tan − 1 ( 3 x ) = 1 + 9 x 2 3 .
Example 3. y = sin − 1 2 x 1 + x 2 \displaystyle y = \sin^{-1}\frac{2x}{1 + x^2} y = sin − 1 1 + x 2 2 x for ∣ x ∣ < 1 \lvert x \rvert < 1 ∣ x ∣ < 1 . Do not differentiate this head-on. Substitute x = tan θ x = \tan\theta x = tan θ and it simplifies to y = 2 θ = 2 tan − 1 x y = 2\theta = 2\tan^{-1}x y = 2 θ = 2 tan − 1 x , so d y d x = 2 1 + x 2 \displaystyle \tfrac{dy}{dx} = \tfrac{2}{1 + x^2} d x d y = 1 + x 2 2 .
Implicit differentiation#
Sometimes the two variables are tangled up and one cannot be pulled out on its own. No problem: differentiate both sides with respect to x x x , remembering that y y y is a function of x x x .
Example 4. x 2 + x y + y 2 = 7 x^2 + xy + y^2 = 7 x 2 + x y + y 2 = 7 . Differentiating, 2 x + y + x y ′ + 2 y y ′ = 0 2x + y + x y' + 2y y' = 0 2 x + y + x y ′ + 2 y y ′ = 0 , so y ′ = − 2 x + y x + 2 y \displaystyle y' = -\frac{2x + y}{x + 2y} y ′ = − x + 2 y 2 x + y .
Logarithmic differentiation#
When you face long products and quotients, or a variable raised to a variable power, take log \log log first. It turns products into sums, which are much easier to handle.
Example 5. y = x x y = x^x y = x x . Taking logs, log y = x log x \log y = x\log x log y = x log x , so y ′ y = log x + 1 \displaystyle \tfrac{y'}{y} = \log x + 1 y y ′ = log x + 1 , and therefore y ′ = x x ( 1 + log x ) y' = x^x(1 + \log x) y ′ = x x ( 1 + log x ) .
Example 6. y = ( x + 1 ) 2 x − 2 ( x + 4 ) 3 \displaystyle y = \frac{(x + 1)^2\sqrt{x - 2}}{(x + 4)^3} y = ( x + 4 ) 3 ( x + 1 ) 2 x − 2 . Taking logs and differentiating, y ′ y = 2 x + 1 + 1 2 ( x − 2 ) − 3 x + 4 \displaystyle \tfrac{y'}{y} = \tfrac{2}{x + 1} + \tfrac{1}{2(x - 2)} - \tfrac{3}{x + 4} y y ′ = x + 1 2 + 2 ( x − 2 ) 1 − x + 4 3 .
When both coordinates are given in terms of a parameter, x = f ( t ) x = f(t) x = f ( t ) and y = g ( t ) y = g(t) y = g ( t ) , divide the two rates: d y d x = d y / d t d x / d t \displaystyle \frac{dy}{dx} = \frac{dy/dt}{dx/dt} d x d y = d x / d t d y / d t .
Example 7. x = 3 cos t x = 3\cos t x = 3 cos t , y = 3 sin t y = 3\sin t y = 3 sin t : d y d x = 3 cos t − 3 sin t = − cot t \displaystyle \tfrac{dy}{dx} = \tfrac{3\cos t}{-3\sin t} = -\cot t d x d y = − 3 s i n t 3 c o s t = − cot t .
x = 3 cos t, y = 3 sin t traces a circle of radius 3; the tangent at parameter t has slope -cot t.
Example 8. x = a t 2 x = at^2 x = a t 2 , y = 2 a t y = 2at y = 2 a t : d y d x = 2 a 2 a t = 1 t \displaystyle \tfrac{dy}{dx} = \tfrac{2a}{2at} = \tfrac{1}{t} d x d y = 2 a t 2 a = t 1 .
The second derivative d 2 y d x 2 \displaystyle \tfrac{d^2y}{dx^2} d x 2 d 2 y just means differentiating d y d x \displaystyle \tfrac{dy}{dx} d x d y once more. For example, if y = A sin 2 x + B cos 2 x y = A\sin 2x + B\cos 2x y = A sin 2 x + B cos 2 x , then y ′ ′ = − 4 y y'' = -4y y ′′ = − 4 y , which is the same as y ′ ′ + 4 y = 0 y'' + 4y = 0 y ′′ + 4 y = 0 .
Try these yourself#
Differentiate: cos ( 5 x − 2 ) \cos(5x - 2) cos ( 5 x − 2 ) ; ( 3 x 2 − x + 1 ) 4 (3x^2 - x + 1)^4 ( 3 x 2 − x + 1 ) 4 ; sin 3 x \sin^3 x sin 3 x ; 1 + e 2 x \sqrt{1 + e^{2x}} 1 + e 2 x .
Differentiate: e x 2 e^{x^2} e x 2 ; log ( sin x ) \log(\sin x) log ( sin x ) ; x 2 e x x^2 e^x x 2 e x ; log x x \displaystyle \frac{\log x}{x} x log x .
Differentiate: sin − 1 ( 2 x ) \sin^{-1}(2x) sin − 1 ( 2 x ) ; tan − 1 ( e x ) \tan^{-1}(e^x) tan − 1 ( e x ) ; cos − 1 1 − x 2 1 + x 2 \displaystyle \cos^{-1}\frac{1 - x^2}{1 + x^2} cos − 1 1 + x 2 1 − x 2 for 0 < x < 1 0 < x < 1 0 < x < 1 .
Find d y d x \displaystyle \tfrac{dy}{dx} d x d y : x 3 + y 3 = 6 x y x^3 + y^3 = 6xy x 3 + y 3 = 6 x y ; sin ( x y ) + y = x \sin(xy) + y = x sin ( x y ) + y = x .
Find d y d x \displaystyle \tfrac{dy}{dx} d x d y : y = ( sin x ) x y = (\sin x)^x y = ( sin x ) x ; y = x sin x y = x^{\sin x} y = x s i n x ; y = 2 x + x 2 y = 2^x + x^2 y = 2 x + x 2 .
Find d y d x \displaystyle \tfrac{dy}{dx} d x d y : x = t 2 + 1 x = t^2 + 1 x = t 2 + 1 , y = t 3 − t y = t^3 - t y = t 3 − t ; x = a ( θ − sin θ ) x = a(\theta - \sin\theta) x = a ( θ − sin θ ) , y = a ( 1 − cos θ ) y = a(1 - \cos\theta) y = a ( 1 − cos θ ) .
Find d 2 y d x 2 \displaystyle \tfrac{d^2y}{dx^2} d x 2 d 2 y : y = x 3 log x y = x^3 \log x y = x 3 log x ; y = e 3 x cos x y = e^{3x}\cos x y = e 3 x cos x .
If y = e 2 x + e − 2 x y = e^{2x} + e^{-2x} y = e 2 x + e − 2 x , show y ′ ′ = 4 y y'' = 4y y ′′ = 4 y .
If y = tan − 1 x y = \tan^{-1}x y = tan − 1 x , show ( 1 + x 2 ) y ′ ′ + 2 x y ′ = 0 (1 + x^2)y'' + 2xy' = 0 ( 1 + x 2 ) y ′′ + 2 x y ′ = 0 .
If e y ( x + 1 ) = 1 e^y(x + 1) = 1 e y ( x + 1 ) = 1 , show y ′ ′ = ( y ′ ) 2 y'' = (y')^2 y ′′ = ( y ′ ) 2 .
Answers to check against#
Show answers
− 5 sin ( 5 x − 2 ) -5\sin(5x - 2) − 5 sin ( 5 x − 2 ) ; 4 ( 3 x 2 − x + 1 ) 3 ( 6 x − 1 ) 4(3x^2 - x + 1)^3(6x - 1) 4 ( 3 x 2 − x + 1 ) 3 ( 6 x − 1 ) ; 3 sin 2 x cos x 3\sin^2 x\cos x 3 sin 2 x cos x ; e 2 x 1 + e 2 x \displaystyle \tfrac{e^{2x}}{\sqrt{1 + e^{2x}}} 1 + e 2 x e 2 x .
2 x e x 2 2xe^{x^2} 2 x e x 2 ; cot x \cot x cot x ; e x ( x 2 + 2 x ) e^x(x^2 + 2x) e x ( x 2 + 2 x ) ; 1 − log x x 2 \displaystyle \tfrac{1 - \log x}{x^2} x 2 1 − l o g x .
2 1 − 4 x 2 \displaystyle \tfrac{2}{\sqrt{1 - 4x^2}} 1 − 4 x 2 2 ; e x 1 + e 2 x \displaystyle \tfrac{e^x}{1 + e^{2x}} 1 + e 2 x e x ; with x = tan θ x = \tan\theta x = tan θ it becomes 2 tan − 1 x 2\tan^{-1}x 2 tan − 1 x , giving 2 1 + x 2 \displaystyle \tfrac{2}{1 + x^2} 1 + x 2 2 .
2 y − x 2 y 2 − 2 x \displaystyle \tfrac{2y - x^2}{y^2 - 2x} y 2 − 2 x 2 y − x 2 ; 1 − y cos ( x y ) 1 + x cos ( x y ) \displaystyle \tfrac{1 - y\cos(xy)}{1 + x\cos(xy)} 1 + x c o s ( x y ) 1 − y c o s ( x y ) .
( sin x ) x ( log sin x + x cot x ) (\sin x)^x(\log\sin x + x\cot x) ( sin x ) x ( log sin x + x cot x ) ; x sin x ( cos x log x + sin x x ) \displaystyle x^{\sin x}\left(\cos x\log x + \tfrac{\sin x}{x}\right) x s i n x ( cos x log x + x s i n x ) ; 2 x log 2 + 2 x 2^x\log 2 + 2x 2 x log 2 + 2 x .
3 t 2 − 1 2 t \displaystyle \tfrac{3t^2 - 1}{2t} 2 t 3 t 2 − 1 ; sin θ 1 − cos θ = cot θ 2 \displaystyle \tfrac{\sin\theta}{1 - \cos\theta} = \cot\tfrac{\theta}{2} 1 − c o s θ s i n θ = cot 2 θ .
6 x log x + 5 x 6x\log x + 5x 6 x log x + 5 x ; e 3 x ( 8 cos x − 6 sin x ) e^{3x}(8\cos x - 6\sin x) e 3 x ( 8 cos x − 6 sin x ) .
y ′ ′ = 4 e 2 x + 4 e − 2 x y'' = 4e^{2x} + 4e^{-2x} y ′′ = 4 e 2 x + 4 e − 2 x .
y ′ = 1 1 + x 2 \displaystyle y' = \tfrac{1}{1 + x^2} y ′ = 1 + x 2 1 , y ′ ′ = − 2 x ( 1 + x 2 ) 2 \displaystyle y'' = -\tfrac{2x}{(1 + x^2)^2} y ′′ = − ( 1 + x 2 ) 2 2 x .
y = − log ( x + 1 ) y = -\log(x + 1) y = − log ( x + 1 ) : y ′ = − 1 x + 1 \displaystyle y' = -\tfrac{1}{x + 1} y ′ = − x + 1 1 , y ′ ′ = 1 ( x + 1 ) 2 \displaystyle y'' = \tfrac{1}{(x + 1)^2} y ′′ = ( x + 1 ) 2 1 .