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

Exercise 5.2 · Q1: Differentiate sin⁡(x2+5)\sin(x^2+5)

Exercise 5.2Chain rule · Section 5.3.1
The question

Differentiate the function with respect to xx⁠:

sin⁡(x2+5)\sin\left(x^2 + 5\right)
Exam answer

Let y=sin⁡(x2+5)y = \sin(x^2 + 5)⁠. Put t=x2+5t = x^2 + 5⁠, so y=sin⁡ty = \sin t⁠.

dydt=cos⁡t,dtdx=2x\frac{dy}{dt} = \cos t, \qquad \frac{dt}{dx} = 2x

By the chain rule,

dydx=dydt⋅dtdx=cos⁡t⋅2x\begin{aligned} \frac{dy}{dx} &= \frac{dy}{dt}\cdot\frac{dt}{dx} \\ &= \cos t\cdot 2x \end{aligned}

∴ dydx=2xcos⁡(x2+5)\therefore\ \dfrac{dy}{dx} = 2x\cos(x^2 + 5)⁠.

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

The one idea this problem is built on

This is not "sine of xx": it is sine of something that itself changes with xx, namely x2+5x^2+5⁠. Such a function is a composite, and the chain rule says its rate of change is the product of two rates: how fast the sine changes with its input, times how fast that input x2+5x^2+5 changes with xx⁠.

Given, to find, and the plan
Given
y=sin⁡(x2+5)y = \sin(x^2+5)⁠, defined for every real xx⁠.
To find
dydx\dfrac{dy}{dx}⁠.
Plan
Name the inner function t=x2+5t = x^2+5 and the outer function y=sin⁡ty = \sin t⁠. Differentiate each one separately, multiply the two derivatives (chain rule), then write the answer in terms of xx only.

Basics you need

1Composite functions

A composite applies one function to the output of another. In sin⁡(x2+5)\sin(x^2+5) we first compute x2+5x^2+5 (the inner function) and then take its sine (the outer function). Basics: composite functions

2The chain rule

If yy depends on tt and tt depends on xx⁠, then dydx=dydt⋅dtdx\dfrac{dy}{dx} = \dfrac{dy}{dt}\cdot\dfrac{dt}{dx}⁠, provided both derivatives on the right exist (Theorem 4, Section 5.3.1). Lesson: the chain rule

3Standard derivatives

ddt(sin⁡t)=cos⁡t\frac{d}{dt}(\sin t) = \cos t⁠, ddx(xn)=nxn−1\frac{d}{dx}(x^n) = nx^{n-1}⁠, the derivative of a constant is 00⁠, and the derivative of a sum is the sum of the derivatives (Table 5.3 and rule (1) in Section 5.3). Basics: derivative rules

Solution

  1. Name the inner and the outer function

    Let y=sin⁡(x2+5)y = \sin(x^2+5) and put

    t=x2+5(inner),y=sin⁡t(outer).\begin{aligned} t &= x^2 + 5 &&(\text{inner}), \\ y &= \sin t &&(\text{outer}). \end{aligned}

    Substituting the first into the second gives back y=sin⁡(x2+5)y = \sin(x^2+5)⁠, so this split describes our function exactly.

    x t = x² + 5 y = sin t square, add 5 dt/dx = 2x take sine dy/dt = cos t overall rate dy/dx = product of the link rates
    The function as a chain of two machines. A small change in xx is multiplied by 2x2x on its way to tt⁠, and that change in tt is multiplied by cos⁡t\cos t on its way to yy⁠.
    Table 5.3 tells us how to differentiate sin⁡t\sin t⁠, but only when the input is the variable we are differentiating with respect to. Here the input of sine is x2+5x^2+5⁠, not xx⁠. Giving the input its own name tt turns one unfamiliar derivative into two familiar ones.
    To find the inner function, ask: "what would I compute first on a calculator?" For sin⁡(x2+5)\sin(x^2+5) you would compute x2+5x^2+5 first and press sin last, so x2+5x^2+5 is inner and sine is outer. Basics: composite functions
  2. Differentiate the outer function with respect to tt

    dydt=ddt(sin⁡t)=cos⁡t.\frac{dy}{dt} = \frac{d}{dt}(\sin t) = \cos t.
    Inside this link of the chain, tt is the variable and sine is applied directly to it, so the standard result applies with no adjustment. This derivative exists for every real tt⁠.
    ddt(sin⁡t)=cos⁡t\frac{d}{dt}(\sin t) = \cos t is in Table 5.3 (Section 5.3), with the letter tt in place of xx⁠. The name of the variable does not matter. Basics: derivative rules
  3. Differentiate the inner function with respect to xx

    dtdx=ddx(x2)+ddx(5)=2x+0=2x.\frac{dt}{dx} = \frac{d}{dx}\left(x^2\right) + \frac{d}{dx}(5) = 2x + 0 = 2x.
    The sum rule lets us differentiate x2x^2 and 55 separately. The power rule with n=2n=2 gives 2x1=2x2x^{1} = 2x⁠. The constant 5 does not change when xx changes, so its rate of change is 00⁠. This derivative also exists for every real xx⁠.
    Power rule: ddx(xn)=nxn−1\frac{d}{dx}(x^n) = nx^{n-1}⁠. Sum rule: (u+v)′=u′+v′(u+v)' = u' + v'⁠. Constant: ddx(c)=0\frac{d}{dx}(c) = 0⁠. All three are in Section 5.3 (rule (1) and Table 5.3). Basics: derivative rules
  4. Multiply the two rates (chain rule) and return to xx

    Both derivatives exist for every real number, so the chain rule applies everywhere:

    dydx=dydt⋅dtdx=cos⁡t⋅2x=2xcos⁡(x2+5).\begin{aligned} \frac{dy}{dx} &= \frac{dy}{dt}\cdot\frac{dt}{dx} \\ &= \cos t \cdot 2x \\ &= 2x\cos\left(x^2+5\right). \end{aligned}

    In the last line we replaced tt by x2+5x^2+5⁠, because the answer should be expressed in terms of xx only.

    The chain rule multiplies the rates along the chain: a small change Δx\Delta x produces a change in tt of about 2x Δx2x\,\Delta x⁠, and that produces a change in yy of about cos⁡t⋅2x Δx\cos t \cdot 2x\,\Delta x⁠. Dividing by Δx\Delta x gives the product. We write 2x2x in front so that nobody misreads the answer as cos⁡(2x⋅…)\cos(2x\cdot\ldots)⁠.
    Theorem 4 (Chain Rule), Section 5.3.1: if f=v∘uf = v\circ u⁠, t=u(x)t = u(x)⁠, and both dtdx\frac{dt}{dx} and dvdt\frac{dv}{dt} exist, then dfdx=dvdt⋅dtdx\frac{df}{dx} = \frac{dv}{dt}\cdot\frac{dt}{dx}⁠. The textbook's Example 21 (sin⁡x2\sin x^2⁠) is the same pattern. Lesson: the chain rule · Example 21
