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

Miscellaneous · Q20: ∫2+sin⁡2x1+cos⁡2x ex dx\int\frac{2+\sin 2x}{1+\cos 2x}\,e^x\,dx

Miscellaneous ExerciseDouble-angle identities, then eˣ[f(x) + f′(x)] · Miscellaneous Exercise
The question

Integrate the function:

2+sin⁡2x1+cos⁡2x ex\frac{2+\sin 2x}{1+\cos 2x}\,e^x
Exam answer

Let I=∫2+sin⁡2x1+cos⁡2x ex dxI = \displaystyle\int\frac{2 + \sin 2x}{1 + \cos 2x}\,e^x\,dx⁠.

Using sin⁡2x=2sin⁡xcos⁡x\sin 2x = 2\sin x\cos x and 1+cos⁡2x=2cos⁡2x1 + \cos 2x = 2\cos^2 x⁠,

2+sin⁡2x1+cos⁡2x=2+2sin⁡xcos⁡x2cos⁡2x=sec⁡2x+tan⁡x\begin{aligned} \frac{2 + \sin 2x}{1 + \cos 2x} &= \frac{2 + 2\sin x\cos x}{2\cos^2 x} \\ &= \sec^2 x + \tan x \end{aligned} ∴ I=∫ex(tan⁡x+sec⁡2x)dx\therefore\ I = \int e^x\left(\tan x + \sec^2 x\right)dx

Here f(x)=tan⁡xf(x) = \tan x and f′(x)=sec⁡2xf'(x) = \sec^2 x⁠. Using ∫ex[f(x)+f′(x)]dx\displaystyle\int e^x\left[f(x) + f'(x)\right]dx =exf(x)+C= e^x f(x) + C⁠,

∴ I=extan⁡x+C\therefore\ I = e^x\tan x + C⁠.

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

The one idea this problem is built on

