# What is $\int\log(\sin x)~dx$?

I know that the value of the integral of $\cot(x)$ is $\log|\sin x|+C$ .

$$\int\log(\sin x)~dx$$

Is there any easy way to find an antiderivative for this? Thanks.

• I don't think there is a representation of the antiderivative of $\log(|\sin x|)$ in terms of elementary functions, so no. You can however do this by using the power series expansion for $\log$ and integrate term by term if you are willing to toss aside elementary functions. – Cameron Williams Sep 25 '13 at 17:19
• However, the integral under consideration can be expressed in a closed form. – user64494 Sep 25 '13 at 19:04
• en.wikipedia.org/wiki/Clausen_function SEE ALSO journal page 17, (pdf page 9), of projecteuclid.org/… – Will Jagy Sep 25 '13 at 21:48

No such antiderivative can be written using elementary functions.

Rather than $\log (\sin x)$, let us consider the equivalently difficult $\log (\cos x)$.

Using integration by parts, we find:

$$\int \log(\cos x) = x\log(\cos x) + \int x \tan x dx$$

Now, finding the antiderivative means tackling $x \tan x$, and this latter expression has no antiderivative with elementary functions. This result follows from a theorem of Liouville (see, e.g., here) and the specifics of the argument for $x \tan x$ can be found here.

• The cite "One can (easily) produce an elementary diﬀerential ﬁeld extension of the rational function ﬁeld R(x) containing arctan x (we are assuming the standard derivative), but not one with no new constants. Indeed, it is not hard to show that 1/(x^ 2 + 1) cannot be written in the form (i) of the statement Theorem 5.3 (see p: 598 of [Ros2]). This indicates the importance of the no new constant hypothesis in the statement of Liouville’s Theorem" . Could you explain how this implies your claim? – user64494 Sep 25 '13 at 18:40
• If you are asking about specifics for $\int x \tan x dx$ then I suggest you click on the latter link, where it is dealt with explicitly. – Benjamin Dickman Sep 25 '13 at 18:44
• I did it and cited that sourse. – user64494 Sep 25 '13 at 18:49
• Peter Mueller refers to the article difficult to access. – user64494 Sep 25 '13 at 19:10
• @user64494, see pages 17-18 in projecteuclid.org/… and then, if you can find it, the follow-up article mentioned, ams.org/mathscinet-getitem?mr=719313 – Will Jagy Sep 25 '13 at 22:23

The indefinite integral cannot be expressed in terms of elementary functions. However the definite integral from $0$ to $\pi/2$ (or $\pi$) can be avalauted as shown below. $$I=\int_0^{\pi/2} \log(\sin(x)) dx = - \dfrac{\pi \log2}2$$ The above can be evaluated as follows. We have $$I=\underbrace{\int_0^{\pi/2} \log(\sin(x)) dx = -\int_{\pi/2}^0 \log(\cos(y)) dy}_{y = \pi/2-x} = \int_0^{\pi/2} \log(\cos(x))dx$$ Hence, $$I+I = \int_0^{\pi/2} \log(\sin(x)) dx + \int_0^{\pi/2} \log(\cos(x)) dx = \int_0^{\pi/2} \log(\sin(x) \cos(x))dx$$ Hence, $$2I = \int_0^{\pi/2} \log(\sin(2x))dx - \dfrac{\pi}2 \log2 = \dfrac12\int_0^{\pi} \log(\sin(x)) dx - \dfrac{\pi}2 \log2 = I - \dfrac{\pi}2 \log2$$ Hence, we get that $$I = -\dfrac{\pi}2 \log2$$

using $$\ln \sin x =-\ln 2-\sum_{n=1}^{\infty}\frac{\cos(2nx)}{n}, \ x \in [0,\pi].$$

$$\int \ln(\sin x)dx=-\ln(2)\int dx-\sum^{\infty}_{n=1}\frac{1}{n}\int (\cos 2nx)dx$$

$$=-\ln(2)\cdot x-\sum^{\infty}_{n=1}\frac{\sin(2nx)}{2n^2}+\mathcal{C}$$

The Maple command $$int(ln(abs(sin(x))), x);$$ outputs $$i\ln \left( 2 \right) \ln \left( {{\rm e}^{ix}} \right) -i\ln \left( {{\rm e}^{ix}} \right) \ln \left( {\frac {-i \left( \left( { {\rm e}^{ix}} \right) ^{2}-1 \right) {\it signum} \left( \sin \left( x \right) \right) }{{{\rm e}^{ix}}}} \right) -1/2\,i \left( \ln \left( {{\rm e}^{ix}} \right) \right) ^{2}+i\ln \left( {{\rm e}^{ix }} \right) \ln \left( {{\rm e}^{ix}}+1 \right) +i{\it dilog} \left( { {\rm e}^{ix}}+1 \right) -i{\it dilog} \left( {{\rm e}^{ix}} \right) .$$

PS. The Mathematica command $$Integrate[Log[Abs[Sin[x]]], x, Assumptions -> x > 0\, \&\& x < Pi/2]$$ outputs $$Piecewise[{{I [Pi] x - x Log[1 - E^{2 I x}] + x Log[Sin[x]] + 1/2 I (x^2 + PolyLog[2, E^{2 I x}]), Sin[x] < 0}}, -x Log[1 - E^{2 I x}] + x Log[Sin[x]] + 1/2 I (x^2 + PolyLog[2, E^{2 I x}])] .$$

PPS. Because the formulatian of the question under consideration was edited from $\int \ln|sin(x)|\,dx$ to $\int \ln(sin(x))\,dx$ after my answer, I would like to add that the Maple command $$int(ln(sin(x)), x)$$ outputs it in a closed form $$-x\ln \left( 1-{{\rm e}^{2\,ix}} \right) +x\ln \left( \sin \left( x \right) \right) +1/2\,i{x}^{2}+1/2\,i{\it polylog} \left( 2,{{\rm e} ^{2\,ix}} \right) .$$

• What is the meaning of 'signum' and 'dilog'? I never heard it before. – akusaja Sep 25 '13 at 17:23
• These are standard notations: see dilog and signum for info. – user64494 Sep 25 '13 at 17:27