MAT1051 · Week 6 · The Derivative of Trigonometric Functions, the Chain Rule and Implicit Differentiation
Trigonometric derivatives, the chain rule and implicit differentiation
Derivatives of the six trigonometric functions, the chain rule for nested functions, and implicit differentiation for curves where y cannot be written in terms of x. The longest derivative questions on the midterm come from here.
Last week you differentiated polynomial and rational functions. This week the toolbox is completed: trigonometric functions, nested functions and curves where y cannot be written explicitly. The chain rule is everywhere for the rest of the semester: logarithmic differentiation, related rates and substitution in integrals are all built on it. This week, make these four automatic:
Memorize the six trigonometric derivatives. The ones starting with “c” have a minus sign in the derivative.
The chain rule works from the outside in. Take the derivative of each layer, leave its inside as it is, and multiply them all.
sin3(2x) has three layers: cube, sine, 2x.
In implicit differentiation every term containing y is multiplied by y′, because y is actually a function of x.
Derivatives of the trigonometric functions
Everything comes from a single limit. If you put the addition formula sin(x+h)=sinxcosh+cosxsinh into the definition:
hsin(x+h)−sinx=sinx⋅hcosh−1+cosx⋅hsinh
As h→0, hcosh−1→0 and hsinh→1. The result is (sinx)′=cosx. Cosine follows the same way, and the other four come from the quotient rule.
The identity sin2x+cos2x=1 is the key to simplifying trigonometric derivatives. Look for it before you leave the answer.
PITFALL · degrees and derivatives. The formulas are for radians. If x were in degrees, sinx∘=sin180πx and its derivative would be 180πcosx∘. In a calculus exam, angles are in radians.
The chain rule
If y=f(g(x)), then
dxdy=f′(g(x))⋅g′(x)
In Leibniz notation, with u=g(x):
dxdy=dudy⋅dxdu
Intuition: if u changes 3 times as fast as x, and y changes 2 times as fast as u, then y changes 2⋅3=6 times as fast as x.
Separating the layers
In the chain rule the real work is seeing the layers of the function. Ask yourself “what is the last operation performed?” That is the outer function.
Expression
Outer
Inner
Derivative
(x2+5x)4
u4
x2+5x
4(x2+5x)3(2x+5)
sin(x2)
sinu
x2
2xcos(x2)
sin2x
u2
sinx
2sinxcosx=sin2x
tan3x
u
tan3x
2tan3x3sec23x
Note the difference between sin(x2) and sin2x. In the first, you square first and then apply the sine; in the second, sine first, then square.
First the product rule, then the chain rule inside each piece where needed. To simplify, use the common denominator 21−x.
PITFALL · forgetting to differentiate the inside. Writing (sin5x)′=cos5x is the most common way to lose points on an exam. The correct answer is 5cos5x. At every chain step ask “what is the derivative of the inside?”
The chain rule with table values
If a table of values is given instead of formulas, the same rule applies: for h(x)=f(g(x)), h′(a)=f′(g(a))⋅g′(a). f′ is evaluated at g(a), not at a. First find g(a), then look up that value in the f′ table.
Implicit differentiation
In the circle x2+y2=25 you cannot write y in terms of x with a single formula (y=±25−x2, two pieces). In implicit differentiation you differentiate without solving for y.
Method:
Differentiate both sides of the equation with respect to x.
In every term containing y use the chain rule: dxd[yn]=nyn−1y′.
Collect the terms containing y′ on one side, factor out y′, and divide.
Example 6 (circle).x2+y2=25, tangent at the point (3,−4).
2x+2yy′=0⇒y′=−yx
At (3,−4), y′=−−43=43. Tangent: y+4=43(x−3). Geometry says the same: the tangent is perpendicular to the radius; the slope of the radius is −34 and that of the tangent is 43.
Example 7 (with a product).x2y+y3=10, y′ at (3,1).
For y′′, differentiate the y′ expression again. Replace the resulting y′ with the formula you found, then simplify using the curve equation.
Example 8. For x2+y2=25, y′=−yx.
y′′=−y21⋅y−x⋅y′=−y2y−x(−yx)=−y3y2+x2=−y325
In the last step x2+y2=25 was used. At (3,4), y′′=−6425<0: the upper semicircle is concave down, which makes sense.
The rational power rule
Implicit differentiation is also the proof of the rule (xp/q)′=qpxp/q−1: if y=xp/q, then yq=xp; differentiate: qyq−1y′=pxp−1, and solve for y′. For example (x2/3)′=32x−1/3.
PITFALL · differentiating y as if it were a constant. Writing dxd[y2]=2y is wrong; the correct answer is 2yy′. Likewise dxd[xy] is not y, it is y+xy′. Every time y appears, a y′ is born.
Common mistakes
Wrong thinking
Correct
(cosx)′=sinx
−sinx
(sin5x)′=cos5x
5cos5x, the derivative of the inside
(sin2x)′=2cosx
2sinxcosx
(sinx2)′=cos2x
2xcos(x2)
[(x2+1)5]′=5(2x)4
5(x2+1)4⋅2x
h′(a)=f′(a)g′(a)
f′(g(a))g′(a)
dxdy3=3y2
3y2y′
dxd(xy)=xy′
y+xy′ (product rule)
In implicit differentiation, the derivative of the constant on the right side is a constant
The derivative of a constant is 0
Substituting the point without checking it
First verify that the point is on the curve
Test yourself
Exam-style questions. Solve them on paper first, then reveal the answer.
Question 1easy
Differentiate y=x2sinx.
Show answer
y′=2xsinx+x2cosx
Product rule: (x2)′sinx+x2(sinx)′=2xsinx+x2cosx.
Question 2medium
Differentiate y=secxtanx.
Show answer
y′=secxtan2x+sec3x
Product rule: (secx)′tanx+secx(tanx)′=(secxtanx)tanx+secx⋅sec2x=secxtan2x+sec3x. If you like, you can also write it as 2sec3x−secx using tan2x=sec2x−1.
Question 3easy
Differentiate y=(3x2−5)7.
Show answer
y′=42x(3x2−5)6
The outer function is u7, the inner function is u=3x2−5. Chain rule: 7u6⋅u′=7(3x2−5)6⋅6x=42x(3x2−5)6.
Question 4medium
Differentiate y=sin3(2x).
Show answer
y′=6sin2(2x)cos(2x)
Three layers: cube, sine, 2x. From outside to inside: 3sin2(2x)⋅cos(2x)⋅2=6sin2(2x)cos(2x).
Question 5medium
Differentiate y=1+cos2x.
Show answer
y′=−1+cos2xsinxcosx
y=(1+cos2x)1/2. Root: 21(1+cos2x)−1/2. Derivative of the inside: 2cosx⋅(−sinx). Multiply: 21+cos2x−2sinxcosx=−1+cos2xsinxcosx.
Question 6medium
Differentiate y=cos(x2+1).
Show answer
y′=−x2+1xsinx2+1
Outer: cosu, its derivative is −sinu. Middle: u=v, its derivative is 2v1. Inner: v=x2+1, its derivative is 2x. Multiply: −sinx2+1⋅2x2+12x.
Question 7medium
Find dxdy at the point (1,2) on the curve x2+xy+y2=7.
Show answer
−54
First check that the point is on the curve: 1+2+4=7. Differentiate every term with respect to x (product rule for xy): 2x+(y+xy′)+2yy′=0. Collect y′: y′(x+2y)=−(2x+y), y′=−x+2y2x+y. At (1,2): −54.
Question 8medium
Find the equation of the tangent line to x3+y3=9 at (1,2).
Show answer
y=−41x+49
3x2+3y2y′=0⇒y′=−y2x2. At (1,2), y′=−41. Line: y−2=−41(x−1), that is y=−41x+49.
Question 9hard
Find dxdy if sin(xy)=x.
Show answer
dxdy=xcos(xy)1−ycos(xy)
Chain rule on the left side, product rule for the inner xy: cos(xy)⋅(y+xy′)=1. Expand: ycos(xy)+xcos(xy)y′=1. Isolate y′: y′=xcos(xy)1−ycos(xy).
Question 10hard
For the curve x2−y2=9, show that dx2d2y=−y39, and evaluate it at (5,4).
Show answer
y′′(5,4)=−649
First derivative: 2x−2yy′=0⇒y′=yx. Differentiate again with the quotient rule, remembering that y depends on x: y′′=y2y−xy′=y2y−x⋅yx=y3y2−x2. By the curve equation y2−x2=−9, so y′′=−y39. At (5,4): −649.
Question 11easy
Let h(x)=f(g(x)), where g(1)=3, g′(1)=2, and f′(3)=−4. Find h′(1).
Show answer
-8
Chain rule: h′(1)=f′(g(1))⋅g′(1)=f′(3)⋅2=(−4)(2)=−8. Note that you evaluate f′ at g(1)=3, not at 1.
Question 12hard
Find all points on the curve x2−xy+y2=3 where the tangent line is horizontal.
Show answer
(1, 2) and (-1, -2)
2x−(y+xy′)+2yy′=0⇒y′(2y−x)=y−2x⇒y′=2y−xy−2x. Horizontal tangent: the numerator is zero, y=2x. Substitute into the curve: x2−2x2+4x2=3⇒3x2=3⇒x=±1. The points are (1,2) and (−1,−2). Check the denominator: 2y−x=3 and −3, not zero.
Verification: All derivatives were checked with node (verify/MAT1051/06.mjs): explicit derivatives by the central difference at five points; for implicit derivatives the curve was solved locally as y(x) with Newton's method, and dy/dx and y'' were computed numerically and compared with the formula.
Review card
(sin x)' = cos x (cos x)' = -sin x (tan x)' = sec^2 x
(sec x)' = sec x tan x (csc x)' = -csc x cot x (cot x)' = -csc^2 x
The ones starting with "c" (cos, csc, cot) have a MINUS in the derivative
All valid in RADIANS
CHAIN: [f(g(x))]' = f'(g(x)) · g'(x) outside to inside, multiply the derivative of each layer
dy/dx = dy/du · du/dx
sin^n(u)' = n sin^(n-1)(u) · cos(u) · u'
[u^n]' = n u^(n-1) u' [sqrt(u)]' = u' / (2 sqrt(u))
IMPLICIT: d/dx of both sides; every term containing y gets multiplied by y'
(y^2)' = 2y y' (xy)' = y + x y' sin(y)' = cos(y) y'
Isolate y'; if a point is given, substitute afterwards
y'': differentiate the y' expression again, then replace the resulting y' with the expression you found