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

Exercise 5.7 · Q7: Second derivative of e6xcos⁡3xe^{6x}\cos 3x

Exercise 5.7Second order derivative · Section 5.7
The question

Find the second order derivatives of the functions given in Exercises 1 to 10.

7. e6xcos⁡3xe^{6x}\cos 3x

Exam answer

Let y=e6xcos⁡3xy = e^{6x}\cos 3x⁠. By the product rule,

dydx=6e6xcos⁡3x−3e6xsin⁡3x=3e6x(2cos⁡3x−sin⁡3x),d2ydx2=18e6x(2cos⁡3x−sin⁡3x)+3e6x(−6sin⁡3x−3cos⁡3x)=e6x(27cos⁡3x−36sin⁡3x)\begin{aligned} \frac{dy}{dx} &= 6e^{6x}\cos 3x - 3e^{6x}\sin 3x \\ &= 3e^{6x}(2\cos 3x - \sin 3x), \\ \frac{d^2y}{dx^2} &= 18e^{6x}(2\cos 3x - \sin 3x) \\ &\quad + 3e^{6x}(-6\sin 3x - 3\cos 3x) \\ &= e^{6x}(27\cos 3x - 36\sin 3x) \end{aligned}

∴ d2ydx2=9e6x(3cos⁡3x−4sin⁡3x)\therefore\ \dfrac{d^2y}{dx^2} = 9e^{6x}(3\cos 3x - 4\sin 3x)

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

The one idea this problem is built on

This is a product of an exponential and a cosine, each with an "inside" function (6x6x and 3x3x⁠). The product rule splits the work, the chain rule supplies the factors 6 and 3, and e6xe^{6x} appears in every term, so it can be kept outside a bracket throughout.

Given, to find, and the plan
Given
y=e6xcos⁡3xy = e^{6x}\cos 3x⁠, defined and differentiable for every real xx⁠.
To find
d2ydx2\dfrac{d^2y}{dx^2}⁠.
Plan
(1) State the domain. (2) Chain rule for e6xe^{6x}⁠, cos⁡3x\cos 3x⁠, sin⁡3x\sin 3x⁠. (3) Product rule for dydx\frac{dy}{dx}⁠. (4) Product rule again for d2ydx2\frac{d^2y}{dx^2}⁠. (5) Collect terms and factor.

Basics you need

1Derivative of exe^x

ddxex=ex\frac{d}{dx}e^x = e^x (Theorem 5(1), Section 5.4). Basics: exponentials and logarithms

2Chain rule (Theorem 4)

For y=f(g(x))y = f(g(x))⁠: dydx=f′(g(x))⋅g′(x)\frac{dy}{dx} = f'(g(x))\cdot g'(x)⁠. Lesson: chain rule

3Product rule (Leibnitz rule)

(uv)′=u′v+uv′(uv)' = u'v + uv' (Section 5.3, rule (2)). Basics: derivative rules

4Derivatives of sin⁡\sin and cos⁡\cos

ddxsin⁡x=cos⁡x\frac{d}{dx}\sin x = \cos x⁠, ddxcos⁡x=−sin⁡x\frac{d}{dx}\cos x = -\sin x (Table 5.3). Basics: trigonometric identities

