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

Exercise 5.2 · Q7: Differentiate 2cot⁡(x2)2\sqrt{\cot(x^2)}

Exercise 5.2Chain rule with three links · Section 5.3.1
The question

Differentiate the function with respect to xx⁠:

2cot⁡(x2)2\sqrt{\cot(x^2)}
Exam answer

Let y=2cot⁡(x2)y = 2\sqrt{\cot(x^2)}⁠, where cot⁡(x2)>0\cot(x^2) > 0⁠. Put t=x2t = x^2 and w=cot⁡tw = \cot t⁠, so y=2wy = 2\sqrt w⁠.

dydw=22w=1w,dwdt=−cosec⁡2t,dtdx=2x\begin{aligned} \frac{dy}{dw} &= \frac{2}{2\sqrt w} = \frac{1}{\sqrt w}, \\ \frac{dw}{dt} &= -\operatorname{cosec}^2 t, \\ \frac{dt}{dx} &= 2x \end{aligned}

By the chain rule,

dydx=dydw⋅dwdt⋅dtdx=1cot⁡t⋅(−cosec⁡2t)⋅2x\begin{aligned} \frac{dy}{dx} &= \frac{dy}{dw}\cdot\frac{dw}{dt}\cdot\frac{dt}{dx} \\ &= \frac{1}{\sqrt{\cot t}}\cdot(-\operatorname{cosec}^2 t)\cdot 2x \end{aligned}

∴ dydx=−2xcosec⁡2(x2)cot⁡(x2)\therefore\ \dfrac{dy}{dx} = -\dfrac{2x\operatorname{cosec}^2(x^2)}{\sqrt{\cot(x^2)}} (where cot⁡(x2)>0\cot(x^2) > 0⁠).

The answer key prints −22 xsin⁡x2sin⁡2x2-\frac{2\sqrt2\,x}{\sin x^2\sqrt{\sin 2x^2}}⁠. It agrees with this answer wherever sin⁡x2>0\sin x^2 > 0⁠, which includes 0<∣x∣<π/20 < |x| < \sqrt{\pi/2}⁠. Where sin⁡x2<0\sin x^2 < 0⁠, for example π<x2<3π2\pi < x^2 < \frac{3\pi}{2}⁠, the printed form has the opposite sign.

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

The one idea this problem is built on

Three operations are stacked: square xx⁠, take the cotangent, take the square root (then double). The chain rule multiplies the rates of the three links. The only new ingredient is the derivative of cot⁡\cot⁠, which we derive from the quotient rule. Converting the answer to the textbook's form needs care with a square root of a square, and shows that the printed form is correct only where sin⁡x2>0\sin x^2 > 0⁠.

Given, to find, and the plan
Given
y=2cot⁡(x2)y = 2\sqrt{\cot(x^2)}⁠.
To find
dydx\dfrac{dy}{dx}⁠, and where the formula is valid.
Plan
Find where yy is defined and differentiable. Put t=x2t = x^2⁠, w=cot⁡tw = \cot t⁠, y=2wy = 2\sqrt w⁠. Find the three rates, multiply, substitute back. Then rewrite the result in the textbook's form and check when the two forms agree.

Basics you need

1Chain rule for three functions

dydx=dydw⋅dwdt⋅dtdx\dfrac{dy}{dx} = \dfrac{dy}{dw}\cdot\dfrac{dw}{dt}\cdot\dfrac{dt}{dx}⁠, each rate evaluated at the value entering its link (Section 5.3.1). Lesson: the chain rule

2Derivative of a square root

ddww=12w\frac{d}{dw}\sqrt w = \frac{1}{2\sqrt w}⁠, valid only for w>0w > 0 (power rule with n=12n = \frac12⁠). Basics: derivative rules

3Quotient rule

(pq)′=p′q−pq′q2\left(\dfrac{p}{q}\right)' = \dfrac{p'q - pq'}{q^2} where q≠0q \ne 0 (rule (3), Section 5.3). Used to find (cot⁡t)′(\cot t)'⁠. Basics: derivative rules

4Trigonometric facts

cot⁡t=cos⁡tsin⁡t\cot t = \frac{\cos t}{\sin t}⁠, cosec⁡t=1sin⁡t\operatorname{cosec} t = \frac{1}{\sin t}⁠, sin⁡2t+cos⁡2t=1\sin^2 t + \cos^2 t = 1⁠, sin⁡2t=2sin⁡tcos⁡t\sin 2t = 2\sin t\cos t⁠. Also s2=∣s∣\sqrt{s^2} = |s|⁠, not ss⁠. Basics: trigonometric identities

