Section 2.6 Implicit Differentiation

2010 Kiryl Tsishchanka

Implicit Differentiation Some functions can be described by expressing one variable explicitly in terms of another variable — for example, r 1−x 2 y=x , y= , y = tan 2x 1 + x3 or, in general, y = f (x). Some functions, however, are defined implicitly by a relation between x and y such that x2 + y 2 = 1,

x3 + y 3 = 4xy,

(x2 + y 2 − 2x)2 = 4(x2 + y 2 )

In some cases it is possible to solve such an equation for x or for y, but sometimes it is impossible. One of the main goals of Section 2.6 is to show how to find derivatives of implicitly defined functions. EXAMPLE: Find an equation of the tangent line to y = x2 at the point (2, 4). Solution: The graph of the curve y = x2 is a parabola. Clearly, y ′ = (x2 )′ = 2x To find an equation of the tangent line to y = x2 at the point (2, 4) we note that m = y ′ (2) = 2 · 2 = 4 therefore y − y0 = m(x − x0 )

=⇒

y − 4 = 4(x − 2)

=⇒

y = 4x − 4

EXAMPLE: Find equations of the tangent lines to x = y 2 at the points (4, 2) and (4, −2).

1

Section 2.6 Implicit Differentiation

2010 Kiryl Tsishchanka

