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

Example 22: ∫ex[f(x)+f′(x)]dx\int e^x\big[f(x)+f'(x)\big]dx⁠: two integrals

ExamplesIntegration by parts · Section 7.6.1
The question

Find

(i) ∫ex(tan⁡−1x+11+x2)dx\displaystyle\int e^x\left(\tan^{-1}x + \frac{1}{1+x^2}\right)dx

(ii) ∫(x2+1) ex(x+1)2 dx\displaystyle\int\frac{(x^2+1)\,e^x}{(x+1)^2}\,dx

Exam answer

(i) Let I1=∫ex(tan⁡−1x+11+x2)dxI_1 = \displaystyle\int e^x\left(\tan^{-1}x + \frac{1}{1 + x^2}\right)dx⁠.

Let f(x)=tan⁡−1xf(x) = \tan^{-1}x⁠. Then f′(x)=11+x2f'(x) = \frac{1}{1 + x^2}⁠.

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

∴ I1=extan⁡−1x+C\therefore\ I_1 = e^x\tan^{-1}x + C⁠.

(ii) Let I2=∫(x2+1) ex(x+1)2 dxI_2 = \displaystyle\int\frac{(x^2 + 1)\,e^x}{(x + 1)^2}\,dx⁠.

x2+1(x+1)2=x2−1(x+1)2+2(x+1)2=x−1x+1+2(x+1)2\begin{aligned} \frac{x^2 + 1}{(x + 1)^2} &= \frac{x^2 - 1}{(x + 1)^2} + \frac{2}{(x + 1)^2} \\ &= \frac{x - 1}{x + 1} + \frac{2}{(x + 1)^2} \end{aligned}

Let f(x)=x−1x+1f(x) = \frac{x - 1}{x + 1}⁠. Then

f′(x)=(x+1)−(x−1)(x+1)2=2(x+1)2\begin{aligned} f'(x) &= \frac{(x + 1) - (x - 1)}{(x + 1)^2} \\ &= \frac{2}{(x + 1)^2} \end{aligned}

So I2=∫ex[f(x)+f′(x)]dxI_2 = \displaystyle\int e^x\big[f(x) + f'(x)\big]dx⁠.

∴ I2=x−1x+1 ex+C\therefore\ I_2 = \dfrac{x - 1}{x + 1}\,e^x + C⁠.

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

The one idea this problem is built on

By the product rule, ddx[exf(x)]=exf(x)+exf′(x)\frac{d}{dx}\big[e^x f(x)\big] = e^x f(x) + e^x f'(x)⁠. Read backwards (Section 7.6.1):

∫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 whenever an integrand is exe^x times "a function plus its own derivative", the answer can be written down at once. The work is in spotting ff⁠: in part (i) it is visible; in part (ii) the fraction must first be rewritten.

Given, to find, and the plan
Given
(i) ex(tan⁡−1x+11+x2)e^x\left(\tan^{-1}x + \frac{1}{1+x^2}\right)⁠, defined for every real xx⁠. (ii) (x2+1)ex(x+1)2\frac{(x^2+1)e^x}{(x+1)^2}⁠, defined for x≠−1x \ne -1⁠.
To find
Both indefinite integrals.
Plan
Part (i): (1) why the rule holds; (2) spot f=tan⁡−1xf = \tan^{-1}x⁠; (3) check. Part (ii): (1) rewrite the fraction as x−1x+1+2(x+1)2\frac{x-1}{x+1} + \frac{2}{(x+1)^2}⁠; (2) spot f=x−1x+1f = \frac{x-1}{x+1}⁠; (3) check.

Basics you need

1The product rule

ddx(uv)=u′v+uv′\frac{d}{dx}(uv) = u'v + uv'⁠, with ddxex=ex\frac{d}{dx}e^x = e^x⁠. Basics: integration undoes differentiation

2Integration 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⁠; the book uses it to prove the rule in Section 7.6.1. Lesson: integration by parts

3Derivative of tan⁡−1x\tan^{-1}x

ddxtan⁡−1x=11+x2\frac{d}{dx}\tan^{-1}x = \frac{1}{1+x^2} (standard formula (x)). Basics: trigonometric identities

4The quotient rule

(uv)′=u′v−uv′v2\left(\frac uv\right)' = \frac{u'v - uv'}{v^2}⁠, for v≠0v \ne 0⁠. Basics: splitting fractions

Part (i): ∫ex(tan⁡−1x+11+x2)dx\int e^x\left(\tan^{-1}x + \frac{1}{1+x^2}\right)dx

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

    Let ff be any differentiable function. By the product rule,

    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)]⁠, and

    ∫ex[f(x)+f′(x)] dx=exf(x)+C.\int e^x\big[f(x) + f'(x)\big]\,dx = e^x f(x) + C.
    The book proves the same result by integration by parts: it splits the integral as ∫exf dx+∫exf′ dx\int e^x f\,dx + \int e^x f'\,dx⁠, integrates the first by parts with ff first and exe^x second, getting fex−∫f′ex dxf e^x - \int f' e^x\,dx⁠, and the two integrals ∓∫exf′ dx\mp\int e^x f'\,dx cancel. The product rule route above is the same fact read the other way.
    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)=tan⁡−1xf(x) = \tan^{-1}x⁠. Then f′(x)=11+x2f'(x) = \frac{1}{1+x^2}⁠, so the integrand is exactly ex[f(x)+f′(x)]e^x[f(x) + f'(x)]⁠. Hence

    ∫ex(tan⁡−1x+11+x2)dx=extan⁡−1x+C.\int e^x\left(\tan^{-1}x + \frac{1}{1+x^2}\right)dx = e^x\tan^{-1}x + C.
    Of the two terms in the bracket, one must be the derivative of the other. 11+x2\frac{1}{1+x^2} is the derivative of tan⁡−1x\tan^{-1}x⁠, and not the other way round, so f=tan⁡−1xf = \tan^{-1}x⁠.
    ddxtan⁡−1x=11+x2\frac{d}{dx}\tan^{-1}x = \frac{1}{1+x^2} (formula (x)). Basics: trigonometric identities
  3. Check: differentiate the answer

    ddx(extan⁡−1x)=extan⁡−1x+ex⋅11+x2,\frac{d}{dx}\big(e^x\tan^{-1}x\big) = e^x\tan^{-1}x + e^x\cdot\frac{1}{1+x^2},

    which is ex(tan⁡−1x+11+x2)e^x\left(\tan^{-1}x + \frac{1}{1+x^2}\right)⁠, the integrand, for every real xx⁠.

    The product rule produces exactly the two terms of the bracket.

