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

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

Exercise 7.2Integration by substitution · Section 7.3.1
The question

Integrate the function

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

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

Put e2x+e−2x=te^{2x} + e^{-2x} = t⁠.

Then 2(e2x−e−2x)dx=dt2\left(e^{2x} - e^{-2x}\right)dx = dt⁠.

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

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

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

The one idea this problem is built on

Differentiate the denominator: ddx(e2x+e−2x)=2e2x−2e−2x\frac{d}{dx}\left(e^{2x} + e^{-2x}\right) = 2e^{2x} - 2e^{-2x}⁠, which is twice the numerator. So with t=e2x+e−2xt = e^{2x} + e^{-2x} the numerator times dxdx is 12 dt\frac12\,dt⁠, and the integral is 12∫dtt=12log⁡t+C\frac12\int\frac{dt}{t} = \frac12\log t + C⁠.

Given, to find, and the plan
Given
f(x)=e2x−e−2xe2x+e−2xf(x) = \dfrac{e^{2x} - e^{-2x}}{e^{2x} + e^{-2x}}⁠. The denominator is a sum of two positive numbers, so it is never zero and ff is defined for every real xx⁠.
To find
∫e2x−e−2xe2x+e−2x dx\displaystyle\int \frac{e^{2x} - e^{-2x}}{e^{2x} + e^{-2x}}\,dx⁠.
Plan
(1) Differentiate the denominator and compare with the numerator. (2) Substitute t=e2x+e−2xt = e^{2x} + e^{-2x}⁠. (3) Integrate 1t\frac1t⁠. (4) Return to xx⁠. (5) Differentiate back.

Basics you need

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

By the chain rule, ddxeax=a eax\frac{d}{dx}e^{ax} = a\,e^{ax}⁠. So ddxe2x=2e2x\frac{d}{dx}e^{2x} = 2e^{2x} and ddxe−2x=−2e−2x\frac{d}{dx}e^{-2x} = -2e^{-2x}⁠. Basics: integration undoes differentiation

2Substitution

If t=g(x)t = g(x)⁠, then dt=g′(x) dxdt = g'(x)\,dx⁠; a constant multiple of g′(x) dxg'(x)\,dx can be traded for dtdt⁠. Basics: substitution

3The integral of 1t\frac1t

∫dtt=log⁡∣t∣+C\int\frac{dt}{t} = \log|t| + C (standard formula (xii), Section 7.2). Basics: logarithms and 1/x

