Class 12 Maths, Worked in Full Past papersGet updates
Chapter 7 · Integrals

Exercise 7.6 · Q16: ∫ex(sin⁡x+cos⁡x) dx\int e^x(\sin x+\cos x)\,dx

Exercise 7.6Integral of the type eˣ[f + f′] · Section 7.6.1
The question

Integrate the functions in Exercises 1 to 22.

16.

ex(sin⁡x+cos⁡x)e^x(\sin x + \cos x)
Exam answer

Let I=∫ex(sin⁡x+cos⁡x) dxI = \displaystyle\int e^x(\sin x + \cos x)\,dx⁠.

Let f(x)=sin⁡xf(x) = \sin x⁠. Then f′(x)=cos⁡xf'(x) = \cos x⁠.

I=∫ex[f(x)+f′(x)]dxI = \int e^x\left[f(x) + f'(x)\right]dx

Using ∫ex[f(x)+f′(x)]dx\displaystyle\int e^x\left[f(x) + f'(x)\right]dx =exf(x)+C= e^xf(x) + C⁠,

∴ I=exsin⁡x+C\therefore\ I = e^x\sin x + C⁠.

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

The one idea this problem is built on

The bracket is "a function plus its own derivative": cos⁡x\cos x is the derivative of sin⁡x\sin x⁠. Section 7.6.1 gives

∫ex[f(x)+f′(x)] dx=exf(x)+C,\int e^x\big[f(x) + f'(x)\big]\,dx = e^x f(x) + C,

so with f(x)=sin⁡xf(x) = \sin x the answer can be written down at once.

Given, to find, and the plan
Given
ex(sin⁡x+cos⁡x)e^x(\sin x + \cos x)⁠, defined and continuous for every real xx⁠.
To find
∫ex(sin⁡x+cos⁡x) dx\int e^x(\sin x + \cos x)\,dx⁠.
Plan
(1) Recall why the rule holds. (2) Spot f=sin⁡xf = \sin x and write the answer. (3) Cross-check by splitting into two integrals (Example 21). (4) Differentiate back.

Basics you need

1The rule ∫ex[f+f′] dx=exf+C\int e^x[f + f']\,dx = e^x f + C

Proved in Section 7.6.1 by integration by parts; it is also the product rule read backwards. Lesson: integration by parts

2Derivatives

ddxex=ex\frac{d}{dx}e^x = e^x⁠, ddxsin⁡x=cos⁡x\frac{d}{dx}\sin x = \cos x⁠, ddxcos⁡x=−sin⁡x\frac{d}{dx}\cos x = -\sin x⁠. Basics: integration undoes differentiation

Solution

  1. Why ∫ex[f+f′] dx=exf+C\int e^x[f + f']\,dx = e^x f + C

    For any differentiable ff⁠, the product rule gives

    ddx[exf(x)]=exf(x)+exf′(x)=ex[f(x)+f′(x)].\begin{aligned} \frac{d}{dx}\big[e^x f(x)\big] &= e^x f(x) + e^x f'(x) \\ &= e^x\big[f(x) + f'(x)\big]. \end{aligned}

    So exf(x)e^x f(x) is an antiderivative of ex[f(x)+f′(x)]e^x[f(x) + f'(x)]⁠.

    The book proves the same rule by integration by parts: it integrates ∫exf dx\int e^x f\,dx by parts with ff first and exe^x second, and the integral ∫exf′ dx\int e^x f'\,dx produced cancels the other half of the integrand.
    Product rule; ddxex=ex\frac{d}{dx}e^x = e^x⁠. Lesson: integration by parts
  2. Spot ff and write the answer

    Take f(x)=sin⁡xf(x) = \sin x⁠. Then f′(x)=cos⁡xf'(x) = \cos x⁠, so the integrand is exactly ex[f(x)+f′(x)]e^x[f(x) + f'(x)]⁠, and

    ∫ex(sin⁡x+cos⁡x) dx=exsin⁡x+C.\int e^x(\sin x + \cos x)\,dx = e^x\sin x + C.
    Which term is ff⁠? The one whose derivative is the other term. ddxsin⁡x=cos⁡x\frac{d}{dx}\sin x = \cos x⁠, the other term, so f=sin⁡xf = \sin x⁠. (Taking f=cos⁡xf = \cos x fails: its derivative is −sin⁡x-\sin x⁠, not +sin⁡x+\sin x⁠.)
    ddxsin⁡x=cos⁡x\frac{d}{dx}\sin x = \cos x⁠. Basics: trigonometric identities
  3. Cross-check: split into two integrals

    Example 21 found ∫exsin⁡x dx=ex2(sin⁡x−cos⁡x)+C\int e^x\sin x\,dx = \frac{e^x}{2}(\sin x - \cos x) + C⁠, and the same method gives ∫excos⁡x dx=ex2(sin⁡x+cos⁡x)+C\int e^x\cos x\,dx = \frac{e^x}{2}(\sin x + \cos x) + C⁠. Adding,

    ex2(sin⁡x−cos⁡x)+ex2(sin⁡x+cos⁡x)=ex2⋅2sin⁡x=exsin⁡x.\begin{aligned} &\frac{e^x}{2}(\sin x - \cos x) + \frac{e^x}{2}(\sin x + \cos x) \\ &= \frac{e^x}{2}\cdot 2\sin x = e^x\sin x. \end{aligned}
    The long route (two rounds of parts for each integral) gives the same answer, as it must. The shortcut of Section 7.6.1 avoids all of that work.
    Example 21 (integration by parts twice). Lesson: integration by parts
  4. Check: differentiate the answer

    ddx(exsin⁡x)=exsin⁡x+excos⁡x=ex(sin⁡x+cos⁡x),\begin{aligned} \frac{d}{dx}\big(e^x\sin x\big) &= e^x\sin x + e^x\cos x \\ &= e^x(\sin x + \cos x), \end{aligned}

    the integrand, for every real xx⁠.

    The product rule produces exactly the two terms of the bracket.
Result ∫ex(sin⁡x+cos⁡x) dx=exsin⁡x+C,\int e^x(\sin x + \cos x)\,dx = e^x\sin x + C,

valid for every real xx⁠. (Textbook answer: exsin⁡x+Ce^x\sin x + C⁠, the same.)

Check it with numbers

On [0,π2]\left[0, \frac{\pi}{2}\right]⁠:

F(π2)−F(0)=eπ/2⋅1−e0⋅0=eπ/2≈4.8104773810\begin{aligned} F\left(\tfrac{\pi}{2}\right) - F(0) &= e^{\pi/2}\cdot 1 - e^0\cdot 0 \\ &= e^{\pi/2} \approx 4.8104773810 \end{aligned}

Numerical integration of ex(sin⁡x+cos⁡x)e^x(\sin x + \cos x) over [0,π2]\left[0, \frac{\pi}{2}\right] gives 4.81047738104.8104773810 to ten decimal places, the same.

Common mistakes
  1. Choosing f=cos⁡xf = \cos x⁠. Its derivative is −sin⁡x-\sin x⁠, so the bracket would have to be cos⁡x−sin⁡x\cos x - \sin x⁠. Always differentiate your ff and compare.
  2. Integrating each part by parts twice without noticing the shortcut: correct but long, with many chances for sign errors.
What to take away
  1. Before integrating ex⋅(…)e^x\cdot(\ldots) by parts, look for f+f′f + f' inside the bracket.
  2. ∫ex(sin⁡x+cos⁡x) dx=exsin⁡x+C\int e^x(\sin x + \cos x)\,dx = e^x\sin x + C and, by the same rule, ∫ex(cos⁡x−sin⁡x) dx=excos⁡x+C\int e^x(\cos x - \sin x)\,dx = e^x\cos x + C⁠.

Every fact used, and where it comes from

FactUsed inSource
∫ex[f+f′] dx=exf+C\int e^x[f + f']\,dx = e^x f + CSteps 1, 2Section 7.6.1 (Lesson: integration by parts)
∫exsin⁡x dx=ex2(sin⁡x−cos⁡x)+C\int e^x\sin x\,dx = \frac{e^x}{2}(\sin x - \cos x) + CStep 3Example 21
Product rule; derivatives of exe^x⁠, sin⁡x\sin x⁠, cos⁡x\cos xSteps 1, 2, 4Chapter 5; standard formulae (ii), (xi), Section 7.2
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 →