Title: Default for 11.7 Implicit Differentiation
Course: HELM Workbooks 2023-2024

Exercise

Use implicit differentiation to find  \[\frac{dy}{dx}\]
for the graph of  \[x^[value]+y^[value]=[value]xy.\]

\( \dfrac{dy}{dx} =\)
Feedback: To find \(\dfrac{dy}{dx}\) for the graph of \(x^[value]+y^[value]=[value]xy\) rearrange the equation to give: \[x^[value]+y^[value]-[value]xy =0.\] Thus: \[\frac{d}{dx}\left(x^[value]+y^[value]-[value]xy\right) =0\] \[[value][value]+[value][value]\frac{dy}{dx}-[value](y+x\frac{dy}{dx})=0\] \[\frac{dy}{dx}([value][value]-[value]x) = [value]y-[value][value]\] \[\frac{dy}{dx} = \frac{[value]y-[value][value]}{[value][value]-[value]x}.\]

Exercise

Compute the derivative, \(\dfrac{dy}{dx}\) given \([value]x^[value]+y=[value] + y^[value].\)

\( \dfrac{dy}{dx} = \)
Feedback: We are given the expression \([value]x^[value]+y=[value] + y^[value].\) We can deal with each term separately: \(\dfrac{d}{dx} [value]x^[value] = [value]x^[value].\) \(\dfrac{d}{dx}y = \dfrac{dy}{dx}.\) \(\dfrac{d}{dx}[value] = 0.\) \(\dfrac{d}{dx}y^[value] = [value]y^[value] \dfrac{dy}{dx}.\) This gives the equation \([value]x^[value] + \dfrac{dy}{dx}= [value]y^[value]\dfrac{dy}{dx}.\) By rearranging, and factoring out the term \( \dfrac{dy}{dx} \), we find that \( \dfrac{dy}{dx} = \displaystyle{[value]}.\)

Exercise

Compute the derivative, \(\dfrac{dy}{dx}\) given \([value]=[value]\)

\( \dfrac{dy}{dx} = \)
Feedback: We are given the expression \([value]=[value].\) We can deal with each term separately: \(\dfrac{d}{dx} [value]= [value]y^[value]x^{[value]}+ [value]x^[value]y^[value]\dfrac{dy}{dx}\) (using product rule). \(\dfrac{d}{dx}x^[value] = [value]x^[value].\) \(\dfrac{d}{dx}[value] = [value]y^{[value]}\dfrac{dy}{dx}.\) \(\dfrac{d}{dx}[value] = 0.\) This leaves the equation: \[[value]y^[value]x^[value]+ [value]x^[value]y^[value]\dfrac{dy}{dx} + [value]x^[value] = [value]y^{[value]}\dfrac{dy}{dx}.\] By rearranging, and factoring out the term \(\dfrac{dy}{dx}\), we find that: \[\dfrac{dy}{dx} = \displaystyle{[value]}= \displaystyle [value].\]

Introduction

This Section introduces implicit differentiation which is used to differentiate functions expressed in implicit form (where the variables are found together). Examples are \(x^3 + xy + y^2 = 1\), and \( \dfrac{x^2}{a^2} + \dfrac{y^2}{b^2} = 1 \) which represents an ellipse.

Implicit and explicit functions

Equations such as \(y = x^2\), \(y = \dfrac{1}{x}\), \(y = \sin x\) are said to define \(y\) explicitly as a function of \(x\) because the variable \(y\) appears alone on one side of the equation.

The equation \[ yx + y + 1 = x\] is not of the form \(y = f(x)\) but can be put into this form by simple algebra. Indeed we have \(y(x + 1) = x - 1\) so \[ y = \dfrac{x - 1}{x + 1}.\] We say that \(y\) is defined implicitly as a function of \(x\) by means of \(yx+y+1 = x\), the actual function being given explicitly as \[ y = \dfrac{x - 1}{x + 1}.\] We note than an equation relating \(x\) and \(y\) can implicitly define more than one function of \(x\).

For example, if we solve \[ x^2 + y^2 = 1 \] we obtain \( y = \pm \sqrt{1 - x^2}\), so \( x^2 + y^2 = 1 \) defines implicitly two functions \begin{align} f_1(x) &= \sqrt{1 - x^2} \\ f_2(x) &= -\sqrt{1 - x^2} \end{align}

Example

Sketch the graphs of \( f_1(x) = \sqrt{1 - x^2} \) and \( f_2(x) = - \sqrt{1 - x^2} \).

Solution

Since \(x^2 + y^2 = 1\) is the well-known equation of the circle with centre at the origin and radius \(1\), it follows that the graphs of \(f_1(x)\) and \(f_2(x)\) are the upper and lower halves of this circle.

[Image: unit circle]

Sometimes it is difficult or even impossible to solve an equation in \(x\) and \(y\) to obtain \(y\) explicitly in terms of \(x\).

