14.4 Implicit Differentiation
Consider the function \(3x-2xy^2+y^3=4\). If \(y\) is a dependent variable (i.e \(y\) is a function of \(x\)) even though we cannot solve
to express \(y\) explicitly as a function of \(x\) we can however still be able to find the rate of change of \(y\) with
respect to \(x\) \(\left (\frac {dy}{dx}\right )\).
Thus we do by implicit differentiation.
e.g \(3x-2xy^2+y^3=4\). Differentiate each term with respect to \(x\) \begin {align*} 3\frac {dx}{dx}-2\left (y^2\frac {dx}{dx}+x(2y)\frac {dy}{dx}\right )+3y^2\frac {dy}{dx} &=0\\\\ 3-2\left (y^2+2xy\frac {dy}{dx}\right )+3y^2\frac {dy}{dx} &=0\\\\ \text {solve for}\quad \frac {dy}{dx}\\\\ -4xy\frac {dy}{dx}+3y^2\frac {dy}{dx} & = 2y^2-3\\\\ \left (3y^2-4xy\right )\frac {dy}{dx} & =2y^2-3\\\\ \implies \qquad \frac {dy}{dx} & =\frac {2y^2-3}{3y^2-4xy}\\ \end {align*}
Solution. (i). Differentiate \(x^{2}+y^{2}=5\) term by term with respect to \(x\), remembering that \(y\) is a function of \(x\) so \(\frac {d}{dx}\left (y^{2}\right ) =2y\frac {dy}{dx}\) by the chain rule: \[2x+2y\frac {dy}{dx}=0 \quad \implies \quad \frac {dy}{dx}=-\frac {x}{y}\quad (y\neq 0).\] The curve is a circle of radius \(\sqrt {5}\), and the answer says the tangent at \((x,y)\) is perpendicular to the radius there — gradients \(-\frac {x}{y}\) and \(\frac {y}{x}\) multiply to \(-1\).
(ii). \(y=\sin ^{-1}x\) means \(\sin y=x\). Differentiating implicitly, \[\cos y\frac {dy}{dx}=1 \quad \implies \quad \frac {dy}{dx}=\frac {1}{\cos y}=\frac {1}{\sqrt {1-\sin ^{2}y}}=\frac {1}{\sqrt {1-x^{2}}},\] the positive root being correct because \(y\) lies in \(\left [-\frac {\pi }{2},\frac {\pi }{2}\right ]\), where the cosine is not negative.
Note 14.19. Part (ii) is worth noticing: implicit differentiation is how every inverse function is differentiated, and it is exactly the method used in the chapter on inverse trigonometric derivatives. Rather than trying to differentiate \(\sin ^{-1}x\) directly, write the relation the other way round, where the differentiation is easy, and solve for \(\frac {dy}{dx}\).
- (a).
- Differentiate \(f(x)=\sqrt {x+1}\) from first principles.
- (b).
- Find \(\frac {dy}{dx}\) for \(y=\frac {\left (2x^{2}-3x+5\right )^{3}}{x-2}\).
Show solution
Solution. (a). By definition, \begin {align*} f'(x)&=\lim _{h\to 0}\frac {\sqrt {x+h+1}-\sqrt {x+1}}{h}\\ &=\lim _{h\to 0}\frac {\left (\sqrt {x+h+1}-\sqrt {x+1}\right ) \left (\sqrt {x+h+1}+\sqrt {x+1}\right )} {h\left (\sqrt {x+h+1}+\sqrt {x+1}\right )}\\ &=\lim _{h\to 0}\frac {(x+h+1)-(x+1)}{h\left (\sqrt {x+h+1}+\sqrt {x+1}\right )} =\lim _{h\to 0}\frac {1}{\sqrt {x+h+1}+\sqrt {x+1}}\\ &=\frac {1}{2\sqrt {x+1}} . \end {align*}
(b). Quotient rule with \(u=\left (2x^{2}-3x+5\right )^{3}\) and \(v=x-2\). The numerator needs the chain rule: \[\frac {du}{dx}=3\left (2x^{2}-3x+5\right )^{2}(4x-3),\quad \frac {dv}{dx}=1 .\] Hence \[\frac {dy}{dx} =\frac {3(x-2)\left (2x^{2}-3x+5\right )^{2}(4x-3)-\left (2x^{2}-3x+5\right )^{3}} {(x-2)^{2}} .\] Taking out the common factor \(\left (2x^{2}-3x+5\right )^{2}\), \[\frac {dy}{dx}=\frac {\left (2x^{2}-3x+5\right )^{2} \left [3(x-2)(4x-3)-\left (2x^{2}-3x+5\right )\right ]}{(x-2)^{2}} =\frac {\left (2x^{2}-3x+5\right )^{2}\left (10x^{2}-30x+13\right )}{(x-2)^{2}} .\]
Problem 14.2. Find \(\frac {dy}{dx}\) for
- (a).
- \(y=x\ln \left (x^{2}+3x\right )\)
- (b).
- \(y=\frac {\sec ^{2}x}{\tan x}\)
Show solution
Solution. (a). Product rule with \(u=x\) and \(v=\ln \left (x^{2}+3x\right )\), the second needing the chain rule: \[\frac {dy}{dx}=\ln \left (x^{2}+3x\right )+x\cdot \frac {2x+3}{x^{2}+3x} =\ln \left (x^{2}+3x\right )+\frac {2x+3}{x+3},\] cancelling one factor of \(x\) in the second term.
(b). Simplify before differentiating, which is far quicker than the quotient rule here: \[y=\frac {\sec ^{2}x}{\tan x} =\frac {1}{\cos ^{2}x}\cdot \frac {\cos x}{\sin x} =\frac {1}{\sin x\cos x}=\frac {2}{\sin 2x}=2\operatorname {cosec}2x .\] Then \[\frac {dy}{dx}=-2\operatorname {cosec}2x\cot 2x\cdot 2 =-4\operatorname {cosec}2x\cot 2x .\]
Problem 14.3. Find the equation of the normal to the curve \[x^{2}+y^{2}-10x+4y-88=0\] at the point \((-4,4)\).
Show solution
Solution. First confirm the point is on the curve: \(16+16+40+16-88=0\), so it is.
Differentiating implicitly, \[2x+2y\frac {dy}{dx}-10+4\frac {dy}{dx}=0 \implies \frac {dy}{dx}=\frac {10-2x}{2y+4}=\frac {5-x}{y+2}.\] At \((-4,4)\) this is \(\frac {5+4}{4+2}=\frac {9}{6}=\frac {3}{2}\), the gradient of the tangent. The normal is perpendicular, so its gradient is \(-\frac {2}{3}\), and \[y-4=-\frac {2}{3}(x+4) \implies y=-\frac {2}{3}x+\frac {20}{3}.\]
Note 14.20. Checking that the point lies on the curve is not a formality. A tangent or normal “at a point” only means something if the point is on the curve, and the differentiation gives an answer regardless — the derivative here does not involve the constant term at all, so the same gradient \(\frac {3}{2}\) would come out whatever that constant were. The check is the only thing standing between a plausible answer and a meaningless one.
Problem 14.4. A shape consists of a rectangle with a semicircular top, the semicircle having radius \(r\) cm and sitting on the top side of the rectangle. The perimeter of the whole shape is \(40\) cm.
- (a).
- Show that the area is \(A=40r-2r^{2}-\frac {\pi r^{2}}{2}\).
- (b).
- Find the value of \(r\) giving the greatest area.
Show solution
Solution. (a). The rectangle has width \(2r\) — the diameter of the semicircle — and height \(x\), say. The perimeter consists of the two vertical sides, the base, and the semicircular arc: \[2x+2r+\pi r=40 \implies x=20-r-\frac {\pi r}{2}.\] The area is the rectangle plus the semicircle: \begin {align*} A&=2rx+\frac {1}{2}\pi r^{2} =2r\left (20-r-\frac {\pi r}{2}\right )+\frac {1}{2}\pi r^{2}\\ &=40r-2r^{2}-\pi r^{2}+\frac {1}{2}\pi r^{2} =40r-2r^{2}-\frac {\pi r^{2}}{2}, \end {align*}
as required.
(b). Differentiate and set to zero: \[\frac {dA}{dr}=40-4r-\pi r=0 \implies r(4+\pi )=40 \implies r=\frac {40}{4+\pi } \approx 5.60\ \text {cm}.\] This is a maximum, since \(\frac {d^{2}A}{dr^{2}}=-4-\pi <0\) everywhere.
Note 14.21. The shape of every optimisation problem is the same, and it is worth naming. There are two variables and one constraint; use the constraint to eliminate one variable, so the quantity to be optimised becomes a function of a single variable, then differentiate.
The step that is easy to skip is the last one in (b). Setting the derivative to zero locates a stationary point but does not say what kind, and a question asking for a maximum is not answered until that is settled — here by the second derivative, which is negative for every \(r\), so the stationary point is the maximum.
Worth checking too that the answer is physically sensible: \(r\approx 5.60\) gives \(x=20-r-\frac {\pi r}{2}\approx 5.60\) as well, both positive, so the shape exists. A negative height would have meant an error somewhere.
Problem 14.5. A solid circular cylinder has fixed volume \(1000\ \text {cm}^{3}\).
- (a).
- Show that its total surface area \(A\ \text {cm}^{2}\) is related to the base radius \(x\) cm by \(A=2\pi x^{2}+\frac {2000}{x}\).
- (b).
- Show that \(A\) is least when \(x^{3}=\frac {500}{\pi }\).
Show solution
Solution. (a). With height \(h\), the volume is \(\pi x^{2}h=1000\), so \(h=\frac {1000}{\pi x^{2}}\). The total surface is two circular ends plus the curved side: \[A=2\pi x^{2}+2\pi x h=2\pi x^{2}+2\pi x\cdot \frac {1000}{\pi x^{2}} =2\pi x^{2}+\frac {2000}{x}.\]
(b). Differentiate, writing \(\frac {2000}{x}\) as \(2000x^{-1}\): \[\frac {dA}{dx}=4\pi x-\frac {2000}{x^{2}} .\] Setting this to zero, \(4\pi x^{3}=2000\), so \[x^{3}=\frac {2000}{4\pi }=\frac {500}{\pi }.\] This is a minimum, since \[\frac {d^{2}A}{dx^{2}}=4\pi +\frac {4000}{x^{3}}>0\] for every \(x>0\).
Note 14.22. The same shape as the earlier optimisation: two variables, one constraint, use the constraint to eliminate one of them. Here the constraint is the fixed volume and \(h\) is the variable eliminated.
Note that the second derivative test is doing real work this time. The first derivative also vanishes for negative \(x\) in the algebra, but a radius cannot be negative, and the positivity of \(\frac {d^{2}A}{dx^{2}}\) for \(x>0\) confirms the one physically meaningful stationary point is the minimum. A can-shaped answer: \(x=\sqrt [3]{500/\pi }\approx 5.42\) cm, giving \(h\approx 10.84\) cm — the height is twice the radius, which is the classic result for the most economical cylinder.
Questions on this section
Stuck on something here? Ask below and it stays attached to this topic.