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

Example 43: Differentiate sin⁡2x\sin^2 x with respect to ecos⁡xe^{\cos x}

ExamplesDerivative of one function with respect to another · Miscellaneous Examples
The question

Differentiate sin⁡2x\sin^2 x w.r.t. ecos⁡xe^{\cos x}⁠.

Exam answer

Let u=sin⁡2xu = \sin^2 x and v=ecos⁡xv = e^{\cos x}⁠.

Differentiating w.r.t. xx (chain rule),

dudx=2sin⁡xcos⁡xdvdx=ecos⁡x(−sin⁡x)\begin{aligned} \frac{du}{dx} &= 2\sin x\cos x \\ \frac{dv}{dx} &= e^{\cos x}(-\sin x) \end{aligned} dudv=du/dxdv/dx=2sin⁡xcos⁡x−sin⁡x ecos⁡x\frac{du}{dv} = \frac{du/dx}{dv/dx} = \frac{2\sin x\cos x}{-\sin x\,e^{\cos x}}

∴ dudv=−2cos⁡xecos⁡x\therefore\ \dfrac{du}{dv} = -\dfrac{2\cos x}{e^{\cos x}} (x≠nπ, n∈Z)(x \ne n\pi,\ n \in \Z)⁠.

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

The one idea this problem is built on

"Differentiate uu with respect to vv" asks for dudv\dfrac{du}{dv}⁠: how fast u=sin⁡2xu = \sin^2 x changes compared with v=ecos⁡xv = e^{\cos x}⁠. Both depend on xx⁠, so xx plays the role of a parameter, exactly as tt does in parametric differentiation. Hence

dudv=du/dxdv/dx,wherever dvdx≠0.\frac{du}{dv} = \frac{du/dx}{dv/dx}, \qquad \text{wherever } \frac{dv}{dx} \ne 0.
Given, to find, and the plan
Given
u(x)=sin⁡2xu(x) = \sin^2 x and v(x)=ecos⁡xv(x) = e^{\cos x}⁠, both defined for every real xx⁠.
To find
dudv\dfrac{du}{dv} and where it is valid.
Plan
Find dudx\frac{du}{dx} and dvdx\frac{dv}{dx} by the chain rule; find where dvdx=0\frac{dv}{dx} = 0⁠; divide and simplify; check by writing uu directly in terms of vv⁠.

Basics you need

1Parametric differentiation

If yy and xx both depend on tt⁠, then dydx=dy/dtdx/dt\dfrac{dy}{dx} = \dfrac{dy/dt}{dx/dt} where dxdt≠0\dfrac{dx}{dt} \ne 0 (Section 5.6). Here uu⁠, vv and xx play the roles of yy⁠, xx and tt⁠. Lesson: parametric differentiation

2The chain rule

Theorem 4, Section 5.3.1. We need it for (sin⁡x)2(\sin x)^2 and for ecos⁡xe^{\cos x}⁠. Lesson: the chain rule

3Exponential function

ddw(ew)=ew\frac{d}{dw}(e^w) = e^w (Theorem 5, Section 5.4), and ew>0e^w > 0 for every real ww⁠. Basics: exponentials and logarithms