Result

For every real xx⁠,

ddxsin⁡(x2+5)=2xcos⁡(x2+5).\frac{d}{dx}\sin\left(x^2+5\right) = 2x\cos\left(x^2+5\right).

(Textbook answer: 2xcos⁡(x2+5)2x\cos(x^2+5)⁠.)

Check it with numbers

Take x=1x = 1⁠. The formula gives 2cos⁡62\cos 6⁠, and cos⁡6≈0.9601703\cos 6 \approx 0.9601703 (radians), so the slope is about 1.92034061.9203406⁠. Directly from the function, with h=0.0001h = 0.0001⁠:

sin⁡(6.00020001)−sin⁡(5.99980001)0.0002≈1.92034.\begin{aligned} &\frac{\sin(6.00020001) - \sin(5.99980001)}{0.0002} \\ &\qquad\approx 1.92034. \end{aligned}

The two agree. (The inputs are (1.0001)2+5(1.0001)^2 + 5 and (0.9999)2+5(0.9999)^2+5⁠.)

Common mistakes
  1. Forgetting the inner derivative. Writing cos⁡(x2+5)\cos(x^2+5) alone treats the input as if it were xx⁠. The factor 2x2x is the whole point of the chain rule.
  2. Changing the inside. The cosine keeps the same input x2+5x^2+5⁠. Answers such as cos⁡(2x)\cos(2x) or 2xcos⁡(2x)2x\cos(2x) differentiate the inside and then put the result back in the wrong place.
  3. Keeping the constant. ddx(x2+5)\frac{d}{dx}(x^2+5) is 2x2x⁠, not 2x+52x+5⁠: a constant has derivative 00⁠.
What to take away
  1. For sin⁡(something)\sin(\text{something})⁠: the derivative is cos⁡(same something)\cos(\text{same something}) times the derivative of the something.
  2. Always name the inner function before differentiating. It makes the chain rule mechanical and the mistakes visible.
  3. The same pattern gives ddxsin⁡(u(x))=u′(x)cos⁡(u(x))\frac{d}{dx}\sin(u(x)) = u'(x)\cos(u(x)) for any differentiable inner function uu⁠.

Every fact used, and where it comes from

FactUsed inSource
ddt(sin⁡t)=cos⁡t\frac{d}{dt}(\sin t) = \cos tStep 2Table 5.3, Section 5.3
(u+v)′=u′+v′(u+v)' = u'+v'⁠; (xn)′=nxn−1(x^n)' = nx^{n-1}⁠; constant has derivative 0Step 3Rule (1) and Table 5.3, Section 5.3
Chain rule dydx=dydt⋅dtdx\frac{dy}{dx} = \frac{dy}{dt}\cdot\frac{dt}{dx}Step 4Theorem 4, Section 5.3.1 (Lesson: the chain rule)
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 →