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

Miscellaneous · Q24: ∫π/2πex(1−sin⁡x1−cos⁡x)dx\int_{\pi/2}^{\pi}e^x\left(\frac{1-\sin x}{1-\cos x}\right)dx

Miscellaneous ExerciseHalf angles, eˣ[f + f′], fundamental theorem · Miscellaneous Exercise
The question

Evaluate the definite integral:

∫π/2πex(1−sin⁡x1−cos⁡x)dx\int_{\pi/2}^{\pi}e^x\left(\frac{1-\sin x}{1-\cos x}\right)dx
Exam answer

Let I=∫π/2πex(1−sin⁡x1−cos⁡x)dxI = \displaystyle\int_{\pi/2}^{\pi}e^x\left(\frac{1 - \sin x}{1 - \cos x}\right)dx⁠.

Using 1−cos⁡x=2sin⁡2x21 - \cos x = 2\sin^2\frac{x}{2} and sin⁡x=2sin⁡x2cos⁡x2\sin x = 2\sin\frac{x}{2}\cos\frac{x}{2}⁠,

1−sin⁡x1−cos⁡x=1−2sin⁡x2cos⁡x22sin⁡2x2=12cosec⁡2x2−cot⁡x2\begin{aligned} &\frac{1 - \sin x}{1 - \cos x} \\ &= \frac{1 - 2\sin\frac{x}{2}\cos\frac{x}{2}}{2\sin^2\frac{x}{2}} \\ &= \frac12\operatorname{cosec}^2\frac{x}{2} - \cot\frac{x}{2} \end{aligned} ∴ I=∫π/2πex(−cot⁡x2+12cosec⁡2x2)dx\begin{aligned} \therefore\ I &= \int_{\pi/2}^{\pi}e^x\bigg(-\cot\frac{x}{2} \\ &\qquad + \frac12\operatorname{cosec}^2\frac{x}{2}\bigg)dx \end{aligned}

Here f(x)=−cot⁡x2f(x) = -\cot\frac{x}{2} gives f′(x)=12cosec⁡2x2f'(x) = \frac12\operatorname{cosec}^2\frac{x}{2}⁠.

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

I=[−excot⁡x2]π/2π=−eπcot⁡π2+eπ/2cot⁡π4=0+eπ/2⋅1\begin{aligned} I &= \Big[-e^x\cot\frac{x}{2}\Big]_{\pi/2}^{\pi} \\ &= -e^{\pi}\cot\frac{\pi}{2} + e^{\pi/2}\cot\frac{\pi}{4} \\ &= 0 + e^{\pi/2}\cdot 1 \end{aligned}

∴ I=eπ/2\therefore\ I = e^{\pi/2}⁠.

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

The one idea this problem is built on

