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

Exercise 7.2 · Q29: ∫cot⁡x log⁡sin⁡x dx\int\cot x\,\log\sin 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"):

cot⁡x log⁡sin⁡x\cot x\,\log \sin x
Exam answer

Let I=∫cot⁡x log⁡sin⁡x dxI = \displaystyle\int\cot x\,\log\sin x\,dx⁠.

Put log⁡sin⁡x=t\log\sin x = t⁠. Then cot⁡x dx=dt\cot x\,dx = dt⁠.

I=∫t dt=t22+CI = \int t\,dt = \frac{t^2}{2} + C

∴ I=12(log⁡sin⁡x)2+C\therefore\ I = \dfrac12(\log\sin x)^2 + C⁠.

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

The one idea this problem is built on

Differentiate log⁡sin⁡x\log\sin x by the chain rule: 1sin⁡x⋅cos⁡x=cot⁡x\frac{1}{\sin x}\cdot\cos x = \cot x⁠. So the integrand is "a function times its own derivative". With t=log⁡sin⁡xt = \log\sin x⁠, we get dt=cot⁡x dxdt = \cot x\,dx⁠, and the integral is just ∫t dt=t22\int t\,dt = \frac{t^2}{2}⁠.

Given, to find, and the plan
Given
f(x)=cot⁡x log⁡sin⁡xf(x) = \cot x\,\log\sin x⁠, where log⁡\log is the natural logarithm (base ee⁠), as throughout the book.
To find
∫f(x) dx\int f(x)\,dx⁠, and where the answer is valid.
Plan
(1) Find where ff is defined. (2) Show ddxlog⁡sin⁡x=cot⁡x\frac{d}{dx}\log\sin x = \cot x⁠. (3) Substitute t=log⁡sin⁡xt = \log\sin x⁠. (4) Integrate and return to xx⁠. (5) Differentiate back.

Basics you need

1Logarithms need positive inputs

log⁡u\log u is defined only for u>0u > 0⁠, and ddulog⁡u=1u\frac{d}{du}\log u = \frac1u⁠. Basics: logarithms and 1/x

2Substitution

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

3Power rule

∫t dt=t22+C\int t\,dt = \frac{t^2}{2} + C (standard formula (i) with n=1n = 1⁠). Basics: powers and the power rule

4cot⁡x=cos⁡xsin⁡x\cot x = \frac{\cos x}{\sin x}

Defined where sin⁡x≠0\sin x \ne 0⁠. Basics: trigonometric facts

Solution

  1. Where is the integrand defined?

    log⁡sin⁡x\log\sin x needs sin⁡x>0\sin x > 0⁠. That also makes sin⁡x≠0\sin x \ne 0⁠, so cot⁡x\cot x is defined too. Now

    sin⁡x>0  ⟺  2nπ<x<2nπ+π,\sin x > 0 \iff 2n\pi < x < 2n\pi + \pi,

    with nn an integer. So we work on any interval (2nπ,(2n+1)π)(2n\pi, (2n+1)\pi)⁠, for example (0,π)(0, \pi)⁠.

    Where sin⁡x≤0\sin x \le 0⁠, log⁡sin⁡x\log\sin x does not exist, so the integrand does not exist either. The book's Note in Section 7.2 asks us to keep the interval in mind; here it is forced by the logarithm.
    sin⁡x>0\sin x > 0 in the first and second quadrants. Basics: logarithms
  2. The derivative of log⁡sin⁡x\log\sin x is cot⁡x\cot x

    Chain rule, with outer function log⁡u\log u and inner function u=sin⁡xu = \sin x⁠:

    ddxlog⁡sin⁡x=1sin⁡x⋅cos⁡x=cot⁡x.\frac{d}{dx}\log\sin x = \frac{1}{\sin x}\cdot\cos x = \cot x.
    This is the observation that unlocks the problem: the integrand contains log⁡sin⁡x\log\sin x and its derivative cot⁡x\cot x⁠. The book's advice (Section 7.3.1) is to substitute for the function whose derivative also occurs in the integrand.
    ddulog⁡u=1u\frac{d}{du}\log u = \frac1u for u>0u > 0 (Section 5.4); chain rule, Theorem 4, Section 5.3.1.
  3. Substitute t=log⁡sin⁡xt = \log\sin x

    Put t=log⁡sin⁡xt = \log\sin x⁠. By Step 2,

    dt=cot⁡x dx.dt = \cot x\,dx.

    Then

    ∫cot⁡x log⁡sin⁡x dx=∫log⁡sin⁡x⋅(cot⁡x dx)=∫t dt.\begin{aligned} \int \cot x\,\log\sin x\,dx &= \int \log\sin x\cdot(\cot x\,dx) \\ &= \int t\,dt. \end{aligned}
    The factor log⁡sin⁡x\log\sin x becomes tt and the rest, cot⁡x dx\cot x\,dx⁠, becomes dtdt⁠. Nothing in xx remains. As xx runs over (0,π)(0, \pi)⁠, sin⁡x\sin x runs over (0,1](0, 1]⁠, so tt runs over (−∞,0](-\infty, 0]⁠: tt is never positive, which is fine for ∫t dt\int t\,dt⁠.
  4. Integrate and return to xx

    ∫t dt=t22+C=12(log⁡sin⁡x)2+C.\int t\,dt = \frac{t^2}{2} + C = \tfrac12(\log\sin x)^2 + C.
    Power rule with n=1n = 1⁠. Then tt is replaced by log⁡sin⁡x\log\sin x⁠. Note (log⁡sin⁡x)2(\log\sin x)^2 means the square of the logarithm, not log⁡(sin⁡2x)\log(\sin^2 x)⁠.
    Standard formula (i), Section 7.2. Basics: power rule
  5. Check: differentiate the answer back

    Let F(x)=12(log⁡sin⁡x)2F(x) = \frac12(\log\sin x)^2⁠. Chain rule, outer 12u2\frac12u^2⁠, inner u=log⁡sin⁡xu = \log\sin x with u′=cot⁡xu' = \cot x (Step 2):

    F′(x)=12⋅2log⁡sin⁡x⋅cot⁡x=cot⁡x log⁡sin⁡x.F'(x) = \tfrac12\cdot 2\log\sin x\cdot\cot x = \cot x\,\log\sin x.

    This is the integrand. ✓

    An antiderivative is confirmed by differentiating it (Property (I), Section 7.2.1).
