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

Example 23: dydx\frac{dy}{dx} if y+sin⁡y=cos⁡xy+\sin y=\cos x

ExamplesImplicit differentiation · Section 5.3.2
The question

Find dydx\dfrac{dy}{dx}⁠, if y+sin⁡y=cos⁡xy + \sin y = \cos x⁠.

Exam answer

Differentiating both sides w.r.t. xx⁠,

dydx+cos⁡y⋅dydx=−sin⁡x\frac{dy}{dx} + \cos y\cdot\frac{dy}{dx} = -\sin x ⇒ dydx(1+cos⁡y)=−sin⁡x\Rightarrow\ \frac{dy}{dx}(1 + \cos y) = -\sin x

∴ dydx=−sin⁡x1+cos⁡y\therefore\ \dfrac{dy}{dx} = -\dfrac{\sin x}{1 + \cos y} (y≠(2n+1)π)(y \ne (2n + 1)\pi)⁠.

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

The one idea this problem is built on

There is no way to solve y+sin⁡y=cos⁡xy + \sin y = \cos x for yy with a formula, so we differentiate the relation as it stands. The only new point compared with Example 22 is the term sin⁡y\sin y⁠: since yy is a function of xx⁠, sin⁡y\sin y is a composite (sine of y(x)y(x)⁠), so the chain rule gives cos⁡y⋅dydx\cos y\cdot\frac{dy}{dx}⁠. After that, dydx\frac{dy}{dx} appears in two terms; factor it out and divide.

Given, to find, and the plan
Given
y+sin⁡y=cos⁡xy + \sin y = \cos x⁠, which defines yy as a function of xx (Step 1 shows that it really does). As in the book, we take for granted that this yy is differentiable.
To find
dydx\dfrac{dy}{dx}⁠, and where the formula is valid.
Plan
(1) See that each xx gives exactly one yy⁠, with ∣y∣≤1|y|\le 1⁠. (2) Differentiate each term with respect to xx⁠. (3) Collect the dydx\frac{dy}{dx} terms. (4) Divide, stating when that is allowed. (5) Show the condition always holds on this curve.

Basics you need

1Implicit differentiation

Differentiate both sides of the relation with respect to xx⁠, treating yy as a function of xx⁠; then solve the resulting equation for dydx\frac{dy}{dx} (as in Example 22). Basics: solving for dy/dx

2Chain rule

If y=y(x)y = y(x)⁠, then ddxsin⁡y=cos⁡y⋅dydx\frac{d}{dx}\sin y = \cos y\cdot\frac{dy}{dx}⁠: outer function sin⁡\sin⁠, inner function y(x)y(x) (Theorem 4). Basics: composite functions

3Derivative of cos⁡x\cos x

ddxcos⁡x=−sin⁡x\frac{d}{dx}\cos x = -\sin x (Table 5.3). Basics: derivative rules

4Facts about sine and cosine

∣sin⁡θ∣≤1|\sin\theta| \le 1⁠, ∣cos⁡θ∣≤1|\cos\theta|\le 1⁠; cos⁡θ=−1\cos\theta = -1 exactly when θ\theta is an odd multiple of π\pi⁠; sin⁡θ\sin\theta has the same sign as θ\theta for −π≤θ≤π-\pi \le \theta \le \pi⁠. Basics: trigonometric identities

