Implicit Differentiation

A2 · P3 · 12 min

Many curves are given by an equation linking xx and yy that cannot conveniently be rearranged into y=f(x)y = f(x): the circle x2+y2=25x^2 + y^2 = 25, the syllabus example x2+y2=xy+7x^2 + y^2 = xy + 7, or x3+y3=3xyx^3 + y^3 = 3xy. Such equations define yy implicitly. Implicit differentiation finds the gradient of these curves directly from the equation, without ever solving for yy. P3 regularly asks for the gradient at a point, the equation of a tangent or normal, or the points where the tangent is parallel to an axis.

The idea

On the curve x2+y2=25x^2 + y^2 = 25, near any point, yy behaves like a function of xx (the top half of the circle is y=25−x2y = \sqrt{25 - x^2}, the bottom half y=−25−x2y = -\sqrt{25 - x^2}). So it makes sense to differentiate the whole equation with respect to xx, both sides, treating yy as "some function of xx that we do not need to write down".

The only new fact you need is how to differentiate an expression in yy with respect to xx. By the chain rule,

ddx(g(y))=ddy(g(y))×dydx=g′(y)dydx\frac{d}{dx}\big(g(y)\big) = \frac{d}{dy}\big(g(y)\big)\times\frac{dy}{dx} = g'(y)\frac{dy}{dx}

So: differentiate with respect to yy as normal, then multiply by dydx\dfrac{dy}{dx}.

Differentiating terms in y with respect to x
TermDerivative with respect to xx
yydydx\dfrac{dy}{dx}
yny^nnyn−1dydxny^{n-1}\dfrac{dy}{dx}
eye^yeydydxe^y\dfrac{dy}{dx}
ln⁡y\ln y1ydydx\dfrac{1}{y}\dfrac{dy}{dx}
sin⁡y\sin ycos⁡ydydx\cos y\dfrac{dy}{dx}
xyxyxdydx+yx\dfrac{dy}{dx} + y (product rule)
x2y3x^2y^3x2⋅3y2dydx+2xy3x^2\cdot 3y^2\dfrac{dy}{dx} + 2xy^3 (product rule)
exye^{xy}exy(xdydx+y)e^{xy}\left(x\dfrac{dy}{dx} + y\right) (chain rule, then product rule)
constant00

The products are where marks are lost. A term like xyxy involves two functions of xx, namely xx and yy, so it needs the product rule. Writing ddx(xy)=dydx\dfrac{d}{dx}(xy) = \dfrac{dy}{dx} or =y= y are both wrong.

The method

Implicit differentiation
  1. Differentiate every term on both sides with respect to xx. Each term in yy picks up a factor dydx\dfrac{dy}{dx}; each product of xx and yy needs the product rule. Constants become 00.
  2. Collect all terms containing dydx\dfrac{dy}{dx} on one side and everything else on the other.
  3. Factorise out dydx\dfrac{dy}{dx}.
  4. Divide to make dydx\dfrac{dy}{dx} the subject.
  5. For a gradient at a point, substitute both xx and yy. (You may substitute before step 4 if the numbers are simple; it is often faster.)

The answer for dydx\dfrac{dy}{dx} is normally in terms of both xx and yy. That is expected and correct: a single xx can correspond to several points on the curve, each with its own gradient, so you need yy as well to say which point you mean.

A first example: the circle

Differentiate x2+y2=25x^2 + y^2 = 25 with respect to xx:

2x+2ydydx=0⇒dydx=−xy2x + 2y\frac{dy}{dx} = 0 \quad\Rightarrow\quad \frac{dy}{dx} = -\frac{x}{y}

At (3,4)(3, 4) the gradient is −34-\tfrac{3}{4}, and at (3,−4)(3, -4) it is +34+\tfrac{3}{4}: the same xx, two different points, two gradients.

Check with geometry: the radius to (3,4)(3, 4) has gradient 43\tfrac{4}{3}, and the tangent is perpendicular to the radius, so it has gradient −34-\tfrac{3}{4}. Implicit differentiation agrees with what you know from circles.

Tangents parallel to the axes

Once dydx\dfrac{dy}{dx} is written as a single fraction ND\dfrac{N}{D} (numerator and denominator in xx and yy):

  • the tangent is parallel to the xx-axis (horizontal, a stationary point) where N=0N = 0 and D≠0D \ne 0;
  • the tangent is parallel to the yy-axis (vertical) where D=0D = 0 and N≠0N \ne 0.

