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

Exercise 7.2 · Q19: ∫e2x−1e2x+1 dx\int\frac{e^{2x}-1}{e^{2x}+1}\,dx

Exercise 7.2Integration by substitution · Section 7.3.1
The question

Integrate the function

e2x−1e2x+1.\frac{e^{2x} - 1}{e^{2x} + 1}.
Exam answer

Let I=∫e2x−1e2x+1 dxI = \displaystyle\int\frac{e^{2x} - 1}{e^{2x} + 1}\,dx⁠.

Dividing the numerator and the denominator by exe^x⁠,

I=∫ex−e−xex+e−x dxI = \int\frac{e^x - e^{-x}}{e^x + e^{-x}}\,dx

Put ex+e−x=te^x + e^{-x} = t⁠. Then (ex−e−x)dx=dt\left(e^x - e^{-x}\right)dx = dt⁠.

I=∫dtt=log⁡∣t∣+CI = \int\frac{dt}{t} = \log|t| + C

∴ I=log⁡(ex+e−x)+C\therefore\ I = \log\left(e^x + e^{-x}\right) + C⁠, since ex+e−x>0e^x + e^{-x} > 0⁠.

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

The one idea this problem is built on

As written, the numerator is not the derivative of the denominator (that would be 2e2x2e^{2x}⁠). But divide the top and the bottom by exe^x⁠:

e2x−1e2x+1=ex−e−xex+e−x.\frac{e^{2x} - 1}{e^{2x} + 1} = \frac{e^{x} - e^{-x}}{e^{x} + e^{-x}}.

Now the numerator is the derivative of the denominator, so the integral is the logarithm of the denominator: log⁡(ex+e−x)+C\log\left(e^x + e^{-x}\right) + C⁠.

Given, to find, and the plan
Given
f(x)=e2x−1e2x+1f(x) = \dfrac{e^{2x} - 1}{e^{2x} + 1}⁠. The denominator is always greater than 11⁠, so ff is defined for every real xx⁠.
To find
∫e2x−1e2x+1 dx\displaystyle\int \frac{e^{2x} - 1}{e^{2x} + 1}\,dx in the textbook's form.
Plan
(1) Divide numerator and denominator by exe^x⁠. (2) Substitute t=ex+e−xt = e^x + e^{-x}⁠. (3) Integrate 1t\frac1t⁠. (4) Return to xx⁠. (5) Differentiate back. (6) Confirm by a second route.

Basics you need

1Laws of indices

e2xex=ex\frac{e^{2x}}{e^x} = e^{x} and 1ex=e−x\frac{1}{e^x} = e^{-x}⁠. Basics: powers

2Derivatives of exe^x and e−xe^{-x}

ddxex=ex\frac{d}{dx}e^x = e^x⁠; by the chain rule ddxe−x=−e−x\frac{d}{dx}e^{-x} = -e^{-x}⁠. Basics: integration undoes differentiation

3Numerator equal to the derivative of the denominator