Result

∫cot⁡x log⁡sin⁡x dx=12(log⁡sin⁡x)2+C,\int \cot x\,\log\sin x\,dx = \tfrac12(\log\sin x)^2 + C, valid where sin⁡x>0\sin x > 0⁠, that is, 2nπ<x<(2n+1)π2n\pi < x < (2n+1)\pi⁠. (Textbook answer: 12(log⁡sin⁡x)2+C\frac12(\log\sin x)^2 + C⁠.)

Check it with numbers

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

  • F(0.501)=0.2688926F(0.501) = 0.2688926 and F(0.499)=0.2715840F(0.499) = 0.2715840⁠,
  • slope ≈0.2688926−0.27158400.002=−1.3457\approx \frac{0.2688926 - 0.2715840}{0.002} = -1.3457⁠,
  • integrand: cot⁡0.5 log⁡sin⁡0.5=−1.3457\cot 0.5\,\log\sin 0.5 = -1.3457⁠. ✓

The integrand is negative here because sin⁡0.5<1\sin 0.5 < 1 makes log⁡sin⁡0.5<0\log\sin 0.5 < 0⁠, while cot⁡0.5>0\cot 0.5 > 0⁠.

Common mistakes
  1. Substituting t=sin⁡xt = \sin x instead. Then dt=cos⁡x dxdt = \cos x\,dx and you are left with ∫log⁡tt dt\int\frac{\log t}{t}\,dt⁠, which needs a second substitution. Take the whole log⁡sin⁡x\log\sin x as tt⁠.
  2. Thinking ddxlog⁡sin⁡x=1sin⁡x\frac{d}{dx}\log\sin x = \frac{1}{\sin x}⁠. The chain rule adds the factor cos⁡x\cos x⁠.
  3. Confusing (log⁡sin⁡x)2(\log\sin x)^2 with log⁡sin⁡2x\log\sin^2 x⁠. These are different functions.
  4. Ignoring the domain. The answer is only meaningful where sin⁡x>0\sin x > 0⁠.
What to take away
  1. ∫g(x) g′(x) dx=12 g(x)2+C\int g(x)\,g'(x)\,dx = \frac12\,g(x)^2 + C⁠: a function times its own derivative.
  2. ddxlog⁡sin⁡x=cot⁡x\frac{d}{dx}\log\sin x = \cot x and ddxlog⁡cos⁡x=−tan⁡x\frac{d}{dx}\log\cos x = -\tan x (on their domains) are worth recognising on sight.
  3. A logarithm in the integrand fixes the domain: its argument must be positive.

Every fact used, and where it comes from

FactUsed inSource
log⁡u\log u defined for u>0u > 0⁠; ddulog⁡u=1u\frac{d}{du}\log u = \frac1uSteps 1, 2Section 5.4
cot⁡x=cos⁡xsin⁡x\cot x = \frac{\cos x}{\sin x}Step 2Trigonometric functions (Class XI, Chapter 3)
Chain ruleSteps 2, 5Theorem 4, Section 5.3.1
Substitution: t=g(x)t = g(x)⁠, dt=g′(x) dxdt = g'(x)\,dxStep 3Section 7.3.1 (Lesson: substitution)
∫tn dt=tn+1n+1+C\int t^n\,dt = \frac{t^{n+1}}{n+1} + C⁠, n≠−1n \ne -1Step 4Standard formula (i), Section 7.2
ddx∫f(x) dx=f(x)\frac{d}{dx}\int f(x)\,dx = f(x)Step 5Property (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 →