In both cases the condition is an equation linking xx and yy, so solve it simultaneously with the equation of the curve to find the actual points. Usually you rearrange the condition to y=kxy = kx (or x=kyx = ky) and substitute.

Points where the tangent is parallel to an axis
  1. Find dydx=ND\dfrac{dy}{dx} = \dfrac{N}{D}.
  2. Horizontal tangent: set N=0N = 0. Vertical tangent: set D=0D = 0.
  3. Rearrange the condition to express one variable in terms of the other.
  4. Substitute into the equation of the curve and solve.
  5. Find the other coordinate of each point. Check that the other part of the fraction is not also zero there.

Worked examples

Tangent to a circle

Find the equation of the tangent to x2+y2=25x^2 + y^2 = 25 at the point (3,4)(3, 4).

Solution

2x+2ydydx=02x + 2y\dfrac{dy}{dx} = 0, so dydx=−xy=−34\dfrac{dy}{dx} = -\dfrac{x}{y} = -\dfrac{3}{4} at (3,4)(3, 4).

Tangent: y−4=−34(x−3)y - 4 = -\tfrac{3}{4}(x - 3). Multiply by 44: 4y−16=−3x+94y - 16 = -3x + 9, so 3x+4y=253x + 4y = 25.

The syllabus curve

The curve CC has equation x2+y2=xy+7x^2 + y^2 = xy + 7.

(a) Show that dydx=y−2x2y−x\dfrac{dy}{dx} = \dfrac{y - 2x}{2y - x}.

(b) Find the equation of the tangent to CC at the point (3,1)(3, 1).

Solution

(a) Differentiate both sides with respect to xx, using the product rule on xyxy:

2x+2ydydx=xdydx+y2x + 2y\frac{dy}{dx} = x\frac{dy}{dx} + y

Collect the dydx\dfrac{dy}{dx} terms:

2ydydx−xdydx=y−2x⇒dydx(2y−x)=y−2x⇒dydx=y−2x2y−x2y\frac{dy}{dx} - x\frac{dy}{dx} = y - 2x \quad\Rightarrow\quad \frac{dy}{dx}(2y - x) = y - 2x \quad\Rightarrow\quad \frac{dy}{dx} = \frac{y - 2x}{2y - x}

(b) Check (3,1)(3, 1) is on CC: 9+1=3+79 + 1 = 3 + 7. Yes.

Gradient: 1−62−3=−5−1=5\dfrac{1 - 6}{2 - 3} = \dfrac{-5}{-1} = 5.

Tangent: y−1=5(x−3)y - 1 = 5(x - 3), i.e. y=5x−14y = 5x - 14.

An exponential term

The curve exy+y3=2e^xy + y^3 = 2 passes through (0,1)(0, 1). Find the equation of the normal at this point.

Solution

Differentiate, using the product rule on exye^xy:

exy+exdydx+3y2dydx=0e^xy + e^x\frac{dy}{dx} + 3y^2\frac{dy}{dx} = 0

Substitute x=0x = 0, y=1y = 1 straight away:

1+dydx+3dydx=0⇒dydx=−141 + \frac{dy}{dx} + 3\frac{dy}{dx} = 0 \quad\Rightarrow\quad \frac{dy}{dx} = -\frac{1}{4}

The normal has gradient 44: y−1=4xy - 1 = 4x, i.e. y=4x+1y = 4x + 1.

Tangents parallel to both axes

The curve x2+2xy+3y2=6x^2 + 2xy + 3y^2 = 6 is an ellipse.

(a) Find dydx\dfrac{dy}{dx} in terms of xx and yy.

(b) Find the coordinates of the points where the tangent is parallel to the xx-axis.

(c) Find the coordinates of the points where the tangent is parallel to the yy-axis.

Solution

(a) 2x+2xdydx+2y+6ydydx=02x + 2x\dfrac{dy}{dx} + 2y + 6y\dfrac{dy}{dx} = 0, so dydx(2x+6y)=−(2x+2y)\dfrac{dy}{dx}(2x + 6y) = -(2x + 2y) and

dydx=−x+yx+3y\frac{dy}{dx} = -\frac{x + y}{x + 3y}

