Integral of ln(sinx+cosx) with respect to x from -pi/4 to pi/4

1 answer

sin(x) + cos(x) = sqrt(2) sin(x + pi/4)

So, the integral can be written as:

pi/4 ln(2) + Integral of Log[sin(x)]dx from 0 to pi/2

Let's call the integral in here I:

I = Integral of Log[sin(x)]dx from 0 to pi/2

Then note that because sin is symmetric w.r.t. reflection about x = pi/2 integrating to pi will yield twice the value:

2 I = Integral of Log[sin(x)]dx from 0 to pi

Then substitute in this integral
x = 2 y:

2 I = 2 Integral of Log[sin(2y)]dy from 0 to pi/2 ----->

I = Integral of
(Log(2) + Log[cos(y)] +Log[sin(y)] )dy from 0 to pi/2 =

pi/2 Log(2) + 2 I

because the integral of log[cos(y)] is the same as the integral of
log[sin(y)], as cos(y) is sin(pi/2-y).

Solving for I gives:

I = -pi/2 log(2)

The original integral is thus
- pi/4 log(2)