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

Exercise 7.10 · Q12: ∫0πx1+sin⁡x dx\int_0^{\pi}\frac{x}{1+\sin x}\,dx

Exercise 7.10Properties of definite integrals (P4) · Section 7.10
The question

By using the properties of definite integrals, evaluate the integrals in Exercises 1 to 19.

12. ∫0πx dx1+sin⁡x\displaystyle\int_0^{\pi}\frac{x\,dx}{1+\sin x}

Exam answer Let I=∫0πx dx1+sin⁡x…(i)\text{Let } I = \int_0^{\pi}\frac{x\,dx}{1 + \sin x}\quad\ldots(\text{i})

Using ∫0af(x) dx=∫0af(a−x) dx\displaystyle\int_0^a f(x)\,dx = \int_0^a f(a - x)\,dx⁠,

I=∫0π(π−x) dx1+sin⁡(π−x)=∫0π(π−x) dx1+sin⁡x…(ii)\begin{aligned} I &= \int_0^{\pi}\frac{(\pi - x)\,dx}{1 + \sin(\pi - x)} \\ &= \int_0^{\pi}\frac{(\pi - x)\,dx}{1 + \sin x}\quad\ldots(\text{ii}) \end{aligned}

Adding (i) and (ii),

2I=π∫0πdx1+sin⁡x2I = \pi\int_0^{\pi}\frac{dx}{1 + \sin x}

Now, multiplying numerator and denominator by 1−sin⁡x1 - \sin x⁠,

∫dx1+sin⁡x=∫1−sin⁡xcos⁡2x dx=∫(sec⁡2x−sec⁡xtan⁡x)dx=tan⁡x−sec⁡x=sin⁡x−1cos⁡x=−cos⁡x1+sin⁡x\begin{aligned} &\int\frac{dx}{1 + \sin x} \\ &= \int\frac{1 - \sin x}{\cos^2 x}\,dx \\ &= \int\left(\sec^2 x - \sec x\tan x\right)dx \\ &= \tan x - \sec x = \frac{\sin x - 1}{\cos x} \\ &= -\frac{\cos x}{1 + \sin x} \end{aligned} ∴ 2I=π[−cos⁡x1+sin⁡x]0π=π(1−(−1))=2π\begin{aligned} \therefore\ 2I &= \pi\left[-\frac{\cos x}{1 + \sin x}\right]_0^{\pi} \\ &= \pi\left(1 - (-1)\right) = 2\pi \end{aligned}

∴ I=π\therefore\ I = \pi⁠.

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

The one idea this problem is built on

The factor xx makes a direct antiderivative hard. But sin⁡x\sin x does not change when xx is replaced by π−x\pi - x⁠, so P4 turns the integral into the same integral with xx replaced by π−x\pi - x in the numerator only. Adding the two forms, the numerators add to the constant π\pi⁠: the awkward xx disappears and only ∫0πdx1+sin⁡x\int_0^{\pi}\frac{dx}{1+\sin x} is left, which we can integrate exactly.

Given, to find, and the plan
Given
I=∫0πx1+sin⁡x dxI = \displaystyle\int_0^{\pi}\frac{x}{1+\sin x}\,dx⁠.
To find
The exact value of II⁠.
Plan
(1) Check the integrand is continuous on [0,π][0, \pi]⁠. (2) P4 with a=πa = \pi⁠. (3) Add the two forms of II⁠. (4) Find an antiderivative of 11+sin⁡x\frac{1}{1+\sin x} that works on the whole interval. (5) Differentiate it back. (6) Evaluate with Theorem 2 and divide by 2.

Basics you need

1Property P4 (Section 7.10)

∫0af(x) dx=∫0af(a−x) dx\int_0^a f(x)\,dx = \int_0^a f(a-x)\,dx⁠. It holds for every continuous ff on [0,a][0, a]⁠: replacing xx by a−xa - x only reads the interval backwards. Lesson: properties of definite integrals

2Supplementary angles

sin⁡(π−x)=sin⁡x\sin(\pi - x) = \sin x and cos⁡(π−x)=−cos⁡x\cos(\pi - x) = -\cos x⁠; also sin⁡2x+cos⁡2x=1\sin^2 x + \cos^2 x = 1⁠. Basics: trigonometric identities

3Standard derivatives

ddxtan⁡x=sec⁡2x\frac{d}{dx}\tan x = \sec^2 x⁠, ddxsec⁡x=sec⁡xtan⁡x\frac{d}{dx}\sec x = \sec x\tan x⁠, and the quotient rule (uv)′=u′v−uv′v2\left(\frac{u}{v}\right)' = \frac{u'v - uv'}{v^2}⁠. Basics: integration undoes differentiation