Find an antiderivative, then use the second fundamental theorem. The factor exe^x suggests the pattern ex[f(x)+f′(x)]e^x\left[f(x) + f'(x)\right]⁠, whose integral is exf(x)e^xf(x) (Section 7.6.1). Half-angle identities turn the fraction into 12cosec⁡2x2−cot⁡x2\frac12\operatorname{cosec}^2\frac{x}{2} - \cot\frac{x}{2}⁠, which is f+f′f + f' for f(x)=−cot⁡x2f(x) = -\cot\frac{x}{2}⁠.

Given, to find, and the plan
Given
g(x)=ex 1−sin⁡x1−cos⁡xg(x) = e^x\,\frac{1-\sin x}{1-\cos x} on [π2,π][\frac{\pi}{2}, \pi]⁠.
To find
∫π/2πg(x) dx\int_{\pi/2}^{\pi}g(x)\,dx exactly, and as a decimal.
Plan
(1) Check continuity on [π2,π][\frac{\pi}{2}, \pi]⁠. (2) Rewrite the fraction with half angles. (3) Recognise ex[f+f′]e^x[f + f']⁠. (4) Antiderivative, checked by differentiating. (5) Theorem 2: evaluate at the limits.

Basics you need

1Half-angle identities

1−cos⁡x=2sin⁡2x21 - \cos x = 2\sin^2\frac{x}{2} and sin⁡x=2sin⁡x2cos⁡x2\sin x = 2\sin\frac{x}{2}\cos\frac{x}{2}⁠. 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⁠. Lesson: integration by parts

3Theorem 2 (Section 7.8.3)

If gg is continuous on [a,b][a, b] and F′=gF' = g there, then ∫abg(x) dx=F(b)−F(a)\int_a^b g(x)\,dx = F(b) - F(a)⁠. Lesson: definite integrals

Solution

  1. Continuity on [π2,π][\frac{\pi}{2}, \pi]

    For π2≤x≤π\frac{\pi}{2} \le x \le \pi⁠, cos⁡x\cos x runs from 0 down to −1-1⁠, so

    1≤1−cos⁡x≤2.1 \le 1 - \cos x \le 2 .

    The denominator is never 0, and exe^x⁠, 1−sin⁡x1 - \sin x⁠, 1−cos⁡x1 - \cos x are continuous, so gg is continuous on the whole closed interval.

    Theorem 2 needs a continuous integrand on [a,b][a, b]⁠. The only danger here is 1−cos⁡x=01 - \cos x = 0⁠, which happens at x=0,±2π,…x = 0, \pm 2\pi, \dots⁠, all outside [π2,π][\frac{\pi}{2}, \pi]⁠.
  2. Rewrite the fraction with half angles

    1−sin⁡x1−cos⁡x=1−2sin⁡x2cos⁡x22sin⁡2x2=12sin⁡2x2−cos⁡x2sin⁡x2=12cosec⁡2x2−cot⁡x2.\begin{aligned}\frac{1-\sin x}{1-\cos x} &= \frac{1 - 2\sin\frac{x}{2}\cos\frac{x}{2}}{2\sin^2\frac{x}{2}}\\ &= \frac{1}{2\sin^2\frac{x}{2}} - \frac{\cos\frac{x}{2}}{\sin\frac{x}{2}}\\ &= \frac12\operatorname{cosec}^2\frac{x}{2} - \cot\frac{x}{2} .\end{aligned}
    Writing everything in the half angle x2\frac{x}{2} makes the denominator a single square, so the fraction splits into two familiar functions. On [π2,π][\frac{\pi}{2}, \pi]⁠, x2\frac{x}{2} lies in [π4,π2][\frac{\pi}{4}, \frac{\pi}{2}]⁠, where sin⁡x2≥12>0\sin\frac{x}{2} \ge \frac{1}{\sqrt2} > 0⁠, so dividing by it is safe.
  3. Choose the method: recognise ex[f+f′]e^x[f + f']

    Take f(x)=−cot⁡x2f(x) = -\cot\frac{x}{2}⁠. By the chain rule (inner function x2\frac{x}{2}⁠, derivative 12\frac12⁠),

    f′(x)=−(−cosec⁡2x2)⋅12=12cosec⁡2x2.f'(x) = -\left(-\operatorname{cosec}^2\frac{x}{2}\right)\cdot\frac12 = \frac12\operatorname{cosec}^2\frac{x}{2} .

    So g(x)=ex[f(x)+f′(x)]g(x) = e^x\left[f(x) + f'(x)\right]⁠.

    The two terms of Step 2 are a function and its derivative, exactly the shape of Section 7.6.1. The sign matters: it is −cot⁡x2-\cot\frac{x}{2}⁠, not +cot⁡x2+\cot\frac{x}{2}⁠, whose derivative is +12cosec⁡2x2+\frac12\operatorname{cosec}^2\frac{x}{2}⁠.
  4. The antiderivative, and its check

    F(x)=exf(x)=−excot⁡x2.F(x) = e^xf(x) = -e^x\cot\frac{x}{2} .

    Check: differentiate (product rule):

    F′(x)=−excot⁡x2−ex(−12cosec⁡2x2)=ex[12cosec⁡2x2−cot⁡x2]=g(x).\begin{aligned}F'(x) &= -e^x\cot\frac{x}{2} - e^x\left(-\frac12\operatorname{cosec}^2\frac{x}{2}\right)\\ &= e^x\left[\frac12\operatorname{cosec}^2\frac{x}{2} - \cot\frac{x}{2}\right] = g(x) .\end{aligned}
    FF is defined and differentiable on all of [π2,π][\frac{\pi}{2}, \pi] because sin⁡x2≠0\sin\frac{x}{2} \ne 0 there (Step 2), and F′=gF' = g⁠. That is exactly what Theorem 2 asks for.
  5. Theorem 2: evaluate at the limits

    Using cot⁡π2=0\cot\frac{\pi}{2} = 0 and cot⁡π4=1\cot\frac{\pi}{4} = 1⁠:

    F(π)=−eπcot⁡π2=0,F(π2)=−eπ/2cot⁡π4=−eπ/2.F(\pi) = -e^{\pi}\cot\frac{\pi}{2} = 0 ,\qquad F\left(\tfrac{\pi}{2}\right) = -e^{\pi/2}\cot\frac{\pi}{4} = -e^{\pi/2} . ∫π/2πex(1−sin⁡x1−cos⁡x)dx=F(π)−F(π2)=eπ/2≈4.8104773810.\int_{\pi/2}^{\pi}e^x\left(\frac{1-\sin x}{1-\cos x}\right)dx = F(\pi) - F\left(\tfrac{\pi}{2}\right) = e^{\pi/2} \approx 4.8104773810 .
    x y π/2 3π/4 π 4 8 12 shaded area = e^(π/2) ≈ 4.81 y = eˣ(1 − sin x)/(1 − cos x), rising from 0 to e^π/2 ≈ 11.57
    The integrand y=ex 1−sin⁡x1−cos⁡xy = e^x\,\frac{1-\sin x}{1-\cos x} on [π2,π][\frac{\pi}{2}, \pi]⁠. It starts at 0 (because 1−sin⁡π2=01 - \sin\frac{\pi}{2} = 0⁠) and rises to eπ2≈11.57\frac{e^{\pi}}{2} \approx 11.57 at x=πx = \pi⁠. The shaded area is eπ/2≈4.81e^{\pi/2} \approx 4.81⁠. The vertical axis is drawn at x=π2x = \frac{\pi}{2}⁠, the lower limit, not at x=0x = 0⁠.
    Upper value minus lower value. The result is positive, as it must be: 1−sin⁡x≥01 - \sin x \ge 0 and 1−cos⁡x>01 - \cos x > 0⁠, so the integrand is never negative on the interval.
    Theorem 2, Section 7.8.3. Basics: area as a sum of thin strips
Result ∫π/2πex(1−sin⁡x1−cos⁡x)dx=eπ/2≈4.8104773810\int_{\pi/2}^{\pi}e^x\left(\frac{1-\sin x}{1-\cos x}\right)dx = e^{\pi/2} \approx 4.8104773810

(Textbook answer: eπ/2e^{\pi/2}⁠.)

Check it with numbers

The rewrite of Step 2 at x=2π3x = \frac{2\pi}{3}⁠:

1−sin⁡2π31−cos⁡2π3=1−0.86602540381.5≈0.0893163975,12cosec⁡2π3−cot⁡π3=23−13≈0.0893163975.\begin{aligned}\frac{1 - \sin\frac{2\pi}{3}}{1 - \cos\frac{2\pi}{3}} &= \frac{1 - 0.8660254038}{1.5} \approx 0.0893163975 ,\\ \frac12\operatorname{cosec}^2\frac{\pi}{3} - \cot\frac{\pi}{3} &= \frac23 - \frac{1}{\sqrt3} \approx 0.0893163975 .\end{aligned}

Numerical integration of ex 1−sin⁡x1−cos⁡xe^x\,\frac{1-\sin x}{1-\cos x} from π2\frac{\pi}{2} to π\pi gives 4.81047738104.8104773810⁠, and eπ/2≈4.8104773810e^{\pi/2} \approx 4.8104773810 as well.

Common mistakes
  1. f=cot⁡x2f = \cot\frac{x}{2} instead of −cot⁡x2-\cot\frac{x}{2}⁠. The derivative of cot⁡x2\cot\frac{x}{2} is −12cosec⁡2x2-\frac12\operatorname{cosec}^2\frac{x}{2}⁠; the signs must match the integrand.
  2. Forgetting the 12\frac12 from the chain rule in ddxcot⁡x2\frac{d}{dx}\cot\frac{x}{2}⁠.
  3. Wrong values at the limits. At x=πx = \pi⁠, cot⁡π2=0\cot\frac{\pi}{2} = 0 (not undefined); at x=π2x = \frac{\pi}{2}⁠, cot⁡π4=1\cot\frac{\pi}{4} = 1⁠.
What to take away
  1. 1±sin⁡x1±cos⁡x\frac{1 \pm \sin x}{1 \pm \cos x} becomes simple in half angles; this one pairs with exe^x as ex[f+f′]e^x[f + f']⁠.
  2. Exercise 7.6 Q18 is the companion: ∫ex 1+sin⁡x1+cos⁡x dx=extan⁡x2+C\int e^x\,\frac{1+\sin x}{1+\cos x}\,dx = e^x\tan\frac{x}{2} + C⁠.
  3. Before Theorem 2, check that the integrand and the antiderivative behave on the whole closed interval.

Every fact used, and where it comes from

FactUsed inSource
Continuity needed for Theorem 2Step 1Section 7.8.3 (Lesson: definite integrals)
Half-angle identitiesStep 2Class XI trigonometry (Basics)
ddxcot⁡x=−cosec⁡2x\frac{d}{dx}\cot x = -\operatorname{cosec}^2x⁠; chain ruleSteps 3, 4Chapter 5; Section 7.2, list item (v)
∫ex[f+f′] dx=exf+C\int e^x[f + f']\,dx = e^xf + CSteps 3, 4Section 7.6.1 (Lesson: integration by parts)
Theorem 2: ∫abg=F(b)−F(a)\int_a^b g = F(b) - F(a)Step 5Section 7.8.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 →