← 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(sinx)dx=π2log2\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(sinx)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(ax)dx\int_0^a f(x)\,dx = \int_0^a f(a-x)\,dx with a=π2a = \tfrac{\pi}{2}. Replacing xx by π2x\tfrac{\pi}{2} - x and using sin ⁣(π2x)=cosx\sin\!\left(\tfrac{\pi}{2} - x\right) = \cos x gives

I=0π/2log ⁣(sin ⁣(π2x))dx=0π/2log(cosx)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(sinx)+log(cosx))dx=0π/2log(sinxcosx)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 loga+logb=log(ab)\log a + \log b = \log(ab).

The log 2 trick

To turn sinxcosx\sin x \cos x into sin2x\sin 2x, add and subtract log2\log 2:

2I=0π/2log(2sinxcosx)dx0π/2log2dx.2I = \int_0^{\pi/2} \log(2\sin x \cos x)\,dx - \int_0^{\pi/2} \log 2\,dx.

Since 2sinxcosx=sin2x2\sin x \cos x = \sin 2x, and the second integral is a constant times the length of the interval,

2I=0π/2log(sin2x)dxlog2π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(sin2x)dx.I_1 = \int_0^{\pi/2} \log(\sin 2x)\,dx.

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

I1=120πlog(sint)dt.I_1 = \frac{1}{2}\int_0^{\pi} \log(\sin t)\,dt.

Folding back with symmetry

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

I1=1220π/2log(sint)dt=0π/2log(sint)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π2log2.2I = I - \frac{\pi}{2}\log 2.

So 2II=π2log22I - I = -\tfrac{\pi}{2}\log 2, which gives

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

Key takeaways

  • 0π/2log(sinx)dx=0π/2log(cosx)dx=π2log2\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(ax)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 log2\log 2 creates sin2x\sin 2x, and the symmetry property folds the integral back onto itself so you can solve for II directly.