Examples where explicit expressions for \(y\) cannot be obtained are \[\sin(xy) = y\] and \[x^2 + \sin y = 2y.\]

Differentiation of implicit functions

Fortunately it is not necessary to obtain \(y\) in terms of \(x\) in order to differentiate a function defined implicitly.

Consider the simple equation \[ xy = 1\] Here it is clearly possible to obtain \(y\) as the subject of this equation and hence obtain \( \dfrac{dy}{dx} \).

Example

Express \(y\) explicitly in terms of \(x\) and find \( \dfrac{dy}{dx} \) for the case \(xy = 1\).

Solution

We have immediately \(y = \dfrac{1}{x}\), so \[ \dfrac{dy}{dx} = - \dfrac{1}{x^2} \]

We now show an alternative way of obtaining \( \dfrac{dy}{dx}\) which does not involve writing \(y\) explicitly in terms of \(x\) at the outset. We simply treat \(y\) as an (unspecified) function of \(x\).

Hence if \(xy = 1\) we obtain \[ \dfrac{d}{dx}(xy) = \dfrac{d}{dx}(1) .\] The right-hand side differentiates to \(0\) as \(1\) is a constant. On the left-hand side we must use the product rule of differentiation: \[ \dfrac{d}{dx}(xy) = x\dfrac{dy}{dx} + y\dfrac{dx}{dx} = x\dfrac{dy}{dx} + y .\] Hence \(xy = 1\) becomes, after differentiation, \[x\dfrac{dy}{dx} + y = 0\] or \[\dfrac{dy}{dx} = -\dfrac{y}{x}\] In this case we can of course substitute \(y = \dfrac{1}{x}\) to obtain \[ y = - \dfrac{1}{x^2}\] as before.

The method used here is called implicit differentiation and, apart from the final step, it can be applied even if \(y\) cannot be expressed explicitly in terms of \(x\). Indeed, on occasions, it is easier to differentiate implicitly even if an explicit expression is possible.

Example

Obtain the derivative \( \dfrac{dy}{dx}\) where \[ x^2 + y = 1 + y^3.\]

Solution

We begin by differentiating the left-hand side of the equation with respect to \(x\) to get: \[ \dfrac{d}{dx}(x^2+y) = 2x + \dfrac{dy}{dx}. \] We now differentiate the right-hand side of with respect to \(x\). Using the chain (or function of a function) rule to deal with the \(y^3\) term: \[ \dfrac{d}{dx}(1+y^3) = \dfrac{d}{dx}(1) + \dfrac{d}{dx}(y^3) = 0 +3y^2\dfrac{dy}{dx}. \] Now by equating the left-hand side and right-hand side derivatives, we have: \[ 2x + \dfrac{dy}{dx} = 3y^2\dfrac{dy}{dx}. \] We can make \( \dfrac{dy}{dx}\) the subject of this equation: \[ \dfrac{dy}{dx} - 3y^2\dfrac{dy}{dx}= -2x\] which gives \[ \dfrac{dy}{dx} = \dfrac{2x}{3y^2 - 1}. \]

We note that \( \dfrac{dy}{dx} \) has to be expressed in terms of both \(x\) and \(y\). This is quite usual if \(y\) cannot be obtained explicitly in terms of \(x\).

Exercise

Compute the derivative, \(\dfrac{dy}{dx}\) given \([value]=[value].\)

Note that your answer will be in terms of both \(y\) and \(x.\)

\( \dfrac{dy}{dx} =\)
Feedback: We are given \([value]=[value].\) By differentiating both sides of the equation, with respect to \(x\), and using the chain rule on the \( \sin [value]y\) term, we get: \[ \dfrac{d}{dx}([value]) = \dfrac{d}{dx}([value]) \] so \[ [value]\dfrac{dy}{dx} = [value]x^{ [value]} + [value] \cos ([value]y)\dfrac{dy}{dx} \] which leads to \[ \dfrac{dy}{dx} = \displaystyle{[value]}. \]

Second order implicit differentiation

We sometimes need to obtain the second derivative \( \dfrac{d^2y}{dx^2}\) for a function defined implicitly.

Example

Obtain \( \dfrac{dy}{dx} \) and \( \dfrac{d^2y}{dx^2}\) at the point \( (4, 2)\) on the curve defined by the equation \[ x^2 - xy - y^2 - 2y = 0\]

Solution

Firstly we obtain \( \dfrac{dy}{dx} \) by differentiating the equation implicitly and then evaluate it at \( (4, 2)\).

We have \[ 2x -x\dfrac{dy}{dx} - y -2y\dfrac{dy}{dx} -2\dfrac{dy}{dx} = 0 \hspace{4cm} (1)\] from which \[ \dfrac{dy}{dx} = \dfrac{2x - y}{x + 2y + 2} \hspace{5cm} (2) \] so at \( (4,2)\), \[ \dfrac{dy}{dx} = \dfrac{6}{10} = \dfrac{3}{5}. \] to obtain the second derivative \( \dfrac{d^2y}{dx^2}\) it is easier to use \( (1) \) than \( (2) \) becuase the latter is a quotient. We simplify \( (1)\) first: \[ 2x - y - (x + 2y + 2)\dfrac{dy}{dx} = 0. \hspace{5cm} (3)\] We will have to use the product rule to differentiate the third term here.