(b) Numerator zero: y=−xy = -x. Substitute into the curve: x2−2x2+3x2=6x^2 - 2x^2 + 3x^2 = 6, so 2x2=62x^2 = 6, x=±3x = \pm\sqrt{3}.

Points: (3,−3)(\sqrt{3}, -\sqrt{3}) and (−3,3)(-\sqrt{3}, \sqrt{3}). (The denominator x+3y=∓23≠0x + 3y = \mp 2\sqrt{3} \ne 0.)

(c) Denominator zero: x=−3yx = -3y. Substitute: 9y2−6y2+3y2=69y^2 - 6y^2 + 3y^2 = 6, so 6y2=66y^2 = 6, y=±1y = \pm 1.

Points: (−3,1)(-3, 1) and (3,−1)(3, -1).

x^2 + 2x y + 3y^2 = 6 y = -sqrt(3) x = 3

The tilted ellipse x2+2xy+3y2=6x^2 + 2xy + 3y^2 = 6. The dashed line y=−3y = -\sqrt{3} is the horizontal tangent at the lowest point (3,−3)(\sqrt{3}, -\sqrt{3}); the dotted line x=3x = 3 is the vertical tangent at (3,−1)(3, -1).

Exam-hard: the folium of Descartes

The curve x3+y3=3xyx^3 + y^3 = 3xy has a loop in the first quadrant.

(a) Show that dydx=y−x2y2−x\dfrac{dy}{dx} = \dfrac{y - x^2}{y^2 - x}.

(b) Find the exact coordinates of the point on the loop, other than the origin, where the tangent is parallel to the xx-axis.

Solution

(a) Differentiate, with the product rule on 3xy3xy:

3x2+3y2dydx=3xdydx+3y3x^2 + 3y^2\frac{dy}{dx} = 3x\frac{dy}{dx} + 3y

Divide by 33 and collect: dydx(y2−x)=y−x2\dfrac{dy}{dx}(y^2 - x) = y - x^2, so dydx=y−x2y2−x\dfrac{dy}{dx} = \dfrac{y - x^2}{y^2 - x}.

(b) Horizontal tangent: y=x2y = x^2. Substitute into the curve:

x3+x6=3x⋅x2=3x3⇒x6=2x3⇒x3(x3−2)=0x^3 + x^6 = 3x\cdot x^2 = 3x^3 \quad\Rightarrow\quad x^6 = 2x^3 \quad\Rightarrow\quad x^3(x^3 - 2) = 0

x=0x = 0 gives the origin, where both numerator and denominator are zero (the curve crosses itself there, so the gradient formula gives no information). The other solution is x=21/3x = 2^{1/3}, with y=x2=22/3y = x^2 = 2^{2/3}.

The point is (21/3,22/3)\left(2^{1/3}, 2^{2/3}\right), about (1.26,1.59)(1.26, 1.59). The denominator there is 24/3−21/3≠02^{4/3} - 2^{1/3} \ne 0, so the tangent really is horizontal.

x^3 + y^3 = 3x y y = 2^(2/3)

The folium of Descartes with its horizontal tangent at y=22/3y = 2^{2/3}, the top of the loop.

Exam-hard: an unknown constant

The curve xy(x+y)=2a3xy(x + y) = 2a^3, where aa is a positive constant, has exactly one point at which the tangent is parallel to the xx-axis. Find its coordinates in terms of aa.

Solution

Expand: x2y+xy2=2a3x^2y + xy^2 = 2a^3. Differentiate with the product rule on each term:

2xy+x2dydx+y2+2xydydx=0⇒dydx=−y(2x+y)x(x+2y)2xy + x^2\frac{dy}{dx} + y^2 + 2xy\frac{dy}{dx} = 0 \quad\Rightarrow\quad \frac{dy}{dx} = -\frac{y(2x + y)}{x(x + 2y)}

Horizontal tangent: y(2x+y)=0y(2x + y) = 0. Now y=0y = 0 is impossible on the curve, since it would make the left side 0≠2a30 \ne 2a^3. So y=−2xy = -2x.

Substitute: x(−2x)(x−2x)=2x3=2a3x(-2x)(x - 2x) = 2x^3 = 2a^3, so x=ax = a (the only real root) and y=−2ay = -2a.

The point is (a,−2a)(a, -2a). Check the denominator: a(a−4a)=−3a2≠0a(a - 4a) = -3a^2 \ne 0.