Solution

  1. Translate the question

    Let u=sin⁡2xu = \sin^2 x and v=ecos⁡xv = e^{\cos x}⁠. We want dudv\dfrac{du}{dv}⁠. Since both are functions of xx⁠, the chain rule gives dudx=dudv⋅dvdx\dfrac{du}{dx} = \dfrac{du}{dv}\cdot\dfrac{dv}{dx}⁠, so

    dudv=du/dxdv/dx(dvdx≠0).\frac{du}{dv} = \frac{du/dx}{dv/dx} \qquad\left(\frac{dv}{dx} \ne 0\right).
    We cannot differentiate "with respect to ecos⁡xe^{\cos x}" directly with our rules, which are all with respect to a single variable. Going through xx turns the problem into two ordinary derivatives and one division. This is the same reasoning the textbook uses for parametric forms in Section 5.6.
    Section 5.6, with xx as the parameter. Lesson: parametric differentiation
  2. Find dudx\frac{du}{dx}

    u=(sin⁡x)2u = (\sin x)^2⁠: outer function t2t^2⁠, inner function t=sin⁡xt = \sin x⁠.

    dudx=2sin⁡x⋅ddx(sin⁡x)=2sin⁡xcos⁡x.\frac{du}{dx} = 2\sin x\cdot\frac{d}{dx}(\sin x) = 2\sin x\cos x.
    sin⁡2x\sin^2 x means (sin⁡x)2(\sin x)^2⁠, the square of the sine, so the outer function is squaring. The power rule gives 2t2t and the chain rule multiplies by (sin⁡x)′=cos⁡x(\sin x)' = \cos x⁠.
    Power rule and chain rule; (sin⁡x)′=cos⁡x(\sin x)' = \cos x (Table 5.3). Basics: derivative rules
  3. Find dvdx\frac{dv}{dx}

    v=ecos⁡xv = e^{\cos x}⁠: outer function ewe^w⁠, inner function w=cos⁡xw = \cos x⁠.

    dvdx=ecos⁡x⋅(−sin⁡x)=−sin⁡x ecos⁡x.\frac{dv}{dx} = e^{\cos x}\cdot(-\sin x) = -\sin x\,e^{\cos x}.
    The exponential is its own derivative, evaluated at the same input cos⁡x\cos x⁠; the chain rule then multiplies by (cos⁡x)′=−sin⁡x(\cos x)' = -\sin x⁠. This is Example 26 (iv) of the textbook.
    Theorem 5 (1), Section 5.4; chain rule. Example 26
  4. Where is dvdx≠0\frac{dv}{dx} \ne 0⁠?

    ecos⁡x>0e^{\cos x} > 0 for every xx⁠, so dvdx=−sin⁡x ecos⁡x\frac{dv}{dx} = -\sin x\,e^{\cos x} is zero exactly when sin⁡x=0\sin x = 0⁠, that is x=nπx = n\pi⁠, n∈Zn \in \Z⁠. We work with x≠nπx \ne n\pi⁠.

    We are about to divide by dvdx\frac{dv}{dx} and then cancel sin⁡x\sin x⁠; both need sin⁡x≠0\sin x \ne 0⁠. The textbook cancels without stating this, so we state it.
    An exponential is never zero; sin⁡x=0\sin x = 0 exactly at integer multiples of π\pi⁠. Basics: trigonometric identities
  5. Divide and simplify

    For x≠nπx \ne n\pi⁠:

    dudv=2sin⁡xcos⁡x−sin⁡x ecos⁡x=−2cos⁡xecos⁡x=−2cos⁡x e−cos⁡x.\begin{aligned} \frac{du}{dv} &= \frac{2\sin x\cos x}{-\sin x\,e^{\cos x}} \\ &= -\frac{2\cos x}{e^{\cos x}} = -2\cos x\,e^{-\cos x}. \end{aligned}
    The common factor sin⁡x\sin x cancels because it is not zero (Step 4). The minus sign comes from dvdx\frac{dv}{dx}⁠. Dividing by ecos⁡xe^{\cos x} is the same as multiplying by e−cos⁡xe^{-\cos x}⁠.
    1ew=e−w\frac{1}{e^w} = e^{-w} (laws of exponents). Basics: exponentials and logarithms
  6. Check by writing uu in terms of vv

    Since v=ecos⁡xv = e^{\cos x}⁠, we have cos⁡x=log⁡v\cos x = \log v⁠, and sin⁡2x=1−cos⁡2x\sin^2 x = 1 - \cos^2 x⁠. So

    u=1−(log⁡v)2,1e≤v≤e.u = 1 - (\log v)^2, \qquad \tfrac1e \le v \le e.

    Differentiating with respect to vv by the chain rule:

    dudv=−2log⁡v⋅1v=−2cos⁡xecos⁡x,\frac{du}{dv} = -2\log v\cdot\frac1v = -\frac{2\cos x}{e^{\cos x}},

    the same answer. This route also shows why x=nπx = n\pi is excluded: there cos⁡x=±1\cos x = \pm1⁠, so v=ev = e or 1e\frac1e⁠, an end of the interval of possible vv-values, where only a one-sided rate exists.

    Here the parameter can be removed completely, and the direct derivative agrees with Step 5. Agreement of two independent routes is the best check that no sign was lost.
    log⁡(ew)=w\log(e^w) = w⁠; sin⁡2x+cos⁡2x=1\sin^2 x + \cos^2 x = 1⁠; (log⁡v)′=1v(\log v)' = \frac1v (Theorem 5). Basics: exponentials and logarithms