When exe^x multiplies something, look for the pattern ex[f(x)+f′(x)]e^x\left[f(x) + f'(x)\right]⁠, whose integral is simply exf(x)e^xf(x) (Section 7.6.1). The double-angle identities turn the fraction into sec⁡2x+tan⁡x\sec^2x + \tan x⁠, and sec⁡2x\sec^2x is the derivative of tan⁡x\tan x⁠: the pattern with f(x)=tan⁡xf(x) = \tan x⁠.

Given, to find, and the plan
Given
2+sin⁡2x1+cos⁡2x ex\frac{2+\sin 2x}{1+\cos 2x}\,e^x⁠, defined where 1+cos⁡2x≠01 + \cos 2x \ne 0⁠, that is where cos⁡x≠0\cos x \ne 0 (since 1+cos⁡2x=2cos⁡2x1 + \cos 2x = 2\cos^2x⁠): every xx except odd multiples of π2\frac{\pi}{2}⁠.
To find
∫2+sin⁡2x1+cos⁡2x ex dx\displaystyle\int\frac{2+\sin 2x}{1+\cos 2x}\,e^x\,dx⁠.
Plan
(1) Rewrite the fraction with double-angle identities. (2) Split it into two terms. (3) Recognise ex[f+f′]e^x[f + f']⁠. (4) Write the answer. (5) Differentiate back and compare with the key.

Basics you need

1Double-angle identities

1+cos⁡2x=2cos⁡2x1 + \cos 2x = 2\cos^2x and sin⁡2x=2sin⁡xcos⁡x\sin 2x = 2\sin x\cos x⁠. Basics: trigonometric identities

2The ex[f+f′]e^x[f + f'] integral (Section 7.6.1)∫ex[f(x)+f′(x)]dx=exf(x)+C\int e^x\left[f(x) + f'(x)\right]dx = e^xf(x) + C

It comes from integration by parts. Lesson: integration by parts

3Derivative of tan⁡x\tan x

ddxtan⁡x=sec⁡2x\frac{d}{dx}\tan x = \sec^2x (Section 7.2, list item (iv)). Basics: integration undoes differentiation

Solution

  1. Rewrite the fraction with double angles

    2+sin⁡2x1+cos⁡2x=2+2sin⁡xcos⁡x2cos⁡2x=1+sin⁡xcos⁡xcos⁡2x.\frac{2+\sin 2x}{1+\cos 2x} = \frac{2 + 2\sin x\cos x}{2\cos^2x} = \frac{1 + \sin x\cos x}{\cos^2x} .
    Both identities turn 2x2x into xx⁠, and the factor 2 cancels. The denominator becomes a single power cos⁡2x\cos^2x⁠, which is what makes the next split work. We may divide by cos⁡2x\cos^2x because cos⁡x≠0\cos x \ne 0 on the domain.
  2. Split into two terms

    1+sin⁡xcos⁡xcos⁡2x=1cos⁡2x+sin⁡xcos⁡x=sec⁡2x+tan⁡x.\frac{1 + \sin x\cos x}{\cos^2x} = \frac{1}{\cos^2x} + \frac{\sin x}{\cos x} = \sec^2x + \tan x .

    So the integrand is ex(tan⁡x+sec⁡2x)e^x\left(\tan x + \sec^2x\right)⁠.

    Dividing each term of the numerator by cos⁡2x\cos^2x⁠: the first gives sec⁡2x\sec^2x⁠; in the second one factor cos⁡x\cos x cancels, leaving tan⁡x\tan x⁠.
  3. Choose the method: recognise ex[f+f′]e^x[f + f']

    With f(x)=tan⁡xf(x) = \tan x we have f′(x)=sec⁡2xf'(x) = \sec^2x⁠, so

    ex(tan⁡x+sec⁡2x)=ex[f(x)+f′(x)].e^x\left(\tan x + \sec^2x\right) = e^x\left[f(x) + f'(x)\right] .
    Whenever an integrand is exe^x times a sum, check whether one term is the derivative of the other. Here it is, so the whole integral is done in one line by Section 7.6.1, with no need to integrate exsec⁡2xe^x\sec^2x or extan⁡xe^x\tan x separately (by parts, each of these only leads back to the other).
  4. Write the answer

    ∫2+sin⁡2x1+cos⁡2x ex dx=extan⁡x+C.\int\frac{2+\sin 2x}{1+\cos 2x}\,e^x\,dx = e^x\tan x + C .
    The rule ∫ex[f+f′] dx=exf+C\int e^x[f + f']\,dx = e^xf + C with f(x)=tan⁡xf(x) = \tan x⁠.
  5. Check: differentiate the answer

    ddx(extan⁡x)=extan⁡x+exsec⁡2x=ex(tan⁡x+sec⁡2x)=2+sin⁡2x1+cos⁡2x ex ✓\begin{aligned}\frac{d}{dx}\left(e^x\tan x\right) &= e^x\tan x + e^x\sec^2x\\ &= e^x\left(\tan x + \sec^2x\right)\\ &= \frac{2+\sin 2x}{1+\cos 2x}\,e^x\ \checkmark\end{aligned}
    Product rule, then Steps 1 and 2 read backwards. The answer is valid on each interval between consecutive odd multiples of π2\frac{\pi}{2}⁠, where cos⁡x≠0\cos x \ne 0⁠.
  6. Compare with the textbook's answer

    The key gives extan⁡x+Ce^x\tan x + C⁠, exactly our answer.

    The key does not mention the domain; we add it: the answer holds where cos⁡x≠0\cos x \ne 0⁠.
Result

Where cos⁡x≠0\cos x \ne 0⁠:

∫2+sin⁡2x1+cos⁡2x ex dx=extan⁡x+C\int\frac{2+\sin 2x}{1+\cos 2x}\,e^x\,dx = e^x\tan x + C

(Textbook answer: extan⁡x+Ce^x\tan x + C⁠.)

Check it with numbers

The rewrite at x=π4x = \frac{\pi}{4}⁠: 2+11+0=3\frac{2 + 1}{1 + 0} = 3⁠, and sec⁡2π4+tan⁡π4=2+1=3\sec^2\frac{\pi}{4} + \tan\frac{\pi}{4} = 2 + 1 = 3⁠.

Area from 0 to π4\frac{\pi}{4} (the integrand is continuous there): F(π4)−F(0)=eπ/4⋅1−0F(\frac{\pi}{4}) - F(0) = e^{\pi/4}\cdot 1 - 0⁠, that is eπ/4≈2.1932800507e^{\pi/4} \approx 2.1932800507⁠. Numerical integration of the integrand from 0 to π4\frac{\pi}{4} also gives 2.19328005072.1932800507⁠.

Common mistakes
  1. Using 1+cos⁡2x=2sin⁡2x1 + \cos 2x = 2\sin^2x⁠. That is 1−cos⁡2x1 - \cos 2x⁠; here it is 2cos⁡2x2\cos^2x⁠.
  2. Integrating exe^x and the fraction separately. The integral of a product is not the product of the integrals.
  3. Choosing f=sec⁡2xf = \sec^2x⁠. Its derivative is 2sec⁡2xtan⁡x2\sec^2x\tan x⁠, not tan⁡x\tan x⁠; the term whose derivative is the other term is tan⁡x\tan x⁠.
What to take away
  1. With exe^x times a sum, test whether the sum is f+f′f + f'⁠; if so, the answer is exf+Ce^xf + C⁠.
  2. Simplify trigonometric fractions with double-angle identities first; the pattern often only appears afterwards.

Every fact used, and where it comes from

FactUsed inSource
1+cos⁡2x=2cos⁡2x1 + \cos 2x = 2\cos^2x⁠, sin⁡2x=2sin⁡xcos⁡x\sin 2x = 2\sin x\cos xStep 1Class XI trigonometry (Basics)
ddxtan⁡x=sec⁡2x\frac{d}{dx}\tan x = \sec^2xSteps 3, 5Section 7.2, list item (iv)
∫ex[f+f′] dx=exf+C\int e^x[f + f']\,dx = e^xf + CSteps 3, 4Section 7.6.1 (Lesson: integration by parts)
Product ruleStep 5Chapter 5
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 →