Hence differentiating \( (3) \) with respect to \(x\): \[ 2 - \dfrac{dy}{dx} - (x + 2y + 2) \dfrac{d^2y}{dx^2} - (1 + 2\dfrac{dy}{dx})\dfrac{dy}{dx} = 0\] or \[ 2 - 2\dfrac{dy}{dx} - 2\left( \dfrac{dy}{dx} \right)^2 - (x + 2y + 2) \dfrac{d^2y}{dx^2} = 0. \hspace{4cm} (4)\] Note carefully that the third term here, \( \left( \dfrac{dy}{dx} \right)^2\), is the square of the first derivative. It should not be confused with the second derivative denoted by \( \dfrac{d^2y}{dx^2}\).

Finally, at \( (4,2)\), where \(\dfrac{dy}{dx} = \dfrac{3}{5}\) we obtain from \( (4) \): \[ 2 - 2\left(\dfrac{3}{5}\right) - 2\left(\dfrac{9}{25}\right) - (4+4+2)\dfrac{d^2y}{dx^2} = 0\] from which \[ \dfrac{d^2y}{dx^2} = \dfrac{1}{125}\] at \( (4,2)\).

Engineering Example

Here we shall find a formula for the curvature of a bent beam.

Example

When a horizontal beam is acted on by forces which bend it, each small segment of the beam will be slightly curved and can be regarded as an arc of a circle. The radius \(R\) of that circle is called the radius of curvature of the beam at the point concerned. If the shape of the beam is described by an equation of the form \(y = f(x)\) then there is a formula for the radius of curvature \(R\) which involves only the first and second derivatives \( \dfrac{dy}{dx}\) and \( \dfrac{d^2y}{dx^2}\).

The equation is found as follows.

Start with the equation of a circle in the simple implicit form \[x^2 + y^2 = R^2\] and perform implicit differentiation twice. Now use the result of the first implicit differentiation to find a simple expression for the quantity \(1+ \left( \dfrac{dy}{dx}\right)^2\) in terms of \(R\) and \(y\); this can then be used to simplify the result of the second differentiation, and will lead to a formula for \( \dfrac{1}{R}\) (called the curvature) in terms of \( \dfrac{dy}{dx}\) and \( \dfrac{d^2y}{dx^2}\).

Have a go before looking at the solution below.

Solution

Differentiating \( x^2 + y^2 = R^2\) gives \[ 2x + 2y\dfrac{dy}{dx} = 0. \hspace{5cm} (1)\] Differentiating again gives \[ 2 + 2 \left( \dfrac{dy}{dx} \right)^2 + 2y \dfrac{d^2y}{dx^2} = 0. \hspace{3cm} (2)\] From \( (1)\), \[ \dfrac{dy}{dx} = -\dfrac{x}{y} \hspace{0.5cm} \therefore \hspace{0.5cm} 1 + \left( \dfrac{dy}{dx} \right) ^2 = 1 + \dfrac{x^2}{y^2} = \dfrac{y^2 + x^2}{y^2} = \left( \dfrac{R}{y} \right)^2. \hspace{2cm} (3) \] So \[1 + \left( \dfrac{dy}{dx} \right)^2 = \left( \dfrac{R}{y} \right)^2.\] Thus \( (2) \) becomes \[ 2 \left( \dfrac{R}{y} \right)^2 + 2y \left( \dfrac{d^2y}{dx^2} \right) = 0 \hspace{0.5cm} \therefore \hspace{0.5cm} \dfrac{d^2y}{dx^2} = \dfrac{R^2}{y^3} = \left( \dfrac{1}{R} \right) \left( \dfrac{R}{y} \right) ^3 \] so \[ \dfrac{d^2y}{dx^2} = -\dfrac{1}{R} \left( \dfrac{R}{y} \right)^3. \hspace{4cm} (4) \] Rearranging \( (4) \) to make \( \dfrac{1}{R} \) the subject and substituting for \( \left( \dfrac{R}{y} \right) \) from \( (3) \) gives the result: \[ \dfrac{1}{R} = \dfrac{\dfrac{d^2y}{dx^2}}{ \left[ 1 + \left( \dfrac{dy}{dx} \right)^2 \right] ^{3/2}} \] The equation usually found in textbooks omits the minus sign but the sign indicates whether the circle is above or below the curve, as you will see by sketching a few examples. When the gradient is small (as for a slightly deflected horizontal beam), i.e. \( \dfrac{dy}{dx}\) is small, the denominator in the equation for \( (1/R)\) is close to \(1\), and so the second derivative alone is often used to estimate the radius of curvature in the theory of bending beams.