Solution

  1. Name the function and its domain

    Let y=e6xcos⁡3xy = e^{6x}\cos 3x⁠. Both factors are defined and differentiable for every real xx⁠, so the answer holds for all x∈Rx \in \mathbf{R}⁠.

    Exponentials and cosines are defined everywhere; there is nothing to exclude.
  2. Chain rule for the three building blocks

    Inner functions 6x6x (derivative 6) and 3x3x (derivative 3); outer functions e( )e^{(\ )}⁠, cos⁡\cos⁠, sin⁡\sin⁠:

    ddxe6x=e6x⋅6=6e6x,ddxcos⁡3x=−sin⁡3x⋅3=−3sin⁡3x,ddxsin⁡3x=cos⁡3x⋅3=3cos⁡3x.\begin{aligned} \frac{d}{dx}e^{6x} &= e^{6x}\cdot 6 = 6e^{6x}, \\ \frac{d}{dx}\cos 3x &= -\sin 3x\cdot 3 = -3\sin 3x, \\ \frac{d}{dx}\sin 3x &= \cos 3x\cdot 3 = 3\cos 3x. \end{aligned}
    All three are needed below (sin⁡3x\sin 3x appears once we differentiate cos⁡3x\cos 3x⁠). Doing them once, with the inner and outer functions named, avoids losing a factor later.
    Chain rule (Theorem 4, Section 5.3.1), as in Example 26(i) for e−xe^{-x}⁠. Lesson: chain rule
  3. First derivative: product rule

    Take u=e6xu = e^{6x} (u′=6e6xu' = 6e^{6x}⁠) and v=cos⁡3xv = \cos 3x (v′=−3sin⁡3xv' = -3\sin 3x⁠):

    dydx=6e6xcos⁡3x+e6x(−3sin⁡3x)=6e6xcos⁡3x−3e6xsin⁡3x=3e6x(2cos⁡3x−sin⁡3x).\begin{aligned} \frac{dy}{dx} &= 6e^{6x}\cos 3x + e^{6x}(-3\sin 3x) \\ &= 6e^{6x}\cos 3x - 3e^{6x}\sin 3x \\ &= 3e^{6x}(2\cos 3x - \sin 3x). \end{aligned}
    yy is a product, so the product rule applies, using the chain-rule derivatives of Step 2. The common factor 3e6x3e^{6x} is taken out so that the next round deals with a simpler bracket.
    Product rule (Section 5.3, rule (2)).
  4. Second derivative: product rule again

    Now dydx=u v\frac{dy}{dx} = u\,v with u=3e6xu = 3e^{6x} and v=2cos⁡3x−sin⁡3xv = 2\cos 3x - \sin 3x⁠. Then u′=3⋅6e6x=18e6xu' = 3\cdot 6e^{6x} = 18e^{6x}⁠, and by the difference rule and Step 2,

    v′=2(−3sin⁡3x)−3cos⁡3x=−6sin⁡3x−3cos⁡3x.\begin{aligned} v' &= 2(-3\sin 3x) - 3\cos 3x \\ &= -6\sin 3x - 3\cos 3x. \end{aligned}

    So

    d2ydx2=u′v+uv′=18e6x(2cos⁡3x−sin⁡3x)+3e6x(−6sin⁡3x−3cos⁡3x).\begin{aligned} \frac{d^2y}{dx^2} &= u'v + uv' \\ &= 18e^{6x}(2\cos 3x - \sin 3x) \\ &\quad + 3e^{6x}(-6\sin 3x - 3\cos 3x). \end{aligned}
    The second derivative is the derivative of the first derivative from Step 3, which is a product of 3e6x3e^{6x} and a bracket, so the product rule is used once more. The constant 3 stays in front of e6xe^{6x} when differentiating.
    Section 5.7: d2ydx2=ddx(dydx)\frac{d^2y}{dx^2} = \frac{d}{dx}\left(\frac{dy}{dx}\right)⁠. Lesson: second order derivative
  5. Collect like terms and factor

    Expand inside e6x( ⋯ )e^{6x}(\ \cdots)⁠: cos⁡3x\cos 3x terms 36−9=2736 - 9 = 27⁠; sin⁡3x\sin 3x terms −18−18=−36-18 - 18 = -36⁠. So

    d2ydx2=e6x(27cos⁡3x−36sin⁡3x)=9e6x(3cos⁡3x−4sin⁡3x).\begin{aligned} \frac{d^2y}{dx^2} &= e^{6x}(27\cos 3x - 36\sin 3x) \\ &= 9e^{6x}(3\cos 3x - 4\sin 3x). \end{aligned}

    So d2ydx2=9e6x(3cos⁡3x−4sin⁡3x)\dfrac{d^2y}{dx^2} = 9e^{6x}(3\cos 3x - 4\sin 3x) for every real xx⁠.

    18×2=3618 \times 2 = 36⁠, 18×(−1)=−1818 \times (-1) = -18⁠, 3×(−6)=−183 \times (-6) = -18⁠, 3×(−3)=−93 \times (-3) = -9⁠. The common factor 9 of 27 and 36 gives the textbook's form exactly.
    27cos⁡3x−36sin⁡3x=9(3cos⁡3x−4sin⁡3x)27\cos 3x - 36\sin 3x = 9(3\cos 3x - 4\sin 3x)⁠.