Solution

  1. Where is the function defined and differentiable?

    • cot⁡(x2)\cot(x^2) needs sin⁡(x2)≠0\sin(x^2) \ne 0⁠, so x2x^2 is not a multiple of π\pi⁠; in particular x≠0x \ne 0⁠.
    • The square root needs cot⁡(x2)≥0\cot(x^2) \ge 0⁠, and its derivative 12w\frac{1}{2\sqrt w} needs cot⁡(x2)>0\cot(x^2) > 0⁠.

    Since x2≥0x^2 \ge 0⁠, the condition cot⁡(x2)>0\cot(x^2) > 0 means

    nπ<x2<nπ+π2for some n=0,1,2,…\begin{gathered} n\pi < x^2 < n\pi + \tfrac{\pi}{2} \\ \text{for some } n = 0, 1, 2, \ldots \end{gathered}

    The first such piece is 0<x2<π20 < x^2 < \frac{\pi}{2}⁠, that is 0<∣x∣<1.2533…0 < |x| < 1.2533\ldots⁠. We work at points of this kind.

    Cotangent is positive exactly when sine and cosine have the same sign: in the first quarter-turn (0,π2)(0, \frac{\pi}{2}) and in (π,3π2)(\pi, \frac{3\pi}{2})⁠, and every π\pi after that. Where cot⁡(x2)=0\cot(x^2) = 0 the function is still defined, but the square-root link has no derivative there (its graph meets the axis vertically), so the chain rule cannot be applied.
    Signs of sin⁡\sin and cos⁡\cos in the four quadrants (Class XI). Basics: trigonometric identities
  2. Name the three links

    t=x2,w=cot⁡t,y=2w.t = x^2, \qquad w = \cot t, \qquad y = 2\sqrt{w}.
    On a calculator you would square xx first, then take the cotangent, then the square root, then double. The innermost operation is the first link. The constant factor 22 simply stays in front.
    Composite of three functions. Basics: composite functions
  3. Derive ddt(cot⁡t)\frac{d}{dt}(\cot t) with the quotient rule

    Write cot⁡t=cos⁡tsin⁡t\cot t = \dfrac{\cos t}{\sin t}⁠: numerator p=cos⁡tp = \cos t⁠, p′=−sin⁡tp' = -\sin t⁠; denominator q=sin⁡tq = \sin t⁠, q′=cos⁡tq' = \cos t⁠. Where sin⁡t≠0\sin t \ne 0⁠:

    ddt(cot⁡t)=(−sin⁡t)sin⁡t−cos⁡tcos⁡tsin⁡2t=−sin⁡2t+cos⁡2tsin⁡2t=−1sin⁡2t=−cosec⁡2t.\begin{aligned} \frac{d}{dt}(\cot t) &= \frac{(-\sin t)\sin t - \cos t\cos t}{\sin^2 t} \\ &= -\frac{\sin^2 t + \cos^2 t}{\sin^2 t} \\ &= -\frac{1}{\sin^2 t} = -\operatorname{cosec}^2 t. \end{aligned}
    Table 5.3 gives only sin⁡\sin⁠, cos⁡\cos⁠, tan⁡\tan and xnx^n⁠. Writing cotangent as a quotient of sine and cosine lets the quotient rule produce its derivative, and the identity sin⁡2t+cos⁡2t=1\sin^2 t + \cos^2 t = 1 collapses the numerator to 11⁠.
    Quotient rule (3), Section 5.3; (sin⁡t)′=cos⁡t(\sin t)' = \cos t⁠, (cos⁡t)′=−sin⁡t(\cos t)' = -\sin t from Table 5.3. Basics: derivative rules
  4. The other two link rates

    dydw=2⋅12w=1w,dtdx=2x.\begin{aligned} \frac{dy}{dw} &= 2\cdot\frac{1}{2\sqrt w} = \frac{1}{\sqrt w}, \\ \frac{dt}{dx} &= 2x. \end{aligned}
    w=w1/2\sqrt w = w^{1/2}⁠, so the power rule gives 12w−1/2=12w\frac12 w^{-1/2} = \frac{1}{2\sqrt w}⁠; the factor 22 in front of the root cancels the 12\frac12⁠. This needs w=cot⁡(x2)>0w = \cot(x^2) > 0⁠, which Step 1 arranged.
    Power rule (wn)′=nwn−1(w^n)' = nw^{n-1} with n=12n = \frac12⁠, and with n=2n = 2 for x2x^2 (Table 5.3). Basics: derivative rules
  5. Multiply the three rates and substitute back

    dydx=dydw⋅dwdt⋅dtdx=1cot⁡t⋅(−cosec⁡2t)⋅2x=−2xcosec⁡2(x2)cot⁡(x2).\begin{aligned} \frac{dy}{dx} &= \frac{dy}{dw}\cdot\frac{dw}{dt}\cdot\frac{dt}{dx} \\ &= \frac{1}{\sqrt{\cot t}}\cdot(-\operatorname{cosec}^2 t)\cdot 2x \\ &= -\frac{2x\operatorname{cosec}^2(x^2)}{\sqrt{\cot(x^2)}}. \end{aligned}
    Each rate is evaluated at the value entering its link: the root sees w=cot⁡(x2)w = \cot(x^2)⁠, the cotangent sees t=x2t = x^2⁠. This is already a complete answer, valid wherever cot⁡(x2)>0\cot(x^2) > 0⁠.
    Chain rule for three functions, Section 5.3.1. Lesson: the chain rule
  6. Rewrite in the textbook's form, carefully

    Write s=sin⁡x2s = \sin x^2 and c=cos⁡x2c = \cos x^2⁠. On our domain cs>0\frac{c}{s} > 0⁠, so ss and cc have the same sign and sc>0sc > 0⁠. Since cs=scs2\frac{c}{s} = \frac{sc}{s^2}⁠,

    cot⁡x2=scs2=sc∣s∣.\sqrt{\cot x^2} = \sqrt{\frac{sc}{s^2}} = \frac{\sqrt{sc}}{|s|}.

    Also sc=12sin⁡2x2sc = \frac12\sin 2x^2⁠, so sc=sin⁡2x22\sqrt{sc} = \dfrac{\sqrt{\sin 2x^2}}{\sqrt 2}⁠. Therefore

    cosec⁡2x2cot⁡x2=1s2⋅∣s∣sc=1∣s∣sc=2∣sin⁡x2∣sin⁡2x2,\begin{aligned} \frac{\operatorname{cosec}^2 x^2}{\sqrt{\cot x^2}} &= \frac{1}{s^2}\cdot\frac{|s|}{\sqrt{sc}} = \frac{1}{|s|\sqrt{sc}} \\ &= \frac{\sqrt 2}{|\sin x^2|\sqrt{\sin 2x^2}}, \end{aligned}

    and the derivative becomes

    dydx=−22 x∣sin⁡x2∣ sin⁡2x2.\frac{dy}{dx} = -\frac{2\sqrt2\,x}{|\sin x^2|\,\sqrt{\sin 2x^2}}.

    Where sin⁡x2>0\sin x^2 > 0 (for instance on the first piece 0<x2<π20 < x^2 < \frac{\pi}{2}⁠) we have ∣sin⁡x2∣=sin⁡x2|\sin x^2| = \sin x^2⁠, and this is exactly the textbook's answer −22 xsin⁡x2sin⁡2x2-\dfrac{2\sqrt2\,x}{\sin x^2\sqrt{\sin 2x^2}}⁠.

    The step that needs care is s2=∣s∣\sqrt{s^2} = |s|⁠. If we wrote s2=s\sqrt{s^2} = s we would get the textbook's form everywhere, but on the pieces nπ<x2<nπ+π2n\pi < x^2 < n\pi + \frac{\pi}{2} with nn odd (such as π<x2<3π2\pi < x^2 < \frac{3\pi}{2}⁠) the sine is negative, and the printed form then has the wrong sign. The numbers in the check below show this.
    a2=∣a∣\sqrt{a^2} = |a| for every real aa⁠; sin⁡2θ=2sin⁡θcos⁡θ\sin 2\theta = 2\sin\theta\cos\theta⁠. Basics: trigonometric identities