4Theorem 2 (Section 7.8.3)

If ff is continuous on [a,b][a, b] and F′=fF' = f on [a,b][a, b]⁠, then ∫abf(x) dx=F(b)−F(a)\int_a^b f(x)\,dx = F(b) - F(a)⁠. Lesson: definite integrals

Solution

  1. The integrand is continuous on [0,π][0, \pi]

    For 0≤x≤π0 \le x \le \pi we have sin⁡x≥0\sin x \ge 0⁠, so

    1+sin⁡x≥1>0.1 + \sin x \ge 1 > 0 .

    The integrand x1+sin⁡x\frac{x}{1+\sin x} is a quotient of continuous functions whose denominator never vanishes, so it is continuous on the whole closed interval. II is an ordinary definite integral and the properties of Section 7.10 apply.

    Every property P0 to P7 and Theorem 2 are stated for functions continuous on the closed interval (Remark (iv) after Theorem 2). Checking this first means nothing later can go wrong because of a zero denominator.
    sin⁡x≥0\sin x \ge 0 on [0,π][0, \pi]⁠: the angle is in the first or second quadrant (or on the axis).
  2. P4 with a=πa = \pi⁠: replace xx by π−x\pi - x

    P4 says ∫0πf(x) dx=∫0πf(π−x) dx\int_0^{\pi} f(x)\,dx = \int_0^{\pi} f(\pi - x)\,dx⁠. With f(x)=x1+sin⁡xf(x) = \frac{x}{1+\sin x}⁠:

    f(π−x)=π−x1+sin⁡(π−x)=π−x1+sin⁡x.f(\pi - x) = \frac{\pi - x}{1 + \sin(\pi - x)} = \frac{\pi - x}{1 + \sin x} .

    So

    I=∫0ππ−x1+sin⁡x dx.I = \int_0^{\pi}\frac{\pi - x}{1+\sin x}\,dx .
    P4 has no extra condition: it holds for any continuous ff (Step 1). We use it because it changes the numerator xx into π−x\pi - x while leaving the denominator exactly as it was, thanks to sin⁡(π−x)=sin⁡x\sin(\pi - x) = \sin x⁠. That is what makes the next step work.
    sin⁡(π−x)=sin⁡x\sin(\pi - x) = \sin x⁠: the angles xx and π−x\pi - x are mirror images in the yy-axis of the unit circle, so they have the same height. Basics: symmetry and mirror images
  3. Add the two forms of II

    Add the original integral and the result of Step 2. Both run over the same interval [0,π][0, \pi]⁠, so we may simply add the integrands:

    2I=∫0πx+(π−x)1+sin⁡x dx=π∫0πdx1+sin⁡x.\begin{aligned}2I &= \int_0^{\pi}\frac{x + (\pi - x)}{1+\sin x}\,dx \\ &= \pi\int_0^{\pi}\frac{dx}{1+\sin x} .\end{aligned}

    Write J=∫0πdx1+sin⁡xJ = \int_0^{\pi}\frac{dx}{1+\sin x}⁠. Then 2I=πJ2I = \pi J⁠, that is, I=π2JI = \frac{\pi}{2}J⁠.

    x y O π/2 π 1 2 3 x = π/2 blue: y = x/(1 + sin x), shaded area I = π dashed violet: y = (π − x)/(1 + sin x), its mirror in x = π/2 the two heights always add up to π/(1 + sin x)
    y=x1+sin⁡xy = \frac{x}{1+\sin x} (blue, area II shaded) and y=π−x1+sin⁡xy = \frac{\pi - x}{1+\sin x} (dashed violet), its mirror image in the line x=π2x = \frac{\pi}{2}⁠. Mirror images enclose equal areas, and at every xx the two heights add up to π1+sin⁡x\frac{\pi}{1+\sin x}⁠.
    The sum of two integrals over the same interval is the integral of the sum (Properties (III) and (IV) of Section 7.2.1, which carry over to definite integrals through Theorem 2). The xx in the numerator was the only obstacle; x+(π−x)=πx + (\pi - x) = \pi is a constant, which comes out of the integral.
    ∫ab(f+g) dx=∫abf dx+∫abg dx\int_a^b (f + g)\,dx = \int_a^b f\,dx + \int_a^b g\,dx and ∫abkf dx=k∫abf dx\int_a^b k f\,dx = k\int_a^b f\,dx⁠. Basics: area as a sum of thin strips
  4. An antiderivative of 11+sin⁡x\frac{1}{1+\sin x}

    Multiply top and bottom by 1−sin⁡x1 - \sin x (allowed where sin⁡x≠1\sin x \ne 1⁠, that is x≠π2x \ne \frac{\pi}{2} on our interval):

    11+sin⁡x=1−sin⁡x1−sin⁡2x=1−sin⁡xcos⁡2x=sec⁡2x−sec⁡xtan⁡x.\begin{aligned}\frac{1}{1+\sin x} &= \frac{1 - \sin x}{1 - \sin^2 x} = \frac{1 - \sin x}{\cos^2 x} \\ &= \sec^2 x - \sec x\tan x .\end{aligned}

    Both terms are standard derivatives, so an antiderivative is tan⁡x−sec⁡x\tan x - \sec x⁠. This form is undefined at x=π2x = \frac{\pi}{2}⁠, so simplify it:

    tan⁡x−sec⁡x=sin⁡x−1cos⁡x=(sin⁡x−1)(1+sin⁡x)cos⁡x (1+sin⁡x)=−cos⁡2xcos⁡x (1+sin⁡x)=−cos⁡x1+sin⁡x.\begin{aligned}\tan x - \sec x &= \frac{\sin x - 1}{\cos x} \\ &= \frac{(\sin x - 1)(1 + \sin x)}{\cos x\,(1+\sin x)} \\ &= \frac{-\cos^2 x}{\cos x\,(1 + \sin x)} = \frac{-\cos x}{1 + \sin x}.\end{aligned}

    So we take

    F(x)=−cos⁡x1+sin⁡x,F(x) = -\frac{\cos x}{1 + \sin x} ,

    which is defined and differentiable on all of [0,π][0, \pi]⁠, including x=π2x = \frac{\pi}{2}⁠, because its denominator is at least 1 (Step 1).

    Theorem 2 needs an antiderivative on the whole closed interval [0,π][0, \pi]⁠. The form tan⁡x−sec⁡x\tan x - \sec x has a gap at π2\frac{\pi}{2}⁠, right in the middle of the interval. The simplified form FF agrees with it everywhere else and fills the gap, so it is the one to use.
    Multiplying by 1−sin⁡x1−sin⁡x\frac{1 - \sin x}{1 - \sin x} is the "conjugate" trick: (1+sin⁡x)(1−sin⁡x)(1+\sin x)(1-\sin x) =1−sin⁡2x=cos⁡2x= 1 - \sin^2 x = \cos^2 x⁠. Basics: trigonometric identities
  5. Check: differentiate FF back

    Quotient rule with u=−cos⁡xu = -\cos x (u′=sin⁡xu' = \sin x⁠) and v=1+sin⁡xv = 1 + \sin x (v′=cos⁡xv' = \cos x⁠):

    F′(x)=sin⁡x (1+sin⁡x)+cos⁡xcos⁡x(1+sin⁡x)2=sin⁡x+sin⁡2x+cos⁡2x(1+sin⁡x)2=1+sin⁡x(1+sin⁡x)2=11+sin⁡x.\begin{aligned}F'(x) &= \frac{\sin x\,(1 + \sin x) + \cos x\cos x}{(1+\sin x)^2} \\ &= \frac{\sin x + \sin^2 x + \cos^2 x}{(1+\sin x)^2} \\ &= \frac{1 + \sin x}{(1+\sin x)^2} = \frac{1}{1+\sin x} .\end{aligned}

    This is the integrand of JJ at every point of [0,π][0, \pi]⁠.

    Differentiating back is the surest test of an antiderivative. It also confirms that FF works at x=π2x = \frac{\pi}{2}⁠, where the intermediate form of Step 4 did not exist.
    Here u′v=sin⁡x (1+sin⁡x)u'v = \sin x\,(1 + \sin x) and uv′=−cos⁡2xuv' = -\cos^2 x⁠, so u′v−uv′u'v - uv' has +cos⁡2x+\cos^2 x⁠; then sin⁡2x+cos⁡2x=1\sin^2 x + \cos^2 x = 1⁠. Basics: integration undoes differentiation
  6. Evaluate JJ and then II

    By Theorem 2 with FF from Step 4:

    J=F(π)−F(0)=−cos⁡π1+sin⁡π+cos⁡01+sin⁡0=−−11+11=2.\begin{aligned}J &= F(\pi) - F(0) \\ &= -\frac{\cos\pi}{1 + \sin\pi} + \frac{\cos 0}{1 + \sin 0} \\ &= -\frac{-1}{1} + \frac{1}{1} = 2 .\end{aligned}

    Then, from Step 3,

    I=π2 J=π2⋅2=π.I = \frac{\pi}{2}\,J = \frac{\pi}{2}\cdot 2 = \pi .
    cos⁡π=−1\cos\pi = -1⁠, sin⁡π=0\sin\pi = 0⁠, cos⁡0=1\cos 0 = 1⁠, sin⁡0=0\sin 0 = 0⁠. The answer is positive, as it must be: the integrand is ≥0\ge 0 on [0,π][0, \pi]⁠, so its integral is the (positive) shaded area in the figure.
    Theorem 2, Section 7.8.3: value of the antiderivative at the upper limit minus its value at the lower limit. Lesson: definite integrals