Solution

  1. The relation really gives one yy for each xx⁠, and ∣y∣≤1|y| \le 1

    Write g(y)=y+sin⁡yg(y) = y + \sin y⁠, so the relation is g(y)=cos⁡xg(y) = \cos x⁠. Two facts settle what yy can be.

    Size. Since ∣cos⁡x∣≤1|\cos x| \le 1⁠, any solution has ∣y+sin⁡y∣≤1|y + \sin y| \le 1⁠. If ∣y∣≤π|y| \le \pi⁠, then yy and sin⁡y\sin y have the same sign, so ∣y+sin⁡y∣=∣y∣+∣sin⁡y∣|y + \sin y| = |y| + |\sin y|⁠, which is ≥∣y∣\ge |y|⁠, giving ∣y∣≤1|y|\le 1⁠. If ∣y∣>π|y| > \pi⁠, then ∣y+sin⁡y∣≥∣y∣−1|y + \sin y| \ge |y| - 1⁠, which is >π−1>1> \pi - 1 > 1⁠: impossible. So every solution satisfies

    −1≤y≤1.-1 \le y \le 1.

    Exactly one solution. gg is continuous, takes the value g(−1)≈−1.84g(-1) \approx -1.84 and g(1)≈1.84g(1) \approx 1.84⁠, so by the intermediate value property it hits every number cos⁡x\cos x in [−1,1][-1, 1] for some yy in [−1,1][-1, 1]⁠. And gg is strictly increasing: for y1<y2y_1 < y_2⁠,

    g(y2)−g(y1)=(y2−y1)+(sin⁡y2−sin⁡y1)>0,\begin{aligned} &g(y_2) - g(y_1) \\ &= (y_2 - y_1) + (\sin y_2 - \sin y_1) \\ &> 0, \end{aligned}

    because ∣sin⁡y2−sin⁡y1∣<y2−y1|\sin y_2 - \sin y_1| < y_2 - y_1 whenever y1≠y2y_1 \ne y_2⁠. So gg cannot take the same value twice, and each xx gives exactly one yy⁠.

    The book takes it for granted that the relation defines yy as a function of xx⁠. We check it because implicit differentiation only makes sense if there is a function y(x)y(x) to differentiate. The bound ∣y∣≤1|y|\le1 will also matter in Step 5. The inequality ∣sin⁡y2−sin⁡y1∣<∣y2−y1∣|\sin y_2 - \sin y_1| < |y_2 - y_1| follows from the sum-to-product formula sin⁡y2−sin⁡y1=2cos⁡y1+y22 sin⁡y2−y12,\sin y_2 - \sin y_1 = 2\cos\tfrac{y_1+y_2}{2}\,\sin\tfrac{y_2-y_1}{2}, since ∣cos⁡∣≤1|\cos| \le 1 and ∣sin⁡u∣<∣u∣|\sin u| < |u| for u≠0u \ne 0⁠.
    Intermediate value property: a function continuous on [a,b][a, b] takes every value between f(a)f(a) and f(b)f(b)⁠. This chapter does not state or prove it, but it is a standard property of continuous functions; gg is continuous by the algebra of continuous functions (Theorem 1, Section 5.2.1). Basics: trigonometric identities
  2. Differentiate every term with respect to xx

    The relation holds for every xx⁠, so both sides have equal derivatives:

    dydx+ddx(sin⁡y)=ddx(cos⁡x).\frac{dy}{dx} + \frac{d}{dx}(\sin y) = \frac{d}{dx}(\cos x).

    Term by term:

    • ddx(y)=dydx\frac{d}{dx}(y) = \frac{dy}{dx}⁠: this is the unknown we want.
    • ddx(sin⁡y)\frac{d}{dx}(\sin y)⁠: the outer function is sin⁡\sin⁠, the inner function is y(x)y(x)⁠. By the chain rule, ddx(sin⁡y)=cos⁡y⋅dydx\frac{d}{dx}(\sin y) = \cos y\cdot\frac{dy}{dx}⁠.
    • ddx(cos⁡x)=−sin⁡x\frac{d}{dx}(\cos x) = -\sin x⁠.

    So

    dydx+cos⁡y⋅dydx=−sin⁡x.\frac{dy}{dx} + \cos y\cdot\frac{dy}{dx} = -\sin x.
    The most common error is to write ddx(sin⁡y)=cos⁡y\frac{d}{dx}(\sin y) = \cos y⁠. That would be the derivative with respect to yy⁠. We are differentiating with respect to xx⁠, and yy changes as xx changes, so the chain rule adds the factor dydx\frac{dy}{dx}⁠: "derivative of the outer at the inner, times derivative of the inner".
    Chain rule (Theorem 4, Section 5.3.1) with t=y(x)t = y(x) and v(t)=sin⁡tv(t) = \sin t⁠: ddxsin⁡y=cos⁡y⋅dydx\frac{d}{dx}\sin y = \cos y\cdot\frac{dy}{dx}⁠. Lesson: chain rule
  3. Collect the dydx\frac{dy}{dx} terms

    dydx\frac{dy}{dx} appears in both terms on the left. Factor it out:

    dydx (1+cos⁡y)=−sin⁡x.\frac{dy}{dx}\,(1 + \cos y) = -\sin x.
    The equation is linear in the unknown dydx\frac{dy}{dx}⁠: it appears only to the first power, multiplied by things we know (11 and cos⁡y\cos y⁠). That is always the case after implicit differentiation, so the next move is always to factor it out and divide.
    Factoring: A+BA=A(1+B)A + BA = A(1 + B)⁠, here with A=dydxA = \frac{dy}{dx} and B=cos⁡yB = \cos y⁠. Basics: solving for dy/dx
  4. Divide, and state when that is allowed

    We may divide by 1+cos⁡y1 + \cos y only if it is not zero:

    dydx=−sin⁡x1+cos⁡y,1+cos⁡y≠0.\frac{dy}{dx} = -\frac{\sin x}{1 + \cos y}, \qquad 1 + \cos y \ne 0.

    1+cos⁡y=01 + \cos y = 0 means cos⁡y=−1\cos y = -1⁠, which happens exactly when yy is an odd multiple of π\pi⁠. So the formula holds where

    y≠(2n+1)π,n∈Z.y \ne (2n+1)\pi, \qquad n \in \Z.
    This is the book's condition. Division by zero is undefined, so any formula obtained by dividing must carry the condition that the divisor is non-zero. Where 1+cos⁡y=01+\cos y = 0 the equation in Step 3 would read 0=−sin⁡x0 = -\sin x and would say nothing about dydx\frac{dy}{dx}⁠.
    cos⁡θ=−1  ⟺  θ=(2n+1)π\cos\theta = -1 \iff \theta = (2n+1)\pi for an integer nn (unit circle: the point (−1,0)(-1, 0)⁠). Basics: trigonometric identities
  5. On this curve the condition is never violated

    By Step 1, every point of the curve has ∣y∣≤1|y| \le 1⁠. The odd multiples of π\pi closest to 00 are ±π≈±3.14\pm\pi \approx \pm 3.14⁠, far outside [−1,1][-1, 1]⁠. In fact, for ∣y∣≤1|y|\le 1⁠,

    cos⁡y≥cos⁡1≈0.5403>0,\cos y \ge \cos 1 \approx 0.5403 > 0,

    so 1+cos⁡y>1.541 + \cos y > 1.54⁠. The formula dydx=−sin⁡x1+cos⁡y\frac{dy}{dx} = -\frac{\sin x}{1+\cos y} is therefore valid at every point of the curve, that is, for every real xx⁠.

    x y −2π −π π 2π −0.25 0.25 (π/2, 0): slope −1/2 highest y ≈ 0.511 (at x = 0, ±2π) lowest y ≈ −0.511 (at x = ±π)
    The curve y+sin⁡y=cos⁡xy + \sin y = \cos x⁠, computed numerically. The vertical scale is 4 times the horizontal one, so the wave looks taller than it is. It stays between y≈−0.511y \approx -0.511 and y≈0.511y \approx 0.511⁠, far from the excluded heights y=±πy = \pm\pi⁠. At (π2,0)(\frac{\pi}{2}, 0) the slope is −sin⁡(π/2)1+cos⁡0=−12-\frac{\sin(\pi/2)}{1 + \cos 0} = -\frac12⁠.
    The book states the condition y≠(2n+1)πy \ne (2n+1)\pi but does not ask whether the curve ever reaches such a yy⁠. Checking shows it does not: the restriction is correct but, for this particular relation, never bites. The slope is 00 exactly where sin⁡x=0\sin x = 0⁠, at x=nπx = n\pi⁠: these are the highest and lowest points of the wave.
    cos⁡\cos decreases on [0,π][0, \pi] and is even, so on [−1,1][-1, 1] its smallest value is cos⁡1\cos 1⁠. Basics: trigonometric identities