Result

Wherever cot⁡(x2)>0\cot(x^2) > 0⁠,

ddx 2cot⁡(x2)=−2xcosec⁡2(x2)cot⁡(x2)=−22 x∣sin⁡x2∣ sin⁡2x2.\begin{aligned} &\frac{d}{dx}\,2\sqrt{\cot(x^2)} \\ &= -\frac{2x\operatorname{cosec}^2(x^2)}{\sqrt{\cot(x^2)}} \\ &= -\frac{2\sqrt2\,x}{|\sin x^2|\,\sqrt{\sin 2x^2}}. \end{aligned}

(Textbook answer: −22 xsin⁡x2sin⁡2x2-\dfrac{2\sqrt2\,x}{\sin x^2\sqrt{\sin 2x^2}}⁠. It agrees with ours wherever sin⁡x2>0\sin x^2 > 0⁠, which includes the first piece 0<∣x∣<π/20 < |x| < \sqrt{\pi/2} of the domain. Where sin⁡x2<0\sin x^2 < 0⁠, for example π<x2<3π2\pi < x^2 < \frac{3\pi}{2}⁠, the printed form has the opposite sign; the form with ∣sin⁡x2∣|\sin x^2|⁠, or our first form, is correct there.)

Check it with numbers

At x=1x = 1 (sin⁡1>0\sin 1 > 0⁠): cot⁡1≈0.6420926\cot 1 \approx 0.6420926⁠, cot⁡1≈0.8013068\sqrt{\cot 1} \approx 0.8013068⁠, cosec⁡21≈1.4122829\operatorname{cosec}^2 1 \approx 1.4122829⁠. Our formula gives −2(1.4122829)/0.8013068-2(1.4122829)/0.8013068⁠, about −3.5249492-3.5249492⁠. The textbook's form gives −22/(sin⁡1sin⁡2)≈−3.5249492-2\sqrt2/(\sin 1\sqrt{\sin 2}) \approx -3.5249492⁠. A difference quotient with h=0.0001h = 0.0001 gives −3.524949-3.524949⁠. All three agree.