Solution

  1. Differentiate the denominator

    ddx(e2x+e−2x)=2e2x−2e−2x=2(e2x−e−2x).\begin{aligned} \frac{d}{dx}\left(e^{2x} + e^{-2x}\right) &= 2e^{2x} - 2e^{-2x} \\ &= 2\left(e^{2x} - e^{-2x}\right). \end{aligned}

    This is 22 times the numerator.

    Whenever the numerator is a constant multiple of the derivative of the denominator, the substitution t=t = denominator turns the integral into k∫dttk\int\frac{dt}{t}⁠. The constant here is 12\frac12⁠.
    Chain rule with inner functions 2x2x and −2x-2x⁠; ddxex=ex\frac{d}{dx}e^x = e^x (Theorem 5, Section 5.4).
  2. Substitute t=e2x+e−2xt = e^{2x} + e^{-2x}

    Let t=e2x+e−2xt = e^{2x} + e^{-2x}⁠. By Step 1, dt=2(e2x−e−2x)dxdt = 2\left(e^{2x} - e^{-2x}\right)dx⁠, so

    (e2x−e−2x)dx=12 dt.\left(e^{2x} - e^{-2x}\right)dx = \frac12\,dt.

    Therefore

    ∫e2x−e−2xe2x+e−2x dx=12∫dtt.\int \frac{e^{2x} - e^{-2x}}{e^{2x} + e^{-2x}}\,dx = \frac12\int\frac{dt}{t}.
    The whole numerator times dxdx is replaced by 12 dt\frac12\,dt and the denominator by tt⁠. No xx remains, so the substitution is complete.
    Change of variable, Section 7.3.1; constants come outside, Property (IV), Section 7.2.1. Lesson: integration by substitution
  3. Integrate and return to xx

    12∫dtt=12log⁡∣t∣+C=12log⁡(e2x+e−2x)+C.\begin{aligned} \frac12\int\frac{dt}{t} &= \frac12\log|t| + C \\ &= \frac12\log\left(e^{2x} + e^{-2x}\right) + C. \end{aligned}
    t=e2x+e−2xt = e^{2x} + e^{-2x} is always positive (indeed t≥2t \ge 2⁠), so ∣t∣=t|t| = t and the modulus is not needed.
    Standard formula (xii), Section 7.2. Basics: logarithms and 1/x
  4. Check: differentiate the answer back

    With u=e2x+e−2xu = e^{2x} + e^{-2x} and ddxlog⁡u=u′u\frac{d}{dx}\log u = \frac{u'}{u}⁠:

    ddx[12log⁡u]=12⋅2e2x−2e−2xe2x+e−2x=e2x−e−2xe2x+e−2x.\begin{aligned} \frac{d}{dx}\left[\frac12\log u\right] &= \frac12\cdot\frac{2e^{2x} - 2e^{-2x}}{e^{2x} + e^{-2x}} \\ &= \frac{e^{2x} - e^{-2x}}{e^{2x} + e^{-2x}}. \end{aligned}

    This is the integrand, so the answer is correct for every real xx⁠.

    The 12\frac12 in front cancels the factor 22 in the derivative of the denominator, the same factor that was divided out in Step 2. Getting the integrand back confirms the answer.
    Chain rule, Theorem 4, Section 5.3.1; Property (I), Section 7.2.1. Basics: integration undoes differentiation
Result ∫e2x−e−2xe2x+e−2x dx=12log⁡(e2x+e−2x)+C,\begin{aligned} &\int \frac{e^{2x} - e^{-2x}}{e^{2x} + e^{-2x}}\,dx \\ &\quad= \frac12\log\left(e^{2x} + e^{-2x}\right) + C, \end{aligned}

valid for every real xx⁠. (Textbook answer: 12log⁡(e2x+e−2x)+C\frac12\log\left(e^{2x} + e^{-2x}\right) + C⁠.)

Check it with numbers

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

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

They agree.

Common mistakes
  1. Missing the factor 12\frac12⁠. The derivative of the denominator is twice the numerator, so the logarithm is halved. Without the 12\frac12⁠, differentiating gives twice the integrand.
  2. Writing ddxe−2x=e−2x\frac{d}{dx}e^{-2x} = e^{-2x} or −e−2x-e^{-2x}⁠. The inner function −2x-2x contributes the factor −2-2⁠.
  3. Writing log⁡(e2x)+log⁡(e−2x)\log\left(e^{2x}\right) + \log\left(e^{-2x}\right)⁠. The logarithm of a sum is not the sum of the logarithms.
What to take away
  1. ∫k g′(x)g(x) dx=klog⁡∣g(x)∣+C\int\frac{k\,g'(x)}{g(x)}\,dx = k\log|g(x)| + C⁠: always compare the numerator with the derivative of the denominator, constants included.
  2. Compare Question 19: there the fraction had to be rearranged first; here the pattern is visible at once.

Every fact used, and where it comes from

FactUsed inSource
ddxex=ex\frac{d}{dx}e^x = e^x⁠; ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1xSteps 1, 4Theorem 5, Section 5.4
Chain ruleSteps 1, 4Theorem 4, Section 5.3.1
Change of variable (substitution)Step 2Section 7.3.1 (Lesson: integration by substitution)
∫kf=k∫f\int k f = k\int fStep 2Property (IV), Section 7.2.1
∫dtt=log⁡∣t∣+C\int\frac{dt}{t} = \log|t| + CStep 3Standard formula (xii), Section 7.2
Differentiation undoes integrationStep 4Property (I), Section 7.2.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 →