Class 12 Maths, Worked in Full Past papersGet updates
Chapter 5 · Continuity and Differentiability

Exercise 5.5 · Q12: dydx\frac{dy}{dx} if xy+yx=1x^y+y^x=1

Exercise 5.5Logarithmic differentiation · Section 5.5
The question

Find dydx\dfrac{dy}{dx} of the function given by

xy+yx=1.x^y + y^x = 1.
Exam answer

Let u=xyu = x^y and v=yxv = y^x (x>0x > 0⁠, y>0y > 0⁠). Then u+v=1u + v = 1⁠, so

dudx+dvdx=0…(i)\frac{du}{dx} + \frac{dv}{dx} = 0\quad\ldots(\text{i})

Taking log on both sides of u=xyu = x^y⁠, log⁡u=ylog⁡x\log u = y\log x⁠. Differentiating w.r.t. xx⁠,

1ududx=dydxlog⁡x+yx∴ dudx=xy[yx+log⁡x dydx]\begin{aligned} \frac1u\frac{du}{dx} &= \frac{dy}{dx}\log x + \frac{y}{x} \\ \therefore\ \frac{du}{dx} &= x^y\left[\frac{y}{x} + \log x\,\frac{dy}{dx}\right] \end{aligned}

Taking log on both sides of v=yxv = y^x⁠, log⁡v=xlog⁡y\log v = x\log y⁠. Differentiating w.r.t. xx⁠,

1vdvdx=log⁡y+xy dydx∴ dvdx=yx[log⁡y+xy dydx]\begin{aligned} \frac1v\frac{dv}{dx} &= \log y + \frac{x}{y}\,\frac{dy}{dx} \\ \therefore\ \frac{dv}{dx} &= y^x\left[\log y + \frac{x}{y}\,\frac{dy}{dx}\right] \end{aligned}

Substituting in (i),

y xy−1+xylog⁡x dydx+yxlog⁡y+x yx−1 dydx=0⇒(xylog⁡x+x yx−1)dydx=−(y xy−1+yxlog⁡y)\begin{aligned} &y\,x^{y-1} + x^y\log x\,\frac{dy}{dx} \\ &+ y^x\log y + x\,y^{x-1}\,\frac{dy}{dx} = 0 \\ &\Rightarrow \left(x^y\log x + x\,y^{x-1}\right)\frac{dy}{dx} \\ &\quad = -\left(y\,x^{y-1} + y^x\log y\right) \end{aligned}

∴ dydx=− y xy−1+yxlog⁡yxylog⁡x+x yx−1\therefore\ \dfrac{dy}{dx} = -\,\dfrac{y\,x^{y-1} + y^x\log y}{x^y\log x + x\,y^{x-1}}

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

The relation is implicit, and each term is a power with a varying base and a varying exponent. Exactly as in Example 30, we name the terms u=xyu = x^y and v=yxv = y^x⁠, differentiate each by taking logs, use u′+v′=0u' + v' = 0⁠, and solve for dydx\frac{dy}{dx}⁠. We never take the log of the whole equation, because logs do not split sums.

Given, to find, and the plan
Given
xy+yx=1x^y + y^x = 1⁠, with yy a differentiable function of xx⁠. Powers with variable exponents need positive bases, so x>0x > 0 and y>0y > 0⁠.
To find
dydx\frac{dy}{dx}⁠, and where the formula holds.
Plan
(1) Name the terms; differentiate the relation. (2) Find u′u'⁠. (3) Find v′v'⁠. (4) Substitute and collect. (5) Solve, with the condition. (6) Take a closer look at which points satisfy the relation.

Basics you need

1Implicit differentiation

Differentiate every term with respect to xx⁠, writing dydx\frac{dy}{dx} whenever yy is differentiated, then solve for dydx\frac{dy}{dx} (Section 5.3.2). Basics: solving for dy/dx

2Logarithmic differentiation

For u>0u > 0⁠: dudx=u⋅ddx(log⁡u)\frac{du}{dx} = u\cdot\frac{d}{dx}(\log u) (Section 5.5). Basics: exponentials and logarithms

3Chain rule for log⁡y\log y

Since yy depends on xx⁠: ddxlog⁡y=1ydydx\frac{d}{dx}\log y = \frac1y\frac{dy}{dx}⁠. Basics: derivative rules