Result

dydx=−sin⁡x1+cos⁡y\dfrac{dy}{dx} = -\dfrac{\sin x}{1 + \cos y}⁠, valid where y≠(2n+1)πy \ne (2n+1)\pi⁠. (This matches the book.) On this curve ∣y∣≤1|y| \le 1⁠, so the condition always holds and the formula is valid for every real xx⁠.

Check it with numbers

At x=1x = 1⁠: cos⁡1=0.5403023\cos 1 = 0.5403023⁠, and solving y+sin⁡y=0.5403023y + \sin y = 0.5403023 numerically gives y=0.2718186…y = 0.2718186\ldots⁠. The formula gives

−sin⁡11+cos⁡(0.2718186)=−0.4286038…\begin{aligned} &-\frac{\sin 1}{1 + \cos(0.2718186)} \\ &= -0.4286038\ldots \end{aligned}

Solving the relation again at x=0.999x = 0.999 and x=1.001x = 1.001 and dividing the change in yy by 0.0020.002 gives −0.42860…-0.42860\ldots⁠, the same value. At x=0x = 0⁠: cos⁡0=1\cos 0 = 1⁠, and y≈0.5110y \approx 0.5110 satisfies y+sin⁡y=1y + \sin y = 1⁠; the slope there is −01+cos⁡y=0-\frac{0}{1+\cos y} = 0⁠, the top of the wave.