∫g′(x)g(x) dx=log⁡∣g(x)∣+C\int\frac{g'(x)}{g(x)}\,dx = \log|g(x)| + C⁠: substitute t=g(x)t = g(x) and use ∫dtt=log⁡∣t∣+C\int\frac{dt}{t} = \log|t| + C (formula (xii), Section 7.2). Basics: logarithms and 1/x

4Substitution

If t=g(x)t = g(x)⁠, then dt=g′(x) dxdt = g'(x)\,dx⁠. Basics: substitution

Solution

  1. Divide the top and the bottom by exe^x

    Since ex>0e^x > 0⁠, dividing numerator and denominator by it does not change the fraction:

    e2x−1e2x+1=ex−e−xex+e−x.\frac{e^{2x} - 1}{e^{2x} + 1} = \frac{e^{x} - e^{-x}}{e^{x} + e^{-x}}.
    With t=e2x+1t = e^{2x} + 1 we would get dt=2e2x dxdt = 2e^{2x}\,dx⁠, which does not match the numerator e2x−1e^{2x} - 1⁠. Dividing by exe^x makes the expression symmetric, and then the derivative of the denominator, ex−e−xe^x - e^{-x}⁠, is exactly the numerator.
    e2xex=e2x−x=ex\frac{e^{2x}}{e^x} = e^{2x - x} = e^x and 1ex=e−x\frac{1}{e^x} = e^{-x}⁠. Basics: powers
  2. Substitute t=ex+e−xt = e^x + e^{-x}

    Let t=ex+e−xt = e^x + e^{-x}⁠. Then

    dt=(ex−e−x)dx,dt = \left(e^x - e^{-x}\right)dx,

    and the integral becomes

    ∫ex−e−xex+e−x dx=∫dtt.\int \frac{e^x - e^{-x}}{e^x + e^{-x}}\,dx = \int\frac{dt}{t}.
    The derivative of e−xe^{-x} is −e−x-e^{-x} (chain rule with inner function −x-x⁠), which is where the minus sign in dtdt comes from. That product (ex−e−x)dx\left(e^x - e^{-x}\right)dx is precisely the numerator times dxdx⁠.
    Change of variable, Section 7.3.1; Theorem 5, Section 5.4. Lesson: integration by substitution
  3. Integrate and return to xx

    ∫dtt=log⁡∣t∣+C=log⁡(ex+e−x)+C.\int\frac{dt}{t} = \log|t| + C = \log\left(e^x + e^{-x}\right) + C.
    The modulus can be dropped because t=ex+e−xt = e^x + e^{-x} is a sum of two positive numbers, so t>0t > 0 for every xx⁠. (In fact t≥2t \ge 2⁠, with equality at x=0x = 0⁠.)
    Standard formula (xii), Section 7.2: ∫dtt=log⁡∣t∣+C\int\frac{dt}{t} = \log|t| + C⁠. Basics: logarithms and 1/x
  4. Check: differentiate the answer back

    For a positive uu⁠, ddxlog⁡u=u′u\frac{d}{dx}\log u = \frac{u'}{u}⁠. With u=ex+e−xu = e^x + e^{-x}⁠, u′=ex−e−xu' = e^x - e^{-x}⁠:

    ddxlog⁡(ex+e−x)=ex−e−xex+e−x=e2x−1e2x+1.\begin{aligned} \frac{d}{dx}\log\left(e^x + e^{-x}\right) &= \frac{e^x - e^{-x}}{e^x + e^{-x}} \\ &= \frac{e^{2x} - 1}{e^{2x} + 1}. \end{aligned}

    The last line multiplies top and bottom by exe^x⁠, undoing Step 1. This is the integrand, valid for every real xx⁠.

    The derivative first comes out in the rewritten form of Step 1; multiplying top and bottom by ex>0e^x > 0 returns the form printed in the question. Getting the integrand back confirms the answer (Property (I), Section 7.2.1).
    Chain rule, Theorem 4, Section 5.3.1; ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x⁠, Theorem 5, Section 5.4.
  5. A second route gives the same answer

    Write the numerator as 2e2x−(e2x+1)2e^{2x} - (e^{2x} + 1)⁠:

    e2x−1e2x+1=2e2xe2x+1−1.\frac{e^{2x} - 1}{e^{2x} + 1} = \frac{2e^{2x}}{e^{2x} + 1} - 1.

    In the first fraction the numerator 2e2x2e^{2x} is the derivative of e2x+1e^{2x} + 1⁠, so

    ∫e2x−1e2x+1 dx=log⁡(e2x+1)−x+C.\int\frac{e^{2x} - 1}{e^{2x} + 1}\,dx = \log\left(e^{2x} + 1\right) - x + C.

    This is the same function as before, since x=log⁡exx = \log e^x⁠:

    log⁡(e2x+1)−x=log⁡e2x+1ex=log⁡(ex+e−x).\begin{aligned} \log\left(e^{2x} + 1\right) - x &= \log\frac{e^{2x} + 1}{e^x} \\ &= \log\left(e^x + e^{-x}\right). \end{aligned}
    Two different methods landing on identical functions is a strong check. Here the two forms are equal exactly, not just up to a constant.
    log⁡a−log⁡b=log⁡ab\log a - \log b = \log\frac{a}{b} for a,b>0a, b > 0⁠; log⁡ex=x\log e^x = x⁠. Basics: logarithms
Result ∫e2x−1e2x+1 dx=log⁡(ex+e−x)+C,x∈R.\int \frac{e^{2x} - 1}{e^{2x} + 1}\,dx = \log\left(e^x + e^{-x}\right) + C, \qquad x \in \R.

Equivalently log⁡(e2x+1)−x+C\log\left(e^{2x} + 1\right) - x + C⁠. (Textbook answer: log⁡(ex+e−x)+C\log\left(e^x + e^{-x}\right) + C⁠.)

Check it with numbers

Let F(x)=log⁡(ex+e−x)F(x) = \log\left(e^x + e^{-x}\right) and look near x=0.5x = 0.5 with h=0.001h = 0.001⁠:

  • F(0.501)≈0.813724198F(0.501) \approx 0.813724198 and F(0.499)≈0.812799964F(0.499) \approx 0.812799964⁠.
  • Slope estimate: F(0.501)−F(0.499)0.002\dfrac{F(0.501) - F(0.499)}{0.002} ≈0.462117\approx 0.462117⁠.
  • Integrand at x=0.5x = 0.5⁠: e−1e+1≈0.462117\dfrac{e - 1}{e + 1} \approx 0.462117⁠.

They agree.

Common mistakes
  1. Writing log⁡(e2x+1)\log\left(e^{2x} + 1\right) straight away. That would need the numerator to be 2e2x2e^{2x}⁠; differentiating log⁡(e2x+1)\log\left(e^{2x}+1\right) gives 2e2xe2x+1\frac{2e^{2x}}{e^{2x}+1}⁠, not the integrand.
  2. Getting the sign of ddxe−x\frac{d}{dx}e^{-x} wrong. It is −e−x-e^{-x}⁠, which is what turns the plus in the denominator into the minus in the numerator.
  3. Splitting the fraction as e2xe2x+1−1e2x+1\frac{e^{2x}}{e^{2x}+1} - \frac{1}{e^{2x}+1} and stopping. Each piece is harder than the original; rewrite first.
What to take away
  1. If the numerator is not quite the derivative of the denominator, try multiplying or dividing top and bottom by a suitable factor (here exe^x⁠).
  2. ∫g′(x)g(x) dx=log⁡∣g(x)∣+C\int\frac{g'(x)}{g(x)}\,dx = \log|g(x)| + C⁠; drop the modulus only when g(x)>0g(x) > 0 everywhere.
  3. Question 20 is the same idea with 2x2x in place of xx⁠.

Every fact used, and where it comes from

FactUsed inSource
Laws of indices, ex>0e^x > 0Steps 1, 3Section 5.4
ddxex=ex\frac{d}{dx}e^x = e^x⁠, ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1xSteps 2, 4Theorem 5, Section 5.4
Chain ruleSteps 2, 4Theorem 4, Section 5.3.1
Change of variable (substitution)Steps 2, 5Section 7.3.1 (Lesson: integration by substitution)
∫dtt=log⁡∣t∣+C\int\frac{dt}{t} = \log|t| + CSteps 3, 5Standard formula (xii), Section 7.2
∫dx=x+C\int dx = x + C⁠; sum ruleStep 5Formula (i), Section 7.2; Property (III), Section 7.2.1
log⁡a−log⁡b=log⁡ab\log a - \log b = \log\frac ab⁠, log⁡ex=x\log e^x = xStep 5Properties of logarithms, Section 5.4
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 →