Result

For x≠nπx \ne n\pi (n∈Zn \in \Z⁠),

d(sin⁡2x)d(ecos⁡x)=−2cos⁡xecos⁡x.\frac{d(\sin^2 x)}{d(e^{\cos x})} = -\frac{2\cos x}{e^{\cos x}}.

(This agrees with the textbook's worked answer.)

Check it with numbers

Take x=1x = 1⁠. Then dudx=2sin⁡1cos⁡1≈0.9092974\frac{du}{dx} = 2\sin 1\cos 1 \approx 0.9092974 and dvdx=−sin⁡1 ecos⁡1≈−1.4444066\frac{dv}{dx} = -\sin 1\,e^{\cos 1} \approx -1.4444066⁠, whose ratio is about −0.6295301-0.6295301⁠. The final formula gives −2×0.54030231.7165257≈−0.6295301-\frac{2 \times 0.5403023}{1.7165257} \approx -0.6295301⁠. The two agree, and so does −2log⁡vv-\frac{2\log v}{v} at v=ecos⁡1≈1.7165257v = e^{\cos 1} \approx 1.7165257⁠.

Common mistakes
  1. Multiplying instead of dividing. dudv\frac{du}{dv} is dudx\frac{du}{dx} divided by dvdx\frac{dv}{dx}⁠, not their product.
  2. Dividing the wrong way round. "Differentiate uu with respect to vv" puts vv's derivative in the denominator.
  3. Losing the minus sign of (cos⁡x)′=−sin⁡x(\cos x)' = -\sin x⁠.
  4. Cancelling sin⁡x\sin x silently. It is only allowed for x≠nπx \ne n\pi⁠.
What to take away
  1. To differentiate one function of xx with respect to another, divide their xx-derivatives: dudv=u′(x)v′(x)\frac{du}{dv} = \frac{u'(x)}{v'(x)}⁠, where v′(x)≠0v'(x) \ne 0⁠.
  2. This is parametric differentiation with xx as the parameter.

Every fact used, and where it comes from

FactUsed inSource
dudv=du/dxdv/dx\frac{du}{dv} = \frac{du/dx}{dv/dx} where dvdx≠0\frac{dv}{dx} \ne 0Steps 1, 5Section 5.6 (Lesson: parametric differentiation)
Chain rule; power ruleSteps 2, 3, 6Theorem 4, Section 5.3.1; Table 5.3
(sin⁡x)′=cos⁡x(\sin x)' = \cos x⁠, (cos⁡x)′=−sin⁡x(\cos x)' = -\sin xSteps 2, 3Table 5.3, Section 5.3
(ew)′=ew(e^w)' = e^w⁠, ew>0e^w > 0⁠; (log⁡v)′=1v(\log v)' = \frac1vSteps 3, 4, 6Theorem 5, Section 5.4; Example 26 (iv)
sin⁡2x+cos⁡2x=1\sin^2 x + \cos^2 x = 1Step 6Trigonometric identity (Class XI)
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 →