Part (ii): ∫(x2+1) ex(x+1)2 dx\int\frac{(x^2+1)\,e^x}{(x+1)^2}\,dx

  1. Rewrite the fraction as "a function plus its derivative"

    Write x2+1=(x2−1)+2x^2 + 1 = (x^2 - 1) + 2⁠. Then, for x≠−1x \ne -1⁠,

    x2+1(x+1)2=x2−1(x+1)2+2(x+1)2=(x−1)(x+1)(x+1)2+2(x+1)2=x−1x+1+2(x+1)2.\begin{aligned} \frac{x^2+1}{(x+1)^2} &= \frac{x^2-1}{(x+1)^2} + \frac{2}{(x+1)^2} \\ &= \frac{(x-1)(x+1)}{(x+1)^2} + \frac{2}{(x+1)^2} \\ &= \frac{x-1}{x+1} + \frac{2}{(x+1)^2}. \end{aligned}

    So the integral is ∫ex[x−1x+1+2(x+1)2]dx\int e^x\left[\frac{x-1}{x+1} + \frac{2}{(x+1)^2}\right]dx⁠.

    We want the bracket to be f+f′f + f'⁠. Adding and subtracting 1 makes x2−1=(x−1)(x+1)x^2 - 1 = (x-1)(x+1) appear, which cancels one factor x+1x + 1⁠. The leftover 2(x+1)2\frac{2}{(x+1)^2} has a squared bottom, which is what a derivative of a fraction with bottom x+1x + 1 looks like. Cancelling x+1x + 1 is allowed because x≠−1x \ne -1⁠.
    a2−b2=(a−b)(a+b)a^2 - b^2 = (a-b)(a+b)⁠. Basics: splitting fractions
  2. Spot ff and write the answer

    Take f(x)=x−1x+1f(x) = \frac{x-1}{x+1}⁠. By the quotient rule,

    f′(x)=1⋅(x+1)−(x−1)⋅1(x+1)2=2(x+1)2.f'(x) = \frac{1\cdot(x+1) - (x-1)\cdot 1}{(x+1)^2} = \frac{2}{(x+1)^2}.

    So the bracket is f(x)+f′(x)f(x) + f'(x)⁠, and

    ∫(x2+1) ex(x+1)2 dx=x−1x+1 ex+C.\int\frac{(x^2+1)\,e^x}{(x+1)^2}\,dx = \frac{x-1}{x+1}\,e^x + C.
    The rule of Part (i), Step 1 applies on any interval where ff is differentiable, here on (−∞,−1)(-\infty, -1) and on (−1,∞)(-1, \infty)⁠.
    Quotient rule (Chapter 5). Lesson: integration by parts
  3. Check: differentiate the answer

    ddx[x−1x+1 ex]=x−1x+1 ex+2(x+1)2 ex=ex (x−1)(x+1)+2(x+1)2=(x2+1) ex(x+1)2.\begin{aligned} \frac{d}{dx}\left[\frac{x-1}{x+1}\,e^x\right] &= \frac{x-1}{x+1}\,e^x + \frac{2}{(x+1)^2}\,e^x \\ &= e^x\,\frac{(x-1)(x+1) + 2}{(x+1)^2} \\ &= \frac{(x^2+1)\,e^x}{(x+1)^2}. \end{aligned}
    (x−1)(x+1)+2=x2−1+2=x2+1(x-1)(x+1) + 2 = x^2 - 1 + 2 = x^2 + 1⁠, so the derivative is exactly the integrand for every x≠−1x \ne -1⁠.
    Product rule and the derivative found in Part (ii), Step 2. Basics: integration undoes differentiation