Solution

  1. Name the two terms and differentiate the relation

    For x>0x > 0⁠, y>0y > 0 put

    u=xy,v=yx,u = x^y, \qquad v = y^x,

    so u+v=1u + v = 1⁠. The right side is a constant, so by the sum rule

    dudx+dvdx=0.(1)\frac{du}{dx} + \frac{dv}{dx} = 0. \qquad (1)
    Both terms have a base and an exponent that vary with xx (remember yy depends on xx⁠), so neither the power rule nor the axa^x rule applies; logs are needed. But log⁡(u+v)\log(u + v) does not split, so we differentiate the terms one at a time.
    Sum rule; derivative of a constant is 0 (Section 5.3). Lesson: implicit differentiation
  2. dudx\frac{du}{dx} for u=xyu = x^y

    Since x>0x > 0⁠, u>0u > 0 and log⁡u=ylog⁡x\log u = y\log x⁠. Product rule on y⋅log⁡xy\cdot\log x⁠:

    1ududx=dydx⋅log⁡x+y⋅1x.\begin{aligned} \frac1u\frac{du}{dx} &= \frac{dy}{dx}\cdot\log x + y\cdot\frac1x. \end{aligned}

    Multiply by u=xyu = x^y⁠:

    dudx=xy[yx+log⁡x dydx].(2)\frac{du}{dx} = x^y\left[\frac{y}{x} + \log x\,\frac{dy}{dx}\right]. \qquad (2)
    The factor yy is a function of xx⁠, so its derivative is dydx\frac{dy}{dx}⁠; the factor log⁡x\log x differentiates to 1x\frac1x directly.
    log⁡pn=nlog⁡p\log p^n = n\log p (Section 5.4); product rule; (log⁡x)′=1x(\log x)' = \frac1x (Theorem 5). Lesson: logarithmic differentiation
  3. dvdx\frac{dv}{dx} for v=yxv = y^x

    Since y>0y > 0⁠, v>0v > 0 and log⁡v=xlog⁡y\log v = x\log y⁠. Product rule on x⋅log⁡yx\cdot\log y⁠, with the chain rule for log⁡y\log y⁠:

    1vdvdx=1⋅log⁡y+x⋅1ydydx.\frac1v\frac{dv}{dx} = 1\cdot\log y + x\cdot\frac1y\frac{dy}{dx}.

    Multiply by v=yxv = y^x⁠:

    dvdx=yx[log⁡y+xy dydx].(3)\frac{dv}{dx} = y^x\left[\log y + \frac{x}{y}\,\frac{dy}{dx}\right]. \qquad (3)
    This time the base is yy⁠. Differentiating log⁡y\log y with respect to xx gives 1y⋅dydx\frac1y\cdot\frac{dy}{dx}⁠: outer function log⁡\log⁠, inner function yy⁠.
    Chain rule (Theorem 4, Section 5.3.1). Basics: derivative rules
  4. Substitute into (1) and collect the dydx\frac{dy}{dx} terms

    Expanding (2) and (3) and using the index laws xy⋅yx=y xy−1x^y\cdot\frac{y}{x} = y\,x^{y-1} and yx⋅xy=x yx−1y^x\cdot\frac{x}{y} = x\,y^{x-1}⁠, equation (1) becomes

    y xy−1+xylog⁡x dydx+yxlog⁡y+x yx−1dydx=0.\begin{aligned} &y\,x^{y-1} + x^y\log x\,\frac{dy}{dx} \\ &+ y^x\log y + x\,y^{x-1}\frac{dy}{dx} = 0. \end{aligned}

    Keep the dydx\frac{dy}{dx} terms on the left:

    (xylog⁡x+x yx−1)dydx=−(y xy−1+yxlog⁡y).\begin{aligned} &\left(x^y\log x + x\,y^{x-1}\right)\frac{dy}{dx} \\ &= -\left(y\,x^{y-1} + y^x\log y\right). \end{aligned}
    After implicit differentiation the equation is linear in dydx\frac{dy}{dx}⁠: two terms contain it, two do not. Moving the two that do not to the right changes their signs. xyx=xy−1\frac{x^y}{x} = x^{y-1} because x>0x > 0⁠.
    Index law pmp=pm−1\frac{p^m}{p} = p^{m-1}⁠. Basics: solving for dy/dx
  5. Solve for dydx\frac{dy}{dx}⁠, with the condition

    dydx=− y xy−1+yxlog⁡yxylog⁡x+x yx−1,\frac{dy}{dx} = -\,\frac{y\,x^{y-1} + y^x\log y}{x^y\log x + x\,y^{x-1}},

    valid where xylog⁡x+x yx−1≠0x^y\log x + x\,y^{x-1} \ne 0⁠.

    We may only divide by a non-zero quantity. This is exactly the book's answer.
    Division needs a non-zero divisor. Basics: solving for dy/dx
  6. A closer look: which points satisfy xy+yx=1x^y + y^x = 1⁠?

    We show that xy+yx>1x^y + y^x > 1 for all x>0x > 0⁠, y>0y > 0⁠.

    Case 1: x≥1x \ge 1 or y≥1y \ge 1⁠. If x≥1x \ge 1⁠, then log⁡(xy)=ylog⁡x≥0\log(x^y) = y\log x \ge 0⁠, so xy≥1x^y \ge 1⁠; and yx>0y^x > 0⁠. The sum is >1> 1⁠. The case y≥1y \ge 1 is the same with the letters swapped.

    Case 2: 0<x<10 < x < 1 and 0<y<10 < y < 1⁠. Fix tt with 0<t<10 < t < 1 and let φ(z)=1+tz−(1+z)t\varphi(z) = 1 + tz - (1+z)^t for z≥0z \ge 0⁠. Then φ(0)=0\varphi(0) = 0 and

    φ′(z)=t[1−(1+z)t−1]>0for z>0,\begin{aligned} \varphi'(z) &= t\left[1 - (1+z)^{t-1}\right] \\ &> 0 \quad\text{for } z > 0, \end{aligned}

    because (1+z)t−1=e(t−1)log⁡(1+z)(1+z)^{t-1} = e^{(t-1)\log(1+z)} and the exponent is negative (t−1<0t - 1 < 0⁠, log⁡(1+z)>0\log(1+z) > 0⁠), so (1+z)t−1<1(1+z)^{t-1} < 1⁠. Now take any z>0z > 0⁠. On [0,z][0, z]⁠, φ\varphi is continuous, and φ′>0\varphi' > 0 inside, so by Theorem 1 of Chapter 6 (a later chapter, quoted here without proof) φ\varphi is increasing on [0,z][0, z]⁠, and φ(z)>φ(0)=0\varphi(z) > \varphi(0) = 0⁠:

    (1+z)t<1+tz.(1+z)^t < 1 + tz.

    Use this with t=yt = y and 1+z=1x1 + z = \frac1x⁠, that is z=1−xx>0z = \frac{1-x}{x} > 0⁠:

    x−y<1+y(1−x)x, soxy>xx+y(1−x)>xx+y.\begin{aligned} x^{-y} < 1 + \frac{y(1-x)}{x}, \text{ so} \\ x^y > \frac{x}{x + y(1-x)} > \frac{x}{x+y}. \end{aligned}

    (The last step uses y(1−x)<yy(1-x) < y⁠.) In the same way yx>yx+yy^x > \frac{y}{x+y}⁠. Adding, xy+yx>x+yx+y=1x^y + y^x > \frac{x+y}{x+y} = 1⁠.

    So no point with x>0x > 0⁠, y>0y > 0 satisfies xy+yx=1x^y + y^x = 1, and the calculation above is formal. It is still exactly the right calculation for every relation xy+yx=cx^y + y^x = c with a constant cc⁠: the constant disappears in Step 1, so the same formula gives dydx\frac{dy}{dx}⁠. For c>1c > 1 these curves do exist; for c=2c = 2 the point (1,1)(1, 1) is on the curve (see the check below).

    The book does not remark on this. The derivative of (1+z)t(1+z)^t is t(1+z)t−1t(1+z)^{t-1} for any real tt⁠, by logarithmic differentiation: log⁡\log of it is tlog⁡(1+z)t\log(1+z)⁠, whose derivative is t1+z\frac{t}{1+z}⁠. If a base were allowed to be 00⁠, the half-lines x=0,y>0x = 0, y > 0 and y=0,x>0y = 0, x > 0 would satisfy the equation (since 0y=00^y = 0 and y0=1y^0 = 1⁠); but there no logarithm exists, and on x=0x = 0 the relation does not even give yy as a function of xx⁠.
    A function continuous on [a,b][a, b] with positive derivative on (a,b)(a, b) is increasing on [a,b][a, b] (Theorem 1, Section 6.3, in the later Chapter 6). Lesson: logarithmic differentiation