EXAMPLE: Find equations of the tangent lines to x = y 2 at the points (4, 2) and (4, −2). Solution 1: The graph of the curve x = y 2 is a parabola. We have ( √ x if y ≥ 0 x = y 2 =⇒ y = √ − x if y < 0 √ Clearly, if y = x, then 1 1 1 y ′ = (x1/2 )′ = x1/2−1 = x−1/2 = √ 2 2 2 x √ Similarly, if y = − x, then

(1)

1 1 1 y ′ = (−x1/2 )′ = − x1/2−1 = − x−1/2 = − √ 2 2 2 x

(2)

To find an equation of the tangent line to y 2 = x at the point (4, 2) we note that by (1) we have 1 1 m1 = y ′ (4) = √ = 4 2 4 therefore 1 1 y − y1 = m1 (x − x1 ) =⇒ y − 2 = (x − 4) =⇒ y = x + 1 4 4 2 Similarly, to find an equation of the tangent line to y = x at the point (4, −2) we note that by (2) we have 1 1 m2 = y ′ (4) = − √ = − 4 2 4 therefore 1 1 y − y2 = m2 (x − x2 ) =⇒ y − (−2) = − (x − 4) =⇒ y = − x − 1 4 4 2 Solution 2: To find equations of the tangent lines to x = y at the points (4, 2) and (4, −2) we dy first find by differentiating both sides of x = y 2 : dx 1 x = y 2 =⇒ x′ = (y 2 )′ =⇒ 1 = 2y · y ′ =⇒ y ′ = 2y It follows that ′

m = y (4) =

      

therefore y − y1 = m1 (x − x1 )

=⇒

1 2·2

if y = 2

1 if y = −2 2 · (−2)

1 y − 2 = (x − 4) 4

=⇒

1 y = x + 1 at (4, 2) 4

and y − y2 = m2 (x − x2 )

=⇒

1 y − (−2) = − (x − 4) 4 2

=⇒

1 y = − x − 1 at (4, −2) 4

Section 2.6 Implicit Differentiation

2010 Kiryl Tsishchanka

EXAMPLE: If x2 + y 2 = 5, find at the point (2, 1).

dy . Then find an equation of the tangent line to x2 + y 2 = 5 dx

Solution: The graph of the curve x2 + y 2 = 5 is a circle:

2

y

1

0 -2

-1

0

1

2 x

-1

-2

To find

dy we differentiate both sides: dx

x2 + y 2 = 5

=⇒

(x2 + y 2 )′ = 5′

=⇒

(x2 )′ + (y 2 )′ = 0

=⇒

2x · x′ + 2y · y ′ = 0

hence 2x · 1 + 2y · y ′ = 0

=⇒

2x + 2y · y ′ = 0

=⇒

2y · y ′ = −2x

=⇒

y′ = −

x 2x =− 2y y

To find an equation of the tangent line to x2 + y 2 = 5 at the point (2, 1) we note that 2 m = y ′ (2) = − = −2 1 therefore y − y0 = m(x − x0 )

EXAMPLE: If 2x2 +3y 2 = 5, find at the point (1, 1).

=⇒

y − 1 = −2 · (x − 2)

=⇒

y = −2x + 5

dy . Then find an equation of the tangent line to 2x2 +3y 2 = 5 dx

3

Section 2.6 Implicit Differentiation

EXAMPLE: If 2x2 +3y 2 = 5, find at the point (1, 1).

2010 Kiryl Tsishchanka

dy . Then find an equation of the tangent line to 2x2 +3y 2 = 5 dx

Solution: The graph of the curve 2x2 + 3y 2 = 5 is an ellipse:

1 y 0.5

0 -1.5

-1

-0.5

0

0.5

1

1.5

x -0.5

-1

To find

dy we differentiate both sides: dx

2x2 + 3y 2 = 5 =⇒ (2x2 + 3y 2 )′ = 5′ =⇒ 2(x2 )′ + 3(y 2 )′ = 0 =⇒ 2(2x · x′ ) + 3(2y · y ′ ) = 0 hence 2(2x · 1) + 3(2y · y ′ ) = 0 =⇒ 4x + 6y · y ′ = 0 =⇒ 6y · y ′ = −4x =⇒ y ′ = −

2x 4x =− 6y 3y

To find an equation of the tangent line to 2x2 + 3y 2 = 5 at the point (1, 1) we note that m = y ′ (1) = −

2·1 2 =− 3·1 3

therefore y − y0 = m(x − x0 )

=⇒

2 y − 1 = − (x − 1) 3

=⇒

2 5 y =− x+ 3 3

dy . Then find an equation of the tangent line to x3 +y 3 = 4xy dx at the point (2, 2). At what point in the first quadrant is the tangent line horizontal? EXAMPLE: If x3 +y 3 = 4xy, find

4

Section 2.6 Implicit Differentiation

2010 Kiryl Tsishchanka

dy . Then find an equation of the tangent line to x3 +y 3 = 4xy dx at the point (2, 2). At what point in the first quadrant is the tangent line horizontal? EXAMPLE: If x3 +y 3 = 4xy, find

Solution: The graph of the curve x3 + y 3 = 4xy is the folium of Descartes: 2

1

y x

-3

-2

-1

0

1

2

0

-1

-2

-3

(a) To find

dy we differentiate both sides: dx

x3 + y 3 = 4xy

=⇒

(x3 + y 3 )′ = (4xy)′

=⇒

(x3 )′ + (y 3 )′ = (4xy)′

Since (4xy)′ = 4(xy)′ = 4(x′ y + xy ′ ) = 4(1 · y + xy ′ ) = 4(y + xy ′ ), this gives us 3x2 · x′ + 3y 2 · y ′ = 4(y + xy ′ )

=⇒

3x2 + 3y 2 · y ′ = 4y + 4xy ′

=⇒

3y 2 y ′ − 4xy ′ = 4y − 3x2

hence

4y − 3x2 3y 2 − 4x (b) To find an equation of the tangent line to x3 + y 3 = 4xy at the point (2, 2) we note that y ′ (3y 2 − 4x) = 4y − 3x2

m = y ′ (2) = therefore y − y0 = m(x − x0 )

=⇒

y′ =

=⇒

4 · 2 − 3 · 22 = −1 3 · 22 − 4 · 2

y − 2 = −1 · (x − 2)

4 y 2

0 -4

-2

0

2

4 x

-2

-4

5

=⇒

y = −x + 4

Section 2.6 Implicit Differentiation

2010 Kiryl Tsishchanka

(c) The tangent line is horizontal if y ′ = 0. Using the expression for y ′ from part (a), we see that y ′ = 0 when 4y − 3x2 = 0 (provided that 3y 2 − 4x 6= 0). We have 2

4y−3x = 0

=⇒

3 y = x2 4

3

=⇒

which gives

both sides by x3 which implies

= 4x



3 2 x 4



=⇒

x3 +

27 6 x = 3x3 64

27 6 x = x3 . Since x 6= 0 in the first quadrant, we can divide 128 27 3 x =1 128

x=

3

27 6 x = 2x3 64

Dividing both sides by 2, we get

hence



3 x + x2 4

x3 +y 3 =4xy

r 3

128 = 27

(√ 3

128 √ = 3 27

=⇒

x3 =

128 27

√ ) √ √ √ 3 3 4√ 432 64 · 2 64 3 2 3 √ √ = = = 2 ≈ 1.6798947 3 3 3 3 27 27

3 Plugging in this into y = x2 , we get 4 2  4√ 3 4√ 3 3 2 = 4 ≈ 2.1165347 y= 4 3 3 √ √  Finally, one can check that 3y 2 − 4x 6= 0 at 43 3 2, 34 3 4 . Thus the tangent line is horizontal √ √  at 34 3 2, 34 3 4 , which is approximately (1.6798947, 2.1165347). Looking at the figure, we see that our answer is reasonable.

EXAMPLE: If (x2 +y 2 −2x)2 = 4(x2 +y 2 ), find an equation of the tangent line to (x2 +y 2 −2x)2 = 4(x2 + y 2 ) at the point (0, 2).

6

Section 2.6 Implicit Differentiation

2010 Kiryl Tsishchanka

EXAMPLE: If (x2 +y 2 −2x)2 = 4(x2 +y 2 ), find an equation of the tangent line to (x2 +y 2 −2x)2 = 4(x2 + y 2 ) at the point (0, 2). Solution: The graph of the curve (x2 + y 2 − 2x)2 = 4(x2 + y 2 ) is the cardioid:

We differentiate both sides of (x2 + y 2 − 2x)2 = 4(x2 + y 2 ): [(x2 + y 2 − 2x)2 ]′ = [4(x2 + y 2 )]′

=⇒

2(x2 + y 2 − 2x)2−1 (x2 + y 2 − 2x)′ = 4(x2 + y 2 )′

hence 2(x2 + y 2 − 2x)(2x + 2y · y ′ − 2) = 4(2x + 2y · y ′ )

(3)

To find slope of the tangent line to (x2 + y 2 − 2x)2 = 4(x2 + y 2 ) at the point (0, 2) we replace x by 0 and y by 2 in (3): 2(02 + 22 − 2 · 0)(2 · 0 + 2 · 2 · y ′ − 2) = 4(2 · 0 + 2 · 2 · y ′ )

=⇒

8(4y ′ − 2) = 4(4y ′ )

hence 32y ′ − 16 = 16y ′

=⇒

32y ′ − 16y ′ = 16

=⇒

16y ′ = 16

=⇒

y′ =

16 =1 16

so m = 1, therefore y − y0 = m(x − x0 )

=⇒

y − 2 = 1 · (x − 0)

=⇒

y =x+2

dy for any x and then find the slope of the tangent line to (x2 + y 2 − dx 2x)2 = 4(x2 + y 2 ) at the point (0, 2), the computations will be more complicated (see Appendix, page 10).

REMARK: If we first find

7

Section 2.6 Implicit Differentiation

2010 Kiryl Tsishchanka

EXAMPLE: If (x2 + y 2 )3 = 4x2 y 2 , find

dy . dx

Solution: The graph of the curve (x2 + y 2 )3 = 4x2 y 2 is a rose curve: 0.8

y 0.4

0 -0.8

-0.4

0

0.4

0.8

x -0.4

-0.8

Solution: To find

dy we differentiate both sides: dx (x2 + y 2 )3 = 4x2 y 2

=⇒

[(x2 + y 2 )3 ]′ = (4x2 y 2 )′

hence 3(x2 + y 2 )3−1 · (x2 + y 2 )′ = 4(x2 y 2 )′

(4)

(x2 + y 2 )′ = (x2 )′ + (y 2 )′ = 2x + 2y · y ′ = 2(x + y · y ′ )

(5)

(x2 y 2 )′ = (x2 )′ y 2 + x2 (y 2 )′ = 2xy 2 + x2 · 2y · y ′ = 2(xy 2 + x2 y · y ′ )

(6)

Note that and Substituting (5) and (6) into (4), we obtain 3(x2 + y 2 )2 · 2(x + y · y ′ ) = 4 · 2(xy 2 + x2 y · y ′ ) 3(x2 + y 2 )2 (x + y · y ′ ) = 4(xy 2 + x2 y · y ′ ) 3(x4 + 2x2 y 2 + y 4 )(x + y · y ′ ) = 4xy 2 + 4x2 y · y ′ We now expand the parentheses and solve this equation for y ′ : 3x5 + 3x4 y · y ′ + 6x3 y 2 + 6x2 y 3 · y ′ + 3xy 4 + 3y 5 · y ′ = 4xy 2 + 4x2 y · y ′ so 3x4 y · y ′ + 6x2 y 3 · y ′ + 3y 5 · y ′ − 4x2 y · y ′ = −3x5 − 6x3 y 2 − 3xy 4 + 4xy 2 hence y ′ (3x4 y + 6x2 y 3 + 3y 5 − 4x2 y) = −3x5 − 6x3 y 2 − 3xy 4 + 4xy 2 therefore y′ =

−3x5 − 6x3 y 2 − 3xy 4 + 4xy 2 3x5 + 6x3 y 2 + 3y 4 x − 4y 2 x = − 3x4 y + 6x2 y 3 + 3y 5 − 4x2 y 3y 5 + 6y 3 x2 + 3x4 y − 4x2 y

8

Section 2.6 Implicit Differentiation

2010 Kiryl Tsishchanka

EXAMPLE: Find y ′ if sin(x + y) = y 2 cos x. Solution: We have sin(x + y) = y 2 cos x

=⇒

(sin(x + y))′ = (y 2 cos x)′

therefore cos(x + y) · (x + y)′ = (y 2 )′ cos x + y 2 (cos x)′ hence cos(x + y) · (1 + y ′ ) = 2y · y ′ cos x − y 2 sin x We now solve this equation for y ′ : cos(x + y) + cos(x + y) · y ′ = 2y · y ′ cos x − y 2 sin x so cos(x + y) · y ′ − 2y · y ′ cos x = − cos(x + y) − y 2 sin x therefore y ′ (cos(x + y) − 2y cos x) = − cos(x + y) − y 2 sin x Dividing both sides by cos(x + y) − 2y cos x, we get y′ =

cos(x + y) + y 2 sin x − cos(x + y) − y 2 sin x = cos(x + y) − 2y cos x 2y cos x − cos(x + y)

9

Section 2.6 Implicit Differentiation

2010 Kiryl Tsishchanka

Appendix EXAMPLE: If (x2 + y 2 − 2x)2 = 4(x2 + y 2 ), find Solution: To find

dy . dx

dy we differentiate both sides: dx

(x2 + y 2 − 2x)2 = 4(x2 + y 2 )

=⇒

[(x2 + y 2 − 2x)2 ]′ = [4(x2 + y 2 )]′

hence 2(x2 + y 2 − 2x)2−1 · (x2 + y 2 − 2x)′ = 4(x2 + y 2 )′

(7)

(x2 + y 2 − 2x)′ = (x2 )′ + (y 2 )′ − (2x)′ = 2x + 2y · y ′ − 2 = 2(x + y · y ′ − 1)

(8)

(x2 + y 2 )′ = (x2 )′ + (y 2 )′ = 2x + 2y · y ′

(9)

Note that

and Substituting (8) and (9) into (7), we obtain 2(x2 + y 2 − 2x) · 2(x + y · y ′ − 1) = 4(2x + 2y · y ′ ) (x2 + y 2 − 2x)(x + y · y ′ − 1) = 2x + 2y · y ′ We now expand the parentheses and solve this equation for y ′ : x3 + x2 y · y ′ − x2 + xy 2 + y 3 · y ′ − y 2 − 2x2 − 2xy · y ′ + 2x = 2x + 2y · y ′ so x2 y · y ′ + y 3 · y ′ − 2xy · y ′ − 2y · y ′ = −x3 − xy 2 + 3x2 + y 2 hence y ′ (x2 y + y 3 − 2xy − 2y) = −x3 − xy 2 + 3x2 + y 2 therefore y′ =

x3 + xy 2 − 3x2 − y 2 −x3 − xy 2 + 3x2 + y 2 = − x2 y + y 3 − 2xy − 2y y 3 + x2 y − 2xy − 2y

10

Section 2.6 Implicit Differentiation

2010 Kiryl Tsishchanka

EXAMPLE: Sketch the curve r = 1 + sin θ, 0 ≤ θ ≤ 2π (cardioid). Solution: We have r=1+sinHthetaL, theta=Pi6

-1.5

-1.0

r=1+sinHthetaL, theta=2 Pi6

2.0

2.0

2.0

1.5

1.5

1.5

1.0

1.0

1.0

0.5

0.5

0.5

0.5

-0.5

1.0

1.5

-1.5

-1.0

0.5

-0.5

1.5

1.5

1.0

1.0

1.0

0.5

0.5

0.5

0.5

1.0

1.5

-1.5

-1.0

0.5

-0.5

1.0

1.5

-1.5

-1.0

0.5

-0.5

-0.5

r=1+sinHthetaL, theta=8 Pi6

2.0

1.5

1.5

1.5

1.0

1.0

1.0

0.5

0.5

0.5

1.0

1.5

-1.5

-1.0

0.5

-0.5

1.0

1.5

-1.5

-1.0

0.5

-0.5

-0.5

r=1+sinHthetaL, theta=11 Pi6

2.0

1.5

1.5

1.5

1.0

1.0

1.0

0.5

0.5

0.5

-0.5

1.0

1.5

-1.5

-1.0

0.5

-0.5 -0.5

11

1.5

r=1+sinHthetaL, theta=12 Pi6

2.0

0.5

1.0

-0.5

2.0

-0.5

1.5

r=1+sinHthetaL, theta=9 Pi6

2.0

0.5

1.0

-0.5

2.0

-0.5

1.5

r=1+sinHthetaL, theta=6 Pi6

1.5

-0.5

1.0

-0.5

2.0

r=1+sinHthetaL, theta=10 Pi6

-1.0

-1.0

2.0

-0.5

-1.5

-1.5

2.0

r=1+sinHthetaL, theta=7 Pi6

-1.0

1.5

r=1+sinHthetaL, theta=5 Pi6

-0.5

-1.5

1.0

-0.5

r=1+sinHthetaL, theta=4 Pi6

-1.0

0.5

-0.5

-0.5

-1.5

r=1+sinHthetaL, theta=3 Pi6

1.0

1.5

-1.5

-1.0

0.5

-0.5 -0.5

1.0

1.5

Section 2.6 Implicit Differentiation

2010 Kiryl Tsishchanka

EXAMPLE: Sketch the curve r = 1 − cos θ, 0 ≤ θ ≤ 2π (cardioid). Solution: We have r=1-cosHthetaL, theta=Pi6

-2.0

-1.5

-1.0

r=1-cosHthetaL, theta=2 Pi6 1.5

1.5

1.0

1.0

1.0

0.5

0.5

0.5

0.5

-0.5

-1.5

-1.0

-1.5

-1.0

-1.5

-1.0

-1.0

0.5

-0.5

-2.0

-1.5

-1.0

0.5

-0.5 -0.5

-1.0

-1.0

-1.0

-1.5

-1.5

-1.5

r=1-cosHthetaL, theta=5 Pi6

r=1-cosHthetaL, theta=6 Pi6

1.5

1.5

1.5

1.0

1.0

1.0

0.5

0.5

0.5

0.5

-0.5

-2.0

-1.5

-1.0

0.5

-0.5

-2.0

-1.5

-1.0

0.5

-0.5

-0.5

-0.5

-0.5

-1.0

-1.0

-1.0

-1.5

-1.5

-1.5

r=1-cosHthetaL, theta=8 Pi6

r=1-cosHthetaL, theta=9 Pi6

1.5

1.5

1.5

1.0

1.0

1.0

0.5

0.5

0.5

0.5

-0.5

-2.0

-1.5

-1.0

0.5

-0.5

-2.0

-1.5

-1.0

0.5

-0.5

-0.5

-0.5

-0.5

-1.0

-1.0

-1.0

-1.5

-1.5

-1.5

r=1-cosHthetaL, theta=10 Pi6

-2.0

-1.5

-0.5

r=1-cosHthetaL, theta=7 Pi6

-2.0

-2.0

-0.5

r=1-cosHthetaL, theta=4 Pi6

-2.0

r=1-cosHthetaL, theta=3 Pi6

1.5

r=1-cosHthetaL, theta=11 Pi6

r=1-cosHthetaL, theta=12 Pi6

1.5

1.5

1.5

1.0

1.0

1.0

0.5

0.5

0.5

0.5

-0.5

-2.0

-1.5

-1.0

0.5

-0.5

-2.0

-1.5

-1.0

0.5

-0.5

-0.5

-0.5

-0.5

-1.0

-1.0

-1.0

-1.5

-1.5

-1.5

12