Result

(i) For every real xx⁠:

∫ex(tan⁡−1x+11+x2)dx=extan⁡−1x+C.\int e^x\left(\tan^{-1}x + \frac{1}{1+x^2}\right)dx = e^x\tan^{-1}x + C.

(ii) For x≠−1x \ne -1⁠:

∫(x2+1) ex(x+1)2 dx=x−1x+1 ex+C.\int\frac{(x^2+1)\,e^x}{(x+1)^2}\,dx = \frac{x-1}{x+1}\,e^x + C.

These are the book's answers.

Check it with numbers

(i) On [0,1][0, 1]⁠:

F(1)−F(0)=etan⁡−11−0=eπ4=2.1349335556…\begin{aligned} F(1) - F(0) &= e\tan^{-1}1 - 0 \\ &= \frac{e\pi}{4} = 2.1349335556\ldots \end{aligned}

Numerical integration of the integrand over [0,1][0, 1] gives 2.1349335556…2.1349335556\ldots⁠, the same.

(ii) On [0,1][0, 1]⁠: F(1)−F(0)=0⋅e−(−1)⋅1=1F(1) - F(0) = 0\cdot e - (-1)\cdot 1 = 1⁠; numerical integration over [0,1][0, 1] gives 1.0000000000…1.0000000000\ldots⁠, the same. At x=1x = 1 the integrand is 2e4=e2=1.3591409142…\frac{2e}{4} = \frac e2 = 1.3591409142\ldots⁠, and the derivative in Part (ii), Step 3 gives 0+24e0 + \frac{2}{4}e⁠, the same.

Common mistakes
  1. Choosing ff the wrong way round. In (i), f=tan⁡−1xf = \tan^{-1}x (its derivative is the other term), not f=11+x2f = \frac{1}{1+x^2}⁠.
  2. Using the rule without checking f′f'⁠. Always differentiate your ff and compare with the other term; if they differ, the shortcut does not apply.
  3. Expanding (x+1)2(x+1)^2 in (ii). That hides the structure; split the top as (x2−1)+2(x^2 - 1) + 2 instead.
What to take away
  1. ∫ex[f(x)+f′(x)] dx=exf(x)+C\int e^x[f(x) + f'(x)]\,dx = e^x f(x) + C⁠: it is the product rule read backwards.
  2. To use it, write the integrand as exe^x times a bracket, and look for a term whose derivative is the rest.
  3. Adding and subtracting a constant on top often reveals f+f′f + f'⁠.

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 + CPart (i), Steps 1, 2; Part (ii), Step 2Section 7.6.1 (Lesson: integration by parts)
Product rule; ddxex=ex\frac{d}{dx}e^x = e^xPart (i), Steps 1, 3; Part (ii), Step 3Chapter 5
ddxtan⁡−1x=11+x2\frac{d}{dx}\tan^{-1}x = \frac{1}{1+x^2}Part (i), Step 2Standard formula (x), Section 7.2
a2−b2=(a−b)(a+b)a^2 - b^2 = (a-b)(a+b)Part (ii), Step 1Algebra
Quotient rulePart (ii), Step 2Chapter 5, Section 5.3
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 →