Result dydx=− y xy−1+yxlog⁡yxylog⁡x+x yx−1,\frac{dy}{dx} = -\,\frac{y\,x^{y-1} + y^x\log y}{x^y\log x + x\,y^{x-1}},

for x,y>0x, y > 0 where the denominator is not zero. (Textbook answer: the same expression.)

Note: since xy+yx>1x^y + y^x > 1 whenever x,y>0x, y > 0 (Step 6), the relation xy+yx=1x^y + y^x = 1 itself has no such points; the formula is the correct derivative on every curve xy+yx=cx^y + y^x = c⁠, for instance c=2c = 2⁠.

Check it with numbers

Take the curve xy+yx=2x^y + y^x = 2⁠, which passes through (1,1)(1, 1)⁠. There log⁡1=0\log 1 = 0⁠, so the formula gives

dydx=−1⋅1+1⋅01⋅0+1⋅1=−1.\frac{dy}{dx} = -\frac{1\cdot 1 + 1\cdot 0}{1\cdot 0 + 1\cdot 1} = -1.

This matches the symmetry of the curve in the line y=xy = x⁠. At x=0.5x = 0.5 the same curve has y=3.6976528y = 3.6976528 (solved numerically), and the formula gives −14.9303452-14.9303452⁠; solving for yy at x=0.5±0.00001x = 0.5 \pm 0.00001 and dividing the change by 0.000020.00002 gives −14.9303452-14.9303452 too.