Common mistakes
  • Forgetting the dydx\dfrac{dy}{dx} on a yy term: ddx(y2)=2ydydx\dfrac{d}{dx}(y^2) = 2y\dfrac{dy}{dx}, not 2y2y.
  • Missing the product rule on xyxy, x2yx^2y, exye^xy and similar.
  • Forgetting to differentiate the right-hand side, or differentiating a constant on the right to something other than 00.
  • Substituting only xx when finding a gradient at a point. You need both coordinates.
  • Finding the condition y=−xy = -x and stopping. That is a line, not a point. Solve with the curve's equation.
  • Dividing by zero. At a point where both numerator and denominator vanish, the formula is undefined; say so rather than giving a gradient.
Exam tip
  • "Show that dydx=…\dfrac{dy}{dx} = \ldots" questions award a mark for the correct differentiation of each type of term, often: one for the yny^n terms, one for the product term, one for the correct rearrangement. Show the line with all terms differentiated before collecting.
  • If you only need a numerical gradient, substitute the point immediately after differentiating; the arithmetic is easier than rearranging in general.
  • For tangents parallel to the axes, the mark scheme expects: the condition (numerator or denominator =0= 0), substitution into the curve, then both coordinates of every point.
  • Check that a given point lies on the curve before using it. A quick substitution catches misreadings.
Summary
  • Differentiate both sides with respect to xx; each yy-term gets a factor dydx\dfrac{dy}{dx}.
  • ddx(yn)=nyn−1dydx\dfrac{d}{dx}(y^n) = ny^{n-1}\dfrac{dy}{dx}; ddx(xy)=xdydx+y\dfrac{d}{dx}(xy) = x\dfrac{dy}{dx} + y.
  • Collect dydx\dfrac{dy}{dx} terms, factorise, divide.
  • dydx\dfrac{dy}{dx} is usually in terms of both xx and yy; substitute both to get a gradient.
  • Horizontal tangent: numerator =0= 0; vertical tangent: denominator =0= 0. Solve each with the curve's equation.
  • Implicit differentiation proves ddxtan⁡−1x=11+x2\dfrac{d}{dx}\tan^{-1}x = \dfrac{1}{1+x^2} from tan⁡y=x\tan y = x.

Practice

Question
  1. Find dydx\dfrac{dy}{dx} for the curve x3+y3=9x^3 + y^3 = 9.
  2. Find the equation of the tangent to x2+3xy+y2=11x^2 + 3xy + y^2 = 11 at the point (1,2)(1, 2).
  3. Find dydx\dfrac{dy}{dx} in terms of xx and yy given ye2x=x+yye^{2x} = x + y.
  4. The curve ln⁡y+xy=2\ln y + xy = 2 passes through (2,1)(2, 1). Find the equation of the normal at this point.
  5. Given tan⁡y=2x\tan y = 2x, use implicit differentiation to show that dydx=21+4x2\dfrac{dy}{dx} = \dfrac{2}{1 + 4x^2}.
  6. Find the points on the circle x2+y2−4x+6y=12x^2 + y^2 - 4x + 6y = 12 where the tangent is parallel to the xx-axis.
  7. Find the coordinates of the points on x2−2xy+4y2=12x^2 - 2xy + 4y^2 = 12 at which the tangent is parallel to the yy-axis.
  8. The curve x2+xy+y2=3x^2 + xy + y^2 = 3 has two tangents parallel to the xx-axis. Find their equations.
  9. The curve 2x2+xy+y2=142x^2 + xy + y^2 = 14 meets the line y=xy = x at two points. Show that the tangents to the curve at these points are parallel, and find their equations in exact form.