Common mistakes
  1. ddxsin⁡y=cos⁡y\frac{d}{dx}\sin y = \cos y, without the factor dydx\frac{dy}{dx}⁠. Every time yy sits inside a function, the chain rule adds dydx\frac{dy}{dx}⁠.
  2. Sign of ddxcos⁡x\frac{d}{dx}\cos x⁠. It is −sin⁡x-\sin x⁠.
  3. Forgetting the "1" when factoring: dydx+cos⁡y dydx=dydx(1+cos⁡y)\frac{dy}{dx} + \cos y\,\frac{dy}{dx} = \frac{dy}{dx}(1 + \cos y)⁠, not dydxcos⁡y\frac{dy}{dx}\cos y⁠.
  4. Dividing without a condition. State where the divisor 1+cos⁡y1 + \cos y is non-zero.
What to take away
  1. Implicit differentiation needs only the chain rule: a function of yy differentiates to (its derivative in yy⁠) ×dydx\times\frac{dy}{dx}⁠.
  2. After differentiating, the equation is linear in dydx\frac{dy}{dx}⁠: collect, factor, divide.
  3. An implicit derivative is usually in terms of both xx and yy⁠; to evaluate it at a point you need both coordinates of that point.

Every fact used, and where it comes from

FactUsed inSource
Intermediate value property; ∣sin⁡u∣<∣u∣|\sin u| < |u| for u≠0u\ne 0Step 1Standard property of continuous functions (not proved in the book); sin⁡u<u\sin u < u for u>0u > 0 (Class XI, limits of trigonometric functions)
Differentiating a relation that holds for all xxStep 2Section 5.3.2 (Lesson: implicit differentiation)
ddxsin⁡y=cos⁡y dydx\frac{d}{dx}\sin y = \cos y\,\frac{dy}{dx}Step 2Theorem 4 (Chain Rule), Section 5.3.1
ddxcos⁡x=−sin⁡x\frac{d}{dx}\cos x = -\sin xStep 2Table 5.3, Section 5.3
cos⁡θ=−1  ⟺  θ=(2n+1)π\cos\theta = -1 \iff \theta = (2n+1)\piStep 4Trigonometric functions (Class XI)
cos⁡1≈0.5403\cos 1 \approx 0.5403⁠; curve valuesStep 5, CheckComputed numerically in the site's verification script
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 →