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

Exercise 7.6 · Q21: ∫e2xsin⁡x dx\int e^{2x}\sin x\,dx

Exercise 7.6Integration by parts · Section 7.6
The question

Integrate the functions in Exercises 1 to 22.

21.

e2xsin⁡xe^{2x}\sin x
Exam answer

Let I=∫e2xsin⁡x dxI = \displaystyle\int e^{2x}\sin x\,dx⁠.

Taking e2xe^{2x} as the first function, by parts:

I=e2x(−cos⁡x)−∫2e2x(−cos⁡x) dx=−e2xcos⁡x+2∫e2xcos⁡x dx…(i)\begin{aligned} I &= e^{2x}(-\cos x) \\ &\quad - \int 2e^{2x}(-\cos x)\,dx \\ &= -e^{2x}\cos x \\ &\quad + 2\int e^{2x}\cos x\,dx\quad\ldots(\text{i}) \end{aligned}

Again by parts, with e2xe^{2x} as the first function:

∫e2xcos⁡x dx=e2xsin⁡x−∫2e2xsin⁡x dx=e2xsin⁡x−2I…(ii)\begin{aligned} &\int e^{2x}\cos x\,dx \\ &= e^{2x}\sin x - \int 2e^{2x}\sin x\,dx \\ &= e^{2x}\sin x - 2I\quad\ldots(\text{ii}) \end{aligned}

Using (ii) in (i):

I=−e2xcos⁡x+2e2xsin⁡x−4I⇒ 5I=e2x(2sin⁡x−cos⁡x)\begin{aligned} I &= -e^{2x}\cos x \\ &\quad + 2e^{2x}\sin x - 4I \\ \Rightarrow\ 5I &= e^{2x}(2\sin x - \cos x) \end{aligned}

∴ I=e2x5(2sin⁡x−cos⁡x)\therefore\ I = \dfrac{e^{2x}}{5}(2\sin x - \cos x) +C+ C⁠.

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

The one idea this problem is built on

As in Example 21, neither factor disappears when differentiated or integrated: e2xe^{2x} only gains factors of 2, and sin⁡x\sin x cycles to cos⁡x\cos x and back. Integrating by parts twice, with the same kind of first function both times, brings the original integral II back, multiplied by a number. That gives an ordinary equation for II⁠, which we solve.

Given, to find, and the plan
Given
e2xsin⁡xe^{2x}\sin x⁠, defined and continuous for every real xx⁠.
To find
I=∫e2xsin⁡x dxI = \int e^{2x}\sin x\,dx⁠.
Plan
(1) Parts once (e2xe^{2x} first). (2) Parts on the new integral (e2xe^{2x} first again). (3) Substitute and solve for II⁠. (4) Differentiate back.

Basics you need

1Integration by parts