Result

For y=e6xcos⁡3xy = e^{6x}\cos 3x (all real xx⁠):

dydx=3e6x(2cos⁡3x−sin⁡3x),d2ydx2=9e6x(3cos⁡3x−4sin⁡3x).\begin{aligned} \frac{dy}{dx} &= 3e^{6x}(2\cos 3x - \sin 3x), \\ \frac{d^2y}{dx^2} &= 9e^{6x}(3\cos 3x - 4\sin 3x). \end{aligned}

(Textbook answer: 9e6x(3cos⁡3x−4sin⁡3x)9e^{6x}(3\cos 3x - 4\sin 3x)⁠.)

Check it with numbers

At x=0x = 0⁠: y=1y = 1⁠, y′=3(2−0)=6y' = 3(2 - 0) = 6⁠, y′′=9(3−0)=27y'' = 9(3 - 0) = 27⁠. Independently, near 0, e6x≈1+6x+18x2e^{6x} \approx 1 + 6x + 18x^2 and cos⁡3x≈1−4.5x2\cos 3x \approx 1 - 4.5x^2 (second-order Taylor approximations, which this book does not cover; this is only a plausibility check), so y≈1+6x+13.5x2y \approx 1 + 6x + 13.5x^2⁠: slope 6 and second derivative 2×13.5=272 \times 13.5 = 27⁠.

At x=0.2x = 0.2⁠: formula y′′≈6.497245y'' \approx 6.497245⁠; second difference with h=0.001h = 0.001 ≈6.496812\approx 6.496812⁠. First derivative: formula ≈10.817227\approx 10.817227⁠, central difference ≈10.817159\approx 10.817159⁠. They agree to about four significant figures, and the gap shrinks like h2h^2⁠. ✓

Common mistakes
  1. ddxe6x=e6x\frac{d}{dx}e^{6x} = e^{6x}⁠: the chain-rule factor 6 is missing.
  2. Sign of ddxcos⁡3x\frac{d}{dx}\cos 3x⁠: it is −3sin⁡3x-3\sin 3x⁠.
  3. Forgetting the constant 3 in u=3e6xu = 3e^{6x} after factoring the first derivative: then u′=18e6xu' = 18e^{6x}⁠, not 6e6x6e^{6x}⁠.
What to take away
  1. For products like eaxcos⁡bxe^{ax}\cos bx⁠, keep eaxe^{ax} factored out; each round just changes the bracket.
  2. Name the inner function every time you use the chain rule.

Every fact used, and where it comes from

FactUsed inSource
ddxex=ex\frac{d}{dx}e^x = e^xStep 2Theorem 5(1), Section 5.4 (Lesson: exponential and logarithmic functions)
Chain ruleStep 2Theorem 4, Section 5.3.1 (Lesson: chain rule)
(uv)′=u′v+uv′(uv)' = u'v + uv'⁠; (u−v)′=u′−v′(u - v)' = u' - v'Steps 3, 4Section 5.3, rules (1), (2)
ddxsin⁡x=cos⁡x\frac{d}{dx}\sin x = \cos x⁠, ddxcos⁡x=−sin⁡x\frac{d}{dx}\cos x = -\sin xStep 2Table 5.3 (Basics: derivative rules)
d2ydx2=ddx(dydx)\frac{d^2y}{dx^2} = \frac{d}{dx}\left(\frac{dy}{dx}\right)Step 4Section 5.7 (Lesson: second order derivative)
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 →