Answers
  1. 3x2+3y2dydx=0⇒dydx=−x2y23x^2 + 3y^2\dfrac{dy}{dx} = 0 \Rightarrow \dfrac{dy}{dx} = -\dfrac{x^2}{y^2}.

  2. 2x+3y+3xdydx+2ydydx=02x + 3y + 3x\dfrac{dy}{dx} + 2y\dfrac{dy}{dx} = 0. At (1,2)(1, 2): 2+6+3dydx+4dydx=02 + 6 + 3\dfrac{dy}{dx} + 4\dfrac{dy}{dx} = 0, so dydx=−87\dfrac{dy}{dx} = -\dfrac{8}{7}. Tangent: y−2=−87(x−1)y - 2 = -\tfrac{8}{7}(x - 1), i.e. 8x+7y=228x + 7y = 22.

  3. e2xdydx+2ye2x=1+dydxe^{2x}\dfrac{dy}{dx} + 2ye^{2x} = 1 + \dfrac{dy}{dx}, so dydx(e2x−1)=1−2ye2x\dfrac{dy}{dx}(e^{2x} - 1) = 1 - 2ye^{2x} and dydx=1−2ye2xe2x−1\dfrac{dy}{dx} = \dfrac{1 - 2ye^{2x}}{e^{2x} - 1}.

  4. 1ydydx+xdydx+y=0\dfrac{1}{y}\dfrac{dy}{dx} + x\dfrac{dy}{dx} + y = 0. At (2,1)(2, 1): dydx+2dydx+1=0\dfrac{dy}{dx} + 2\dfrac{dy}{dx} + 1 = 0, dydx=−13\dfrac{dy}{dx} = -\tfrac{1}{3}. Normal gradient 33: y−1=3(x−2)y - 1 = 3(x - 2), i.e. y=3x−5y = 3x - 5.

  5. sec⁡2ydydx=2\sec^2 y\dfrac{dy}{dx} = 2, so dydx=2sec⁡2y=21+tan⁡2y=21+4x2\dfrac{dy}{dx} = \dfrac{2}{\sec^2 y} = \dfrac{2}{1 + \tan^2 y} = \dfrac{2}{1 + 4x^2}.

  6. 2x+2ydydx−4+6dydx=0⇒dydx=2−xy+32x + 2y\dfrac{dy}{dx} - 4 + 6\dfrac{dy}{dx} = 0 \Rightarrow \dfrac{dy}{dx} = \dfrac{2 - x}{y + 3}. Horizontal: x=2x = 2. Then 4+y2−8+6y=124 + y^2 - 8 + 6y = 12, y2+6y−16=0y^2 + 6y - 16 = 0, (y+8)(y−2)=0(y + 8)(y - 2) = 0. Points (2,2)(2, 2) and (2,−8)(2, -8), the top and bottom of the circle with centre (2,−3)(2, -3) and radius 55.

  7. 2x−2y−2xdydx+8ydydx=0⇒dydx=y−x4y−x2x - 2y - 2x\dfrac{dy}{dx} + 8y\dfrac{dy}{dx} = 0 \Rightarrow \dfrac{dy}{dx} = \dfrac{y - x}{4y - x}. Vertical: x=4yx = 4y. Then 16y2−8y2+4y2=1216y^2 - 8y^2 + 4y^2 = 12, so y2=1y^2 = 1. Points (4,1)(4, 1) and (−4,−1)(-4, -1).

  8. dydx=−2x+yx+2y\dfrac{dy}{dx} = -\dfrac{2x + y}{x + 2y}. Horizontal: y=−2xy = -2x. Then x2−2x2+4x2=3x^2 - 2x^2 + 4x^2 = 3, x=±1x = \pm 1, giving (1,−2)(1, -2) and (−1,2)(-1, 2). Tangents: y=−2y = -2 and y=2y = 2.

  9. With y=xy = x: 2x2+x2+x2=142x^2 + x^2 + x^2 = 14, x2=72x^2 = \tfrac{7}{2}, so the points are P(7/2,7/2)P\left(\sqrt{7/2}, \sqrt{7/2}\right) and Q(−7/2,−7/2)Q\left(-\sqrt{7/2}, -\sqrt{7/2}\right). Differentiating: 4x+y+xdydx+2ydydx=04x + y + x\dfrac{dy}{dx} + 2y\dfrac{dy}{dx} = 0, so dydx=−4x+yx+2y\dfrac{dy}{dx} = -\dfrac{4x + y}{x + 2y}. On y=xy = x this is −5x3x=−53-\dfrac{5x}{3x} = -\dfrac{5}{3} at both points, so the tangents are parallel. Write k=7/2=142k = \sqrt{7/2} = \tfrac{\sqrt{14}}{2}. Tangent at PP: y−k=−53(x−k)y - k = -\tfrac{5}{3}(x - k), i.e. 5x+3y=8k=4145x + 3y = 8k = 4\sqrt{14}. Tangent at QQ: 5x+3y=−4145x + 3y = -4\sqrt{14}.

How well do you know this?

Builds on

Where this leads

Console

Search notes, courses and tools, or run an action