← Back to all lessons
Class 12Calculus5:51Published 16 Oct 2025

Prove the Integral of log sin x from 0 to pi/2

A step-by-step proof of the standard result that the integral of log sin x from 0 to pi/2 equals minus pi over 2 times log 2, using the properties of definite integrals.

This lesson proves a classic definite integral result that is worth memorising for exams. Starting from the integral of log sin x over 0 to pi/2, it uses the king property to swap sine for cosine, adds the two forms, and brings in a log 2 trick to split the integral. A substitution then folds the result back on itself, letting you solve for the value and arrive at minus pi over 2 times log 2.

What you'll learn

  • How to use the property that replaces x with the upper limit minus x to rewrite a definite integral
  • How adding the sine and cosine forms of the integral simplifies the problem
  • How a substitution and a symmetry property let the integral fold back on itself so you can solve for its value

Lesson chapters

0:00The result to prove
0:30Applying the king property to swap sine for cosine
1:24Adding the two forms and the log 2 trick
3:06Substituting 2x = t and changing the limits
4:00Using symmetry to fold the integral back
5:14Solving for I and the final result

Lesson notes

This lesson proves the standard result that ∫0π/2log⁡(sin⁡x) dx=−π2log⁡2\int_0^{\pi/2} \log(\sin x)\,dx = -\tfrac{\pi}{2}\log 2. It is both a worked proof and a result worth remembering, since the same value appears in many exam questions. The whole proof rests on the properties of definite integrals.

Setting up the integral

Let

I=∫0π/2log⁡(sin⁡x) dx.I = \int_0^{\pi/2} \log(\sin x)\,dx.

This is equation (1).

Applying the king property

Use the property ∫0af(x) dx=∫0af(a−x) dx\int_0^a f(x)\,dx = \int_0^a f(a-x)\,dx with a=π2a = \tfrac{\pi}{2}. Replacing xx by π2−x\tfrac{\pi}{2} - x and using sin⁡ ⁣(π2−x)=cos⁡x\sin\!\left(\tfrac{\pi}{2} - x\right) = \cos x gives

I=∫0π/2log⁡ ⁣(sin⁡ ⁣(π2−x))dx=∫0π/2log⁡(cos⁡x) dx.I = \int_0^{\pi/2} \log\!\left(\sin\!\left(\tfrac{\pi}{2} - x\right)\right) dx = \int_0^{\pi/2} \log(\cos x)\,dx.

This is equation (2).

Adding the two forms

Adding equations (1) and (2):

2I=∫0π/2(log⁡(sin⁡x)+log⁡(cos⁡x)) dx=∫0π/2log⁡(sin⁡xcos⁡x) dx,2I = \int_0^{\pi/2} \big(\log(\sin x) + \log(\cos x)\big)\,dx = \int_0^{\pi/2} \log(\sin x \cos x)\,dx,

using log⁡a+log⁡b=log⁡(ab)\log a + \log b = \log(ab).

The log 2 trick

To turn sin⁡xcos⁡x\sin x \cos x into sin⁡2x\sin 2x, add and subtract log⁡2\log 2:

2I=∫0π/2log⁡(2sin⁡xcos⁡x) dx−∫0π/2log⁡2 dx.2I = \int_0^{\pi/2} \log(2\sin x \cos x)\,dx - \int_0^{\pi/2} \log 2\,dx.

Since 2sin⁡xcos⁡x=sin⁡2x2\sin x \cos x = \sin 2x, and the second integral is a constant times the length of the interval,

2I=∫0π/2log⁡(sin⁡2x) dx−log⁡2⋅π2.2I = \int_0^{\pi/2} \log(\sin 2x)\,dx - \log 2 \cdot \frac{\pi}{2}.

Call this equation (3).

Evaluating the remaining integral

Let

I1=∫0π/2log⁡(sin⁡2x) dx.I_1 = \int_0^{\pi/2} \log(\sin 2x)\,dx.

Substitute 2x=t2x = t, so 2 dx=dt2\,dx = dt and dx=12 dtdx = \tfrac{1}{2}\,dt. When x=0x = 0, t=0t = 0; when x=π2x = \tfrac{\pi}{2}, t=πt = \pi. Therefore

I1=12∫0πlog⁡(sin⁡t) dt.I_1 = \frac{1}{2}\int_0^{\pi} \log(\sin t)\,dt.

Folding back with symmetry

Apply the property ∫02af(x) dx=2∫0af(x) dx\int_0^{2a} f(x)\,dx = 2\int_0^{a} f(x)\,dx when f(2a−x)=f(x)f(2a - x) = f(x). Here 2a=π2a = \pi, and sin⁡(π−t)=sin⁡t\sin(\pi - t) = \sin t, so log⁡(sin⁡(π−t))=log⁡(sin⁡t)\log(\sin(\pi - t)) = \log(\sin t) and the condition holds. Thus

I1=12⋅2∫0π/2log⁡(sin⁡t) dt=∫0π/2log⁡(sin⁡t) dt=I,I_1 = \frac{1}{2}\cdot 2\int_0^{\pi/2} \log(\sin t)\,dt = \int_0^{\pi/2} \log(\sin t)\,dt = I,

since the variable of integration is just a dummy name.

Solving for I

Put I1=II_1 = I back into equation (3):

2I=I−π2log⁡2.2I = I - \frac{\pi}{2}\log 2.

So 2I−I=−π2log⁡22I - I = -\tfrac{\pi}{2}\log 2, which gives

I=−π2log⁡2.I = -\frac{\pi}{2}\log 2.

Key takeaways

  • ∫0π/2log⁡(sin⁡x) dx=∫0π/2log⁡(cos⁡x) dx=−π2log⁡2\int_0^{\pi/2} \log(\sin x)\,dx = \int_0^{\pi/2} \log(\cos x)\,dx = -\tfrac{\pi}{2}\log 2.
  • The king property ∫0af(x) dx=∫0af(a−x) dx\int_0^a f(x)\,dx = \int_0^a f(a-x)\,dx turns sine into cosine and lets you add the two forms.
  • Adding and subtracting log⁡2\log 2 creates sin⁡2x\sin 2x, and the symmetry property folds the integral back onto itself so you can solve for II directly.