Result

∫0πx dx1+sin⁡x=π≈3.141593\int_0^{\pi}\frac{x\,dx}{1+\sin x} = \pi \approx 3.141593 (Textbook answer: π\pi⁠.)

Check it with numbers

Numerical integration of x1+sin⁡x\frac{x}{1+\sin x} over [0,π][0, \pi] gives 3.14159265358979…3.14159265358979\ldots⁠, which is π\pi to all digits shown. The same method gives J=∫0πdx1+sin⁡xJ = \int_0^{\pi}\frac{dx}{1+\sin x} =2.00000000000000= 2.00000000000000⁠, as in Step 6.

The pairing of Step 3 at one point, x=1x = 1⁠: 11+sin⁡1≈0.543044\frac{1}{1+\sin 1} \approx 0.543044 and π−11+sin⁡1≈1.162979\frac{\pi - 1}{1+\sin 1} \approx 1.162979⁠; their sum is 1.7060231.706023⁠, which equals π1+sin⁡1≈1.706023\frac{\pi}{1+\sin 1} \approx 1.706023⁠.

Common mistakes
  1. Taking xx outside the integral, as if it were a constant. Only constants can be moved out; that is exactly why P4 is needed.
  2. Writing sin⁡(π−x)=−sin⁡x\sin(\pi - x) = -\sin x⁠. It is cos⁡(π−x)\cos(\pi - x) that changes sign; sin⁡(π−x)=sin⁡x\sin(\pi - x) = \sin x⁠.
  3. Stopping at 2I=πJ2I = \pi J and reporting 2π2\pi⁠. The adding step produces 2I2I⁠; remember to divide by 2.
  4. Using tan⁡x−sec⁡x\tan x - \sec x over [0,π][0, \pi] without comment. It is not defined at π2\frac{\pi}{2}⁠. Here it happens to give the right number only because its gap is removable: it equals −cos⁡x1+sin⁡x-\frac{\cos x}{1+\sin x} wherever it is defined. Say so, or use that continuous form.
What to take away
  1. For an integral over [0,π][0, \pi] of xx times something that depends only on sin⁡x\sin x⁠, P4 and adding give ∫0πx g(sin⁡x) dx=π2∫0πg(sin⁡x) dx.\int_0^{\pi} x\,g(\sin x)\,dx = \frac{\pi}{2}\int_0^{\pi} g(\sin x)\,dx . The same trick appears in Example 30, and Q19 proves a general version of it.
  2. When an antiderivative has a gap inside the interval, simplify it until it is continuous on the whole interval before using Theorem 2.

Every fact used, and where it comes from

FactUsed inSource
A definite integral needs ff continuous on [a,b][a, b]Step 1Remark (iv) after Theorem 2, Section 7.8.3
P4: ∫0af(x) dx=∫0af(a−x) dx\int_0^a f(x)\,dx = \int_0^a f(a-x)\,dxStep 2Section 7.10, property P4 (Lesson: properties)
sin⁡(π−x)=sin⁡x\sin(\pi - x) = \sin x⁠, sin⁡2x+cos⁡2x=1\sin^2 x + \cos^2 x = 1Steps 2, 4, 5Class XI trigonometry
Integral of a sum; constants come outStep 3Section 7.2.1, Properties (III) and (IV)
∫sec⁡2x dx=tan⁡x+C\int\sec^2 x\,dx = \tan x + C⁠, ∫sec⁡xtan⁡x dx=sec⁡x+C\int\sec x\tan x\,dx = \sec x + CStep 4Section 7.2, list of standard integrals
Quotient ruleStep 5Chapter 5, Section 5.3
Theorem 2 (second fundamental theorem)Step 6Section 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 →