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

Miscellaneous · Q8: Differentiate cos⁡(acos⁡x+bsin⁡x)\cos(a\cos x+b\sin x) by the chain rule

Miscellaneous ExerciseChain rule · Miscellaneous Exercise
The question

Differentiate w.r.t. xx the function

cos⁡(acos⁡x+bsin⁡x),\cos(a\cos x + b\sin x),

for some constant aa and bb⁠.

Exam answer

Let y=cos⁡(acos⁡x+bsin⁡x)y = \cos(a\cos x + b\sin x)⁠. By the chain rule,

dydx=−sin⁡(acos⁡x+bsin⁡x)×ddx(acos⁡x+bsin⁡x)=−sin⁡(acos⁡x+bsin⁡x)×(−asin⁡x+bcos⁡x)\begin{aligned} \frac{dy}{dx} &= -\sin(a\cos x + b\sin x) \\ &\quad\times\frac{d}{dx}(a\cos x + b\sin x) \\ &= -\sin(a\cos x + b\sin x) \\ &\quad\times(-a\sin x + b\cos x) \end{aligned}

∴ dydx=(asin⁡x−bcos⁡x)\therefore\ \dfrac{dy}{dx} = (a\sin x - b\cos x) ×sin⁡(acos⁡x+bsin⁡x)\times\sin(a\cos x + b\sin x)

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

The one idea this problem is built on

A function inside a function: the outer function is cos⁡\cos⁠, the inner function is u=acos⁡x+bsin⁡xu = a\cos x + b\sin x⁠. The chain rule says: differentiate the outer function and keep the inside unchanged, then multiply by the derivative of the inside. The letters aa and bb are constants, so they behave like numbers.

Given, to find, and the plan
Given
y=cos⁡(acos⁡x+bsin⁡x)y = \cos(a\cos x + b\sin x)⁠, with aa⁠, bb constants; xx any real number.
To find
dydx\dfrac{dy}{dx}⁠.
Plan
(1) Name the inner and outer functions. (2) Differentiate the inner function. (3) Apply the chain rule and tidy the signs.

Basics you need

1Chain rule

If y=f(u)y = f(u) and u=g(x)u = g(x)⁠, then dydx=dydu⋅dudx\frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx} (Theorem 4). Basics: composite functions

2Derivatives of sine and cosine

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

3Sum and constant multiple rules

(u±v)′=u′±v′(u \pm v)' = u' \pm v' (rule (1), Section 5.3) and (cu)′=cu′(cu)' = cu' for a constant cc (Class XI, Limits and Derivatives).

Solution

  1. Name the inner and outer functions

    Let u=acos⁡x+bsin⁡xu = a\cos x + b\sin x⁠. Then y=cos⁡uy = \cos u⁠.

    Naming the inside as a single letter shows the structure: yy is simply "cosine of something". That is what tells us to use the chain rule.
    A composite function f∘gf\circ g (Section 5.3.1). Basics: composite functions
  2. Differentiate the inner function

    dudx=a(−sin⁡x)+bcos⁡x=−asin⁡x+bcos⁡x.\begin{aligned} \frac{du}{dx} &= a(-\sin x) + b\cos x \\ &= -a\sin x + b\cos x. \end{aligned}
    The sum rule lets us differentiate term by term, and the constants aa⁠, bb stay as multipliers. The minus sign comes from ddxcos⁡x=−sin⁡x\frac{d}{dx}\cos x = -\sin x⁠.
    Rule (1), Section 5.3; Table 5.3. Basics: derivative rules
  3. Apply the chain rule

    dydu=−sin⁡u\frac{dy}{du} = -\sin u⁠. Multiply by dudx\frac{du}{dx} and put uu back:

    dydx=−sin⁡u⋅(−asin⁡x+bcos⁡x)=(asin⁡x−bcos⁡x)×sin⁡(acos⁡x+bsin⁡x).\begin{aligned} \frac{dy}{dx} &= -\sin u\cdot(-a\sin x + b\cos x) \\ &= (a\sin x - b\cos x) \\ &\quad\times\sin(a\cos x + b\sin x). \end{aligned}
    The two minus signs combine: −(−asin⁡x+bcos⁡x)=asin⁡x−bcos⁡x-(-a\sin x + b\cos x) = a\sin x - b\cos x⁠. We write that factor first, as the key does. The argument of the sine is the unchanged inner function.
    Chain rule, Theorem 4, Section 5.3.1. Lesson: chain rule
Result

For every real xx⁠,

dydx=(asin⁡x−bcos⁡x)×sin⁡(acos⁡x+bsin⁡x).\begin{aligned} \frac{dy}{dx} = {}&(a\sin x - b\cos x) \\ &\times\sin(a\cos x + b\sin x). \end{aligned}

(Textbook answer: (asin⁡x−bcos⁡x)sin⁡(acos⁡x+bsin⁡x)(a\sin x - b\cos x)\sin(a\cos x + b\sin x)⁠, the same.)

Check it with numbers

Take a=2a = 2⁠, b=3b = 3⁠, x=0x = 0⁠. Then the inner function is 2cos⁡0+3sin⁡0=22\cos 0 + 3\sin 0 = 2⁠, so y=cos⁡2≈−0.4161468y = \cos 2 \approx -0.4161468⁠. The formula gives (0−3)sin⁡2(0 - 3)\sin 2⁠, about −3(0.9092974)=−2.7278923-3(0.9092974) = -2.7278923⁠.

Difference quotient with h=0.0001h = 0.0001⁠: y(0.0001)≈−0.41641960y(0.0001) \approx -0.41641960 and y(−0.0001)≈−0.41587402y(-0.0001) \approx -0.41587402⁠, so the quotient is about −2.7278922-2.7278922⁠. ✓

Common mistakes
  1. Stopping at −sin⁡(acos⁡x+bsin⁡x)-\sin(a\cos x + b\sin x), forgetting to multiply by the derivative of the inside.
  2. Sign slip in the inner derivative: ddx(acos⁡x)=−asin⁡x\frac{d}{dx}(a\cos x) = -a\sin x⁠, not asin⁡xa\sin x⁠.
  3. Changing the inside, e.g. writing sin⁡(−asin⁡x+bcos⁡x)\sin(-a\sin x + b\cos x)⁠. The outer derivative is evaluated at the original inner function.
What to take away
  1. Chain rule: outer derivative at the unchanged inside, times the inside's derivative.
  2. Constants written as letters are treated exactly like numbers.

Every fact used, and where it comes from

FactUsed inSource
ddxsin⁡x=cos⁡x\frac{d}{dx}\sin x = \cos x⁠, ddxcos⁡x=−sin⁡x\frac{d}{dx}\cos x = -\sin xSteps 2, 3Table 5.3, Section 5.3
Sum and constant multiple rulesStep 2Rule (1), Section 5.3 (sum); Class XI, Limits and Derivatives (constant multiple)
Chain ruleStep 3Theorem 4, Section 5.3.1 (Lesson: chain rule)
AnswerResultAnswers, Miscellaneous Exercise on Chapter 5, Q8
Numerical valuesCheckRecomputed 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 →