At x=π+0.3≈1.8551530x = \sqrt{\pi + 0.3} \approx 1.8551530 (so x2=π+0.3x^2 = \pi + 0.3⁠, sin⁡x2≈−0.2955202\sin x^2 \approx -0.2955202⁠, cot⁡x2≈3.2327281\cot x^2 \approx 3.2327281⁠): our formula gives −23.6292955-23.6292955⁠, the difference quotient gives −23.62932-23.62932⁠, but the textbook's form gives +23.6292955+23.6292955⁠. The function is decreasing there (as x2x^2 runs from π\pi to 3π2\frac{3\pi}{2}⁠, cot⁡x2\cot x^2 falls from very large values to 00⁠), so the derivative must be negative.

Common mistakes
  1. Getting (cot⁡t)′(\cot t)' wrong. It is −cosec⁡2t-\operatorname{cosec}^2 t⁠, with a minus sign; deriving it from cos⁡tsin⁡t\frac{\cos t}{\sin t} settles any doubt.
  2. Forgetting the innermost rate 2x2x⁠. The cotangent sees x2x^2⁠, so its rate must be multiplied by (x2)′=2x(x^2)' = 2x⁠.
  3. Writing sin⁡2x2=sin⁡x2\sqrt{\sin^2 x^2} = \sin x^2⁠. The correct value is ∣sin⁡x2∣|\sin x^2|⁠; dropping the modulus changes the sign of the answer wherever sin⁡x2<0\sin x^2 < 0⁠.
  4. Ignoring the domain. The formula needs cot⁡(x2)>0\cot(x^2) > 0⁠; at x=0x = 0 the function is not even defined.
What to take away
  1. (cot⁡t)′=−cosec⁡2t(\cot t)' = -\operatorname{cosec}^2 t⁠, and every derivative of cot⁡\cot⁠, sec⁡\sec⁠, cosec⁡\operatorname{cosec} follows from Table 5.3 with the quotient rule.
  2. When moving factors in and out of a square root, a2=∣a∣\sqrt{a^2} = |a|⁠. An answer that silently uses a2=a\sqrt{a^2} = a is only right where a>0a > 0⁠.

Every fact used, and where it comes from

FactUsed inSource
Signs of sin⁡\sin⁠, cos⁡\cos⁠, cot⁡\cot by quadrantStep 1Class XI, Trigonometric Functions
Quotient ruleStep 3Rule (3), Section 5.3
(sin⁡t)′=cos⁡t(\sin t)' = \cos t⁠, (cos⁡t)′=−sin⁡t(\cos t)' = -\sin t⁠, (xn)′=nxn−1(x^n)' = nx^{n-1}Steps 3, 4Table 5.3, Section 5.3
sin⁡2t+cos⁡2t=1\sin^2 t + \cos^2 t = 1⁠, sin⁡2t=2sin⁡tcos⁡t\sin 2t = 2\sin t\cos tSteps 3, 6Class XI, Trigonometric Functions
Chain rule for three functionsStep 5Section 5.3.1, extension after Theorem 4 (Lesson: the chain rule)
a2=∣a∣\sqrt{a^2} = |a|Step 6Definition of the square root (Class IX/X algebra)
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 →