∫fg dx=f∫g dx−∫[f′∫g dx]dx\int f g\,dx = f\int g\,dx - \int\big[f'\int g\,dx\big]dx (Section 7.6); Example 21 used it twice on exsin⁡xe^x\sin x⁠. Lesson: integration by parts

2Derivatives and integrals used

ddxe2x=2e2x\frac{d}{dx}e^{2x} = 2e^{2x} (chain rule); ∫sin⁡x dx=−cos⁡x\int\sin x\,dx = -\cos x⁠, ∫cos⁡x dx=sin⁡x\int\cos x\,dx = \sin x (standard formulae (iii), (ii)). Basics: trigonometric identities

3Equations between indefinite integrals

They hold up to a constant, so one constant is added after solving (Section 7.2). Basics: integration undoes differentiation

Solution

  1. Integrate by parts once

    Take e2xe^{2x} as the first function and sin⁡x\sin x as the second. The derivative of the first is 2e2x2e^{2x} and the integral of the second is −cos⁡x-\cos x⁠:

    I=e2x(−cos⁡x)−∫2e2x(−cos⁡x) dx=−e2xcos⁡x+2∫e2xcos⁡x dx.\begin{aligned} I &= e^{2x}(-\cos x) - \int 2e^{2x}(-\cos x)\,dx \\ &= -e^{2x}\cos x + 2\int e^{2x}\cos x\,dx. \end{aligned}

    Write I1=∫e2xcos⁡x dxI_1 = \int e^{2x}\cos x\,dx⁠, so

    I=−e2xcos⁡x+2I1.(1)I = -e^{2x}\cos x + 2I_1. \qquad (1)
    This follows Example 21, which takes the exponential as the first function. Both factors are equally easy to integrate, so either choice works, provided the same choice is kept in the second round (Step 2). The memory aid ILATE (Inverse trigonometric, Logarithmic, Algebraic, Trigonometric, Exponential; not in the book) would take sin⁡x\sin x first, since T comes before E; the book notes after Example 21 that this choice also works. Here neither factor ever disappears, so the order changes only the bookkeeping, not the answer.
    ddxe2x=2e2x\frac{d}{dx}e^{2x} = 2e^{2x}⁠; ∫sin⁡x dx=−cos⁡x\int\sin x\,dx = -\cos x⁠. Lesson: integration by parts
  2. Integrate I1I_1 by parts, keeping e2xe^{2x} as the first function

    Now e2xe^{2x} is first and cos⁡x\cos x second; the integral of cos⁡x\cos x is sin⁡x\sin x⁠:

    I1=e2xsin⁡x−∫2e2xsin⁡x dx=e2xsin⁡x−2I.(2)\begin{aligned} I_1 &= e^{2x}\sin x - \int 2e^{2x}\sin x\,dx \\ &= e^{2x}\sin x - 2I. \qquad (2) \end{aligned}
    The original integral II has come back. If we had switched roles here (taking cos⁡x\cos x first), this round would simply undo Step 1 and give the useless identity I=II = I⁠.
    ∫cos⁡x dx=sin⁡x\int\cos x\,dx = \sin x (formula (ii)). Lesson: integration by parts
  3. Substitute and solve for II

    Put (2) into (1):

    I=−e2xcos⁡x+2(e2xsin⁡x−2I)=−e2xcos⁡x+2e2xsin⁡x−4I.\begin{aligned} I &= -e^{2x}\cos x + 2\big(e^{2x}\sin x - 2I\big) \\ &= -e^{2x}\cos x + 2e^{2x}\sin x - 4I. \end{aligned}

    Add 4I4I to both sides:

    5I=e2x(2sin⁡x−cos⁡x),5I = e^{2x}(2\sin x - \cos x), ∫e2xsin⁡x dx=e2x5(2sin⁡x−cos⁡x)+C.\int e^{2x}\sin x\,dx = \frac{e^{2x}}{5}(2\sin x - \cos x) + C.
    This is a linear equation in the unknown II⁠: collect the II terms on one side and divide by 5. The equation holds up to a constant, which is why one arbitrary constant CC is added at the end. The 5 is 1+221 + 2^2⁠: the 2 from e2xe^{2x} enters once in each round.
    Solving I=a−4II = a - 4I gives I=a5I = \frac a5⁠. Basics: integration undoes differentiation
  4. Check: differentiate the answer

    ddx[e2x5(2sin⁡x−cos⁡x)]=2e2x5(2sin⁡x−cos⁡x)+e2x5(2cos⁡x+sin⁡x)=e2x5(4sin⁡x−2cos⁡x+2cos⁡x+sin⁡x)=e2x5⋅5sin⁡x=e2xsin⁡x.\begin{aligned} &\frac{d}{dx}\left[\frac{e^{2x}}{5}(2\sin x - \cos x)\right] \\ &= \frac{2e^{2x}}{5}(2\sin x - \cos x) + \frac{e^{2x}}{5}(2\cos x + \sin x) \\ &= \frac{e^{2x}}{5}\big(4\sin x - 2\cos x + 2\cos x + \sin x\big) \\ &= \frac{e^{2x}}{5}\cdot 5\sin x = e^{2x}\sin x. \end{aligned}
    Product rule: e2xe^{2x} differentiates to 2e2x2e^{2x}⁠, and 2sin⁡x−cos⁡x2\sin x - \cos x differentiates to 2cos⁡x+sin⁡x2\cos x + \sin x⁠. The cosine terms cancel and the sine terms add to 5sin⁡x5\sin x⁠, giving the integrand for every real xx⁠.
    Product rule; chain rule for e2xe^{2x}⁠. Basics: integration undoes differentiation
Result ∫e2xsin⁡x dx=e2x5(2sin⁡x−cos⁡x)+C,\int e^{2x}\sin x\,dx = \frac{e^{2x}}{5}(2\sin x - \cos x) + C,

valid for every real xx⁠. (Textbook answer: e2x5(2sin⁡x−cos⁡x)+C\frac{e^{2x}}{5}(2\sin x - \cos x) + C⁠, the same.)

Check it with numbers

On [0,π][0, \pi]⁠, using sin⁡π=0\sin\pi = 0⁠, cos⁡π=−1\cos\pi = -1⁠:

F(π)−F(0)=e2π5(0+1)−15(0−1)=e2π+15=107.2983311050…\begin{aligned} F(\pi) - F(0) &= \frac{e^{2\pi}}{5}(0 + 1) - \frac15(0 - 1) \\ &= \frac{e^{2\pi} + 1}{5} = 107.2983311050\ldots \end{aligned}

Numerical integration of e2xsin⁡xe^{2x}\sin x over [0,π][0, \pi] gives 107.2983311050…107.2983311050\ldots⁠, the same.

Common mistakes
  1. Switching the first and second functions in the second round: you get I=II = I⁠.
  2. Forgetting the factor 2 from ddxe2x=2e2x\frac{d}{dx}e^{2x} = 2e^{2x}⁠. Without it you would get 2I=…2I = \ldots as for exsin⁡xe^x\sin x⁠, and the wrong answer.
  3. Sign slips: ∫sin⁡x dx=−cos⁡x\int\sin x\,dx = -\cos x⁠, so Step 1 gives +2∫e2xcos⁡x dx+2\int e^{2x}\cos x\,dx⁠.
  4. Dividing by 4 or 3 instead of 5 when collecting I+4II + 4I⁠.
What to take away
  1. For eaxsin⁡bxe^{ax}\sin bx and eaxcos⁡bxe^{ax}\cos bx⁠: parts twice with the same choice, then solve for II⁠.
  2. The general result is ∫eaxsin⁡bx dx=eaxa2+b2(asin⁡bx−bcos⁡bx)+C;\begin{aligned} &\int e^{ax}\sin bx\,dx \\ &= \frac{e^{ax}}{a^2+b^2}(a\sin bx - b\cos bx) + C; \end{aligned} here a=2a = 2⁠, b=1b = 1⁠, a2+b2=5a^2 + b^2 = 5⁠.

Every fact used, and where it comes from

FactUsed inSource
Integration by parts; same choice in both roundsSteps 1, 2Section 7.6; Example 21
∫sin⁡x dx=−cos⁡x+C\int\sin x\,dx = -\cos x + C⁠; ∫cos⁡x dx=sin⁡x+C\int\cos x\,dx = \sin x + CSteps 1, 2Standard formulae (iii), (ii), Section 7.2
Antiderivatives differ by a constantStep 3Section 7.2
Product rule, chain rule; derivatives of e2xe^{2x}⁠, sin⁡x\sin x⁠, cos⁡x\cos xSteps 1, 4Chapter 5, Sections 5.3 and 5.3.1
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 →