Step 6 in numbers: on a grid of x,yx, y in (0,2)(0, 2) with step 0.0050.005 the smallest value of xy+yxx^y + y^x found is 1.00227921.0022792⁠, above 1.

Common mistakes
  1. Taking the log of the whole equation and writing ylog⁡x+xlog⁡y=log⁡1=0y\log x + x\log y = \log 1 = 0⁠. Logs do not split sums; this gives a wrong answer.
  2. Forgetting dydx\frac{dy}{dx} when differentiating yy or log⁡y\log y with respect to xx⁠.
  3. Treating xyx^y like xnx^n and writing y xy−1y\,x^{y-1} alone: the exponent varies too.
  4. Sign slip when moving the terms without dydx\frac{dy}{dx} to the right.
  5. Never asking whether the relation has points. Here it has none with positive bases.
What to take away
  1. For a sum of variable powers: one log per term, add the derivatives, then solve for dydx\frac{dy}{dx}⁠.
  2. ddxxy=xy[yx+log⁡x y′]\frac{d}{dx}x^y = x^y\left[\frac{y}{x} + \log x\,y'\right] and ddxyx=yx[log⁡y+xyy′]\frac{d}{dx}y^x = y^x\left[\log y + \frac{x}{y}y'\right]⁠.
  3. Implicit differentiation gives the slope of any curve F(x,y)=cF(x, y) = c⁠; the constant cc plays no part.

Every fact used, and where it comes from

FactUsed inSource
Implicit differentiationSteps 1, 4, 5Section 5.3.2 (Lesson: implicit differentiation)
Logarithmic differentiation (positive bases)Steps 2, 3, 6Section 5.5; Example 30 (Lesson: logarithmic differentiation)
log⁡pn=nlog⁡p\log p^n = n\log p⁠; ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1xSteps 2, 3, 6Section 5.4; Theorem 5
Sum and product rules; chain ruleSteps 1–3Section 5.3; Theorem 4, Section 5.3.1
Index law pmp=pm−1\frac{p^m}{p} = p^{m-1}Step 4Exponents (Class XI)
Positive derivative implies increasingStep 6Theorem 1, Section 6.3, Chapter 6 (a later chapter; not proved in Chapter 5)
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →