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

Exercise 7.2 · Q30: ∫sin⁡x1+cos⁡x dx\int\frac{\sin x}{1+\cos x}\,dx

Exercise 7.2Integration by substitution · Section 7.3.1
The question

Integrate the function (Exercise 7.2, "Integrate the functions in Exercises 1 to 37"):

sin⁡x1+cos⁡x\frac{\sin x}{1 + \cos x}
Exam answer

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

Put 1+cos⁡x=t1 + \cos x = t⁠. Then −sin⁡x dx=dt-\sin x\,dx = dt⁠.

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

∴ I=−log⁡∣1+cos⁡x∣+C\therefore\ I = -\log|1 + \cos x| + C⁠.

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

The one idea this problem is built on

The derivative of the denominator 1+cos⁡x1 + \cos x is −sin⁡x-\sin x⁠, which is the numerator up to a minus sign. So the fraction is "minus (derivative of the bottom) over (the bottom)", and such a fraction integrates to a logarithm: with t=1+cos⁡xt = 1 + \cos x⁠, the integral is −∫dtt=−log⁡∣t∣-\int\frac{dt}{t} = -\log|t|⁠.

Given, to find, and the plan
Given
f(x)=sin⁡x1+cos⁡xf(x) = \dfrac{\sin x}{1 + \cos x}⁠.
To find
∫f(x) dx\int f(x)\,dx⁠, and where the answer is valid.
Plan
(1) Find where ff is defined. (2) Substitute t=1+cos⁡xt = 1 + \cos x⁠, so sin⁡x dx=−dt\sin x\,dx = -dt⁠. (3) Integrate 1t\frac1t⁠. (4) Return to xx and see that the modulus can be dropped. (5) Differentiate back, and compare with a second route through tan⁡x2\tan\frac{x}{2}⁠.

Basics you need

1∫1t dt=log⁡∣t∣+C\int \frac1t\,dt = \log|t| + C

For t≠0t \ne 0 (standard formula (xii), Section 7.2). Basics: logarithms and 1/x

2Substitution

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

3Range of cos⁡x\cos x

−1≤cos⁡x≤1-1 \le \cos x \le 1⁠, and cos⁡x=−1\cos x = -1 exactly at odd multiples of π\pi⁠. Basics: trigonometric facts

4Half-angle identities

sin⁡x=2sin⁡x2cos⁡x2\sin x = 2\sin\frac{x}{2}\cos\frac{x}{2} and 1+cos⁡x=2cos⁡2x21 + \cos x = 2\cos^2\frac{x}{2} (used only in the second route). Basics: trigonometric identities

Solution

  1. Where is the integrand defined?

    The denominator must not be zero: 1+cos⁡x≠01 + \cos x \ne 0⁠, that is, cos⁡x≠−1\cos x \ne -1⁠, that is,

    x≠(2n+1)π,n an integer.x \ne (2n+1)\pi, \quad n \text{ an integer}.

    Since cos⁡x≥−1\cos x \ge -1 always, at every other point 1+cos⁡x>01 + \cos x > 0⁠. So on the domain the denominator is positive.

    This positivity will matter in Step 4: it lets us drop the modulus in log⁡∣1+cos⁡x∣\log|1 + \cos x|⁠. Knowing the sign of what goes into a logarithm is always worth a line.
    cos⁡π=−1\cos\pi = -1⁠, and cosine repeats every 2π2\pi⁠. Basics: trigonometric facts
  2. Substitute t=1+cos⁡xt = 1 + \cos x

    Put t=1+cos⁡xt = 1 + \cos x⁠. Then

    dtdx=−sin⁡x,sosin⁡x dx=−dt.\frac{dt}{dx} = -\sin x, \quad\text{so}\quad \sin x\,dx = -dt.

    The integral becomes

    ∫sin⁡x1+cos⁡x dx=∫−dtt=−∫dtt.\int \frac{\sin x}{1 + \cos x}\,dx = \int \frac{-dt}{t} = -\int \frac{dt}{t}.
    The numerator sin⁡x dx\sin x\,dx is, apart from the sign, the differential of the denominator. The minus sign comes from ddxcos⁡x=−sin⁡x\frac{d}{dx}\cos x = -\sin x⁠; it is easy to lose, so we write sin⁡x dx=−dt\sin x\,dx = -dt explicitly before replacing anything.
    This is the same idea the book uses for ∫tan⁡x dx\int\tan x\,dx in Section 7.3.1 (put cos⁡x=t\cos x = t⁠, sin⁡x dx=−dt\sin x\,dx = -dt⁠). Lesson: integration by substitution
  3. Integrate 1t\frac1t

    −∫dtt=−log⁡∣t∣+C.-\int \frac{dt}{t} = -\log|t| + C.
    The power rule fails for n=−1n = -1⁠; the integral of 1t\frac1t is the logarithm of ∣t∣|t|⁠. The modulus makes the formula valid for negative tt too.
    Standard formula (xii), Section 7.2. Basics: logarithms and 1/x
  4. Return to xx⁠; the modulus is harmless

    ∫sin⁡x1+cos⁡x dx=−log⁡∣1+cos⁡x∣+C.\int \frac{\sin x}{1 + \cos x}\,dx = -\log|1 + \cos x| + C.

    By Step 1, 1+cos⁡x>01 + \cos x > 0 on the whole domain, so ∣1+cos⁡x∣=1+cos⁡x|1 + \cos x| = 1 + \cos x⁠, and the answer may equally be written −log⁡(1+cos⁡x)+C-\log(1 + \cos x) + C⁠.

    The textbook keeps the modulus, which is never wrong. Here it changes nothing, because the quantity inside is already positive wherever the integrand exists.
  5. Check: differentiate the answer back

    Let F(x)=−log⁡(1+cos⁡x)F(x) = -\log(1 + \cos x)⁠. Chain rule, outer −log⁡u-\log u⁠, inner u=1+cos⁡xu = 1 + \cos x⁠:

    F′(x)=−11+cos⁡x⋅(−sin⁡x)=sin⁡x1+cos⁡x.F'(x) = -\frac{1}{1 + \cos x}\cdot(-\sin x) = \frac{\sin x}{1 + \cos x}.

    This is the integrand. ✓

    Differentiating back is the definition of an antiderivative (Property (I), Section 7.2.1). The two minus signs cancel, which confirms that the sign in Step 2 was handled correctly.
  6. A second route through tan⁡x2\tan\frac{x}{2}⁠, and why it agrees

    Using the half-angle identities,

    sin⁡x1+cos⁡x=2sin⁡x2cos⁡x22cos⁡2x2=tan⁡x2.\begin{aligned} \frac{\sin x}{1 + \cos x} &= \frac{2\sin\frac{x}{2}\cos\frac{x}{2}}{2\cos^2\frac{x}{2}} \\ &= \tan\tfrac{x}{2}. \end{aligned}

    With u=x2u = \frac{x}{2}⁠, dx=2 dudx = 2\,du⁠, and ∫tan⁡u du=−log⁡∣cos⁡u∣\int\tan u\,du = -\log|\cos u| (Section 7.3.1):

    ∫tan⁡x2 dx=−2log⁡∣cos⁡x2∣+C.\int\tan\tfrac{x}{2}\,dx = -2\log\left|\cos\tfrac{x}{2}\right| + C.

    This equals our answer up to a constant:

    −2log⁡∣cos⁡x2∣=−log⁡cos⁡2x2=−log⁡1+cos⁡x2=−log⁡(1+cos⁡x)+log⁡2.\begin{aligned} -2\log\left|\cos\tfrac{x}{2}\right| &= -\log\cos^2\tfrac{x}{2} \\ &= -\log\frac{1 + \cos x}{2} \\ &= -\log(1 + \cos x) + \log 2. \end{aligned}
    Two correct methods can give answers that look different; they must then differ by a constant (Property (II), Section 7.2.1). Here the difference is log⁡2\log 2⁠, which is absorbed into CC⁠. Seeing that both routes agree is a strong check.
    2log⁡∣a∣=log⁡a22\log|a| = \log a^2 and 1+cos⁡x=2cos⁡2x21 + \cos x = 2\cos^2\frac{x}{2}⁠. Basics: trigonometric identities
Result

∫sin⁡x1+cos⁡x dx=−log⁡∣1+cos⁡x∣+C,\int \frac{\sin x}{1 + \cos x}\,dx = -\log|1 + \cos x| + C, valid wherever cos⁡x≠−1\cos x \ne -1⁠; there 1+cos⁡x>01 + \cos x > 0⁠, so this is also −log⁡(1+cos⁡x)+C-\log(1 + \cos x) + C⁠. (Textbook answer: −log⁡∣1+cos⁡x∣+C-\log|1 + \cos x| + C⁠.)

Check it with numbers

Take x=1x = 1 and h=0.001h = 0.001⁠:

  • F(1.001)=−0.4314321F(1.001) = -0.4314321 and F(0.999)=−0.4325247F(0.999) = -0.4325247⁠,
  • slope ≈0.4325247−0.43143210.002=0.54630\approx \frac{0.4325247 - 0.4314321}{0.002} = 0.54630 (that is, F(1.001)−F(0.999)F(1.001) - F(0.999) over 0.0020.002⁠),
  • integrand: sin⁡11+cos⁡1=0.54630\frac{\sin 1}{1 + \cos 1} = 0.54630⁠, and tan⁡0.5=0.54630\tan 0.5 = 0.54630 too. ✓
Common mistakes
  1. Losing the minus sign. d(1+cos⁡x)=−sin⁡x dxd(1 + \cos x) = -\sin x\,dx⁠; the answer is −log⁡-\log⁠, not +log⁡+\log⁠.
  2. Using the power rule on t−1t^{-1}⁠. It would give t00\frac{t^0}{0}⁠, which is meaningless; the case n=−1n = -1 is exactly the one that gives a logarithm.
  3. Thinking the two routes disagree. −2log⁡∣cos⁡x2∣-2\log|\cos\frac{x}{2}| and −log⁡(1+cos⁡x)-\log(1 + \cos x) differ by the constant log⁡2\log 2⁠; both are correct.
What to take away
  1. ∫g′(x)g(x) dx=log⁡∣g(x)∣+C\int\frac{g'(x)}{g(x)}\,dx = \log|g(x)| + C⁠: whenever the numerator is the derivative of the denominator (up to a constant), expect a logarithm.
  2. Check the sign of what is inside the log; sometimes the modulus can be dropped.
  3. Different-looking answers are both right when they differ by a constant.

Every fact used, and where it comes from

FactUsed inSource
−1≤cos⁡x≤1-1 \le \cos x \le 1⁠; cos⁡x=−1\cos x = -1 at odd multiples of π\piStep 1Trigonometric functions (Class XI, Chapter 3)
Substitution: t=g(x)t = g(x)⁠, dt=g′(x) dxdt = g'(x)\,dxStep 2Section 7.3.1 (Lesson: substitution)
∫1t dt=log⁡∣t∣+C\int\frac{1}{t}\,dt = \log|t| + CStep 3Standard formula (xii), Section 7.2
∫tan⁡u du=−log⁡∣cos⁡u∣+C\int\tan u\,du = -\log|\cos u| + CStep 6Section 7.3.1, standard integral (i)
sin⁡x=2sin⁡x2cos⁡x2\sin x = 2\sin\frac{x}{2}\cos\frac{x}{2}⁠, 1+cos⁡x=2cos⁡2x21 + \cos x = 2\cos^2\frac{x}{2}Step 6Trigonometric functions (Class XI, Chapter 3)
Antiderivatives with the same derivative differ by a constantStep 6Property (II), Section 7.2.1
Chain rule; F′=fF' = f checks the answerStep 5Theorem 4, Section 5.3.1; Property (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 →