Logarithms, Trignometry, Integrals (Part 3)

Calculus Level 5

0 π / 2 ln ( cos ( tan x ) ) d x \large \int_0^{\pi /2} \ln \left( \left | \cos(\tan x ) \right | \right) \, dx

The value of the integral above is equal to A π B ( ln ( C + e D F ) ) \dfrac {A\pi }B \left( \ln\left( \dfrac{C+e^{-D}}F \right) \right)

where A , B , C , D A,B,C,D and F F are positive integers with A , B A,B coprime and e = lim n ( 1 + 1 n ) n 2.71828 \displaystyle e = \lim_{n\to\infty} \left( 1 + \dfrac1n\right)^n \approx 2.71828 .

Compute A + B + C + D + F A+B+C+D+F .


The answer is 8.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Mark Hennings
Dec 30, 2015

Firstly, the substitution u = tan x u = \tan x gives us 0 1 2 π ln ( cos ( tan x ) ) d x = 0 ln cos u u 2 + 1 d u = 1 2 0 ln ( cos 2 u ) u 2 + 1 d u \int_0^{\frac12\pi} \ln\big(\big\vert\cos(\tan x)\big\vert \big)\,dx \; = \; \int_0^\infty \frac{\ln \vert \cos u\vert}{u^2+1}\,du \; = \; \tfrac12\int_0^\infty \frac{\ln(\cos^2u)}{u^2+1}\,du We could look this last integral in tables of integrals, but let's work it out. If I m z > 0 \mathrm{Im}z > 0 then, since e 2 i z = e 2 I m z < 1 |e^{2iz}| = e^{-2\mathrm{Im}z} < 1 , 1 + e 2 i z 1 + e^{2iz} has positive real part. Thus we can define log ( 1 2 ( 1 + e 2 i z ) ) \log(\tfrac12(1+e^{2iz})) for any complex number with positive imaginary part, using the principal branch of the logarithm. In addition log ( 1 2 ( 1 + e 2 i z ) ) + log ( 1 2 ( 1 + e 2 i w ) ) = log ( 1 4 ( 1 + e 2 i z ) ( 1 + e 2 i w ) ) \log(\tfrac12(1 + e^{2iz})) + \log(\tfrac12(1 + e^{2iw})) \; = \; \log\big(\tfrac14(1 + e^{2iz})(1 + e^{2iw})\big) for any z , w z,w with positive imaginary part. The function F ( z ) = log ( 1 2 ( 1 + e 2 i z ) ) z 2 + 1 F(z) \; = \; \frac{\log(\frac12(1 + e^{2iz}))}{z^2+1} is analytic for the upper half plane of complex numbers with positive imaginary part, with the point i i removed.

For any 0 < ε < 1 0 < \varepsilon < 1 and integer N 1 N \ge 1 , let Γ ϵ , N \Gamma_{\epsilon,N} be the contour γ 1 + γ R + γ 2 δ ϵ \gamma_1 + \gamma_R + \gamma_2 - \delta_\epsilon consisting of

  • the line segment γ 1 = [ ϵ , π N ] \gamma_1 = [\epsilon,\pi N] ,
  • the anticlockwise semicircular arc γ N \gamma_N given by z = π N e i θ z \,=\, \pi N e^{i\theta} for 0 θ π 0 \le \theta \le \pi ,
  • the line segment γ 2 = [ π N , ϵ ] \gamma_2 = [-\pi N,-\epsilon] ,
  • the anticlockwise semicircular arc δ ϵ \delta_\epsilon given by z = ϵ e i θ z \,=\, \epsilon e^{i\theta} for 0 θ < π 0 \le \theta < \pi .

Then Γ ϵ , N F ( z ) d z = 2 π i R e s z = i F ( z ) = 2 π i 1 2 i ln ( 1 2 ( 1 + e 2 ) ) = π ln ( 1 2 ( 1 + e 2 ) ) \int_{\Gamma_{\epsilon,N}}F(z)\,dz \; = \; 2\pi i \mathrm{Res}_{z=i} F(z) \; = \; 2\pi i \dfrac{1}{2i}\ln\big(\tfrac12(1 + e^{-2})\big) \; = \; \pi \ln\big(\tfrac12(1 + e^{-2})\big) Now ( γ 1 + γ 2 ) F ( z ) d z = ( ϵ π N + π N ϵ ) F ( x ) d x = ϵ π N ( F ( x ) + F ( x ) ) d x = ϵ π N log ( 1 2 ( 1 + e 2 i x ) ) + log ( 1 2 ( 1 + e 2 i x ) ) x 2 + 1 d x = ϵ π N log ( 1 4 ( 1 + e 2 i x ) ( 1 + e 2 i x ) ) x 2 + 1 d x = ϵ π N ln ( 1 2 ( 1 + cos 2 x ) ) x 2 + 1 d x = ϵ π N ln ( cos 2 x ) x 2 + 1 d x \begin{array}{rcl} \displaystyle\left(\int_{\gamma_1} + \int_{\gamma_2}\right)F(z)\,dz & = & \displaystyle \left(\int_{\epsilon}^{\pi N} + \int_{-\pi N}^{-\epsilon}\right) F(x)\,dx \; = \; \int_\epsilon^{\pi N} \big(F(x) + F(-x)\big)\,dx \\ & = & \displaystyle \int_\epsilon^{\pi N} \frac{\log\big(\frac12(1 + e^{2ix})\big) + \log \big(\frac12(1 + e^{-2ix})\big)}{x^2+1}\,dx \\ & = & \displaystyle\int_\epsilon^{\pi N} \frac{\log\big(\tfrac14(1 + e^{2ix})(1 + e^{-2ix})\big)}{x^2+1}\,dx \; = \; \int_\epsilon^{\pi N} \frac{\ln\big(\tfrac12(1 + \cos2x)\big)}{x^2+1}\,dx \\ & = & \displaystyle\int_\epsilon^{\pi N} \frac{\ln(\cos^2x)}{x^2+1}\,dx \end{array} Now the periodicity property of e 2 i z e^{2iz} can be used to show that there exists k > 0 k > 0 such that k 1 2 ( 1 + e 2 i z ) 1 k \le \big\vert\tfrac12(1 + e^{2iz})\big| \le 1 for all z γ N z \in \gamma_N for all N N N \in \mathbb{N} , which implies that log ( 1 2 ( 1 + e 2 i z ) ) \log\big(\tfrac12(1 + e^{2iz})\big) is uniformly bounded on γ N \gamma_N for all N N . This implies that γ N F ( z ) d z = O ( N 1 ) N . \int_{\gamma_N} F(z)\,dz \; = \; O\big(N^{-1}\big) \qquad \qquad N \to \infty \;. On the other hand, it is possible (if a bit fiddly) to show that δ ϵ F ( z ) d z = O ( ϵ ln ϵ ) ϵ 0 . \int_{\delta_\epsilon} F(z)\,dz \; = \; O\big(\epsilon \ln \epsilon\big) \qquad \qquad \epsilon \to 0 \;. Letting ϵ 0 \epsilon \to 0 and N N \to \infty , we deduce that 0 1 2 π ln ( cos ( tan x ) ) d x = 1 2 0 ln ( cos 2 u ) u 2 + 1 d u = 1 2 π ln ( 1 2 ( 1 + e 2 ) ) \int_0^{\frac12\pi} \ln\big(\big\vert\cos(\tan x)\big\vert \big)\,dx \; = \; \tfrac12\int_0^\infty \frac{\ln(\cos^2u)}{u^2+1}\,du \; = \; \tfrac12\pi\ln\big(\tfrac12(1 + e^{-2})\big) making the answer 1 + 2 + 1 + 2 + 2 = 8 1 + 2 + 1 + 2 + 2 = 8 .

It can be done with the help of fourier series also, by the way nice solution.

Ronak Agarwal - 5 years, 5 months ago

Log in to reply

Post yours as well! =D =D =D =D

Pi Han Goh - 5 years, 5 months ago

Interesting explanation. I want to learn more.

A Former Brilliant Member - 5 years, 5 months ago
Ronak Agarwal
Dec 30, 2015

Put tan x = y \tan{x}=y , to get our integral as :

I = 1 2 0 ln cos 2 x 1 + x 2 d x \displaystyle I = \frac { 1 }{ 2 } \int _{ 0 }^{ \infty }{ \frac { \ln { \cos ^{ 2 }{ x } } }{ 1+{ x }^{ 2 } } dx }

Now using the fourier expansion of 1 2 ln cos 2 x = k = 1 ( 1 ) k 1 k cos ( 2 k x ) ln ( 2 ) \displaystyle \frac { 1 }{ 2 } \ln { \cos ^{ 2 }{ x } } =\sum _{ k=1 }^{ \infty }{ \frac { { (-1) }^{ k-1 } }{ k } \cos { (2kx) } - \ln(2) } , we get :

I = 0 k = 1 ( 1 ) k 1 k cos ( 2 k x ) 1 + x 2 d x π ln ( 2 ) 2 \displaystyle I = \int _{ 0 }^{ \infty }{ \sum _{ k=1 }^{ \infty }{ \frac { { (-1) }^{ k-1 } }{ k } \frac { \cos { (2kx) } }{ 1+{ x }^{ 2 } } } dx } - \dfrac{\pi \ln(2)}{2}

Interchanging summation and integral we have :

I = k = 1 ( 1 ) k 1 k 0 cos ( 2 k x ) 1 + x 2 d x π ln ( 2 ) 2 \displaystyle I = \sum _{ k=1 }^{ \infty }{ \frac { { (-1) }^{ k-1 } }{ k } \int _{ 0 }^{ \infty }{ \frac { \cos { (2kx) } }{ 1+{ x }^{ 2 } } dx } }- \dfrac{\pi \ln(2)}{2}

Using the well known result 0 cos ( 2 k x ) 1 + x 2 d x = π 2 e 2 k \displaystyle \int _{ 0 }^{ \infty }{ \frac { \cos { (2kx) } }{ 1+{ x }^{ 2 } } dx } =\frac { \pi }{ 2{ e }^{ 2k } }

We get our integral as :

I = k = 1 ( 1 ) k 1 k π 2 e 2 k π ln ( 2 ) 2 \displaystyle I = \sum _{ k=1 }^{ \infty }{ \frac { { (-1) }^{ k-1 } }{ k } \frac { \pi }{ 2{ e }^{ 2k } } } - \dfrac{\pi \ln(2)}{2}

I = π 2 k = 1 ( 1 ) k 1 e 2 k k π 2 ln ( 2 ) = π 2 ln ( 1 + e 2 ) π 2 ln ( 2 ) \displaystyle I = \frac { \pi }{ 2 } \sum _{ k=1 }^{ \infty }{ \frac { { (-1) }^{ k-1 }{ e }^{ -2k } }{ k } } -\frac { \pi }{ 2 } \ln { (2) } =\frac { \pi }{ 2 } \ln { (1+{ e }^{ -2 }) } -\frac { \pi }{ 2 } \ln { (2) }

I = π 2 ln ( 1 + e 2 2 ) \Rightarrow \boxed{\displaystyle I =\frac { \pi }{ 2 } \ln { \left( \frac { 1+{ e }^{ -2 } }{ 2 } \right) } }

There are a number of points you need to consider about this argument. The Fourier series of a function, in general, converges as a series in L 2 ( 0 , 2 π ) L^2(0,2\pi) . It is certainly possible to take the integral of the Fourier series term-by-term with an element of L 2 ( 0 , 2 π ) L^2(0,2\pi) . For example, there would be no problem integrating 0 2 π ln cos 2 x x 2 + 1 d x \int_0^{2\pi} \dfrac{\ln \cos^2x}{x^2+1}\,dx using the Fourier series expansion. Integrating the Fourier series from 0 0 to \infty against 1 x 2 + 1 \tfrac{1}{x^2+1} takes more thought; while the Fourier series converges pointwise except at odd multiples of 1 2 π \tfrac12\pi , it does not do so monotonically, and hence the MCT does not apply. The trick can be justified (you could use the DCT, or add up the integrals from 2 n π 2n\pi to 2 ( n + 1 ) π 2(n +1)\pi , using the periodicity of the Fourier series) but it is not elementary, and not something to be done without comment!

Also, when you apply the well-known formulae 0 cos 2 k x x 2 + 1 d x = π 2 e 2 k \int_0^\infty \frac{\cos 2kx}{x^2+1}\,dx \; = \; \frac{\pi}{2e^{2k}} you are appealing to a result most easily proved using contour integration. I know from your other post that you haven't learned complex analysis yet; I hope you get a chance soon, since it will make a lot of these calculations easier.

Mark Hennings - 5 years, 5 months ago

Log in to reply

The well known formulae can also be proved using real methods alone ,

Let f ( a ) = 0 cos ( a x ) 1 + x 2 d x \displaystyle f(a) = \int _{ 0 }^{ \infty }{ \frac { \cos { (ax) } }{ 1+{ x }^{ 2 } } dx } , for positive a a

Differentiating it we have :

f ( a ) = 0 x sin ( a x ) 1 + x 2 d x \displaystyle f'(a) = -\int _{ 0 }^{ \infty }{ \frac { x\sin { (ax) } }{ 1+{ x }^{ 2 } } dx }

Integration f ( a ) f(a) by parts we have :

f ( a ) = sin ( a x ) a ( 1 + x 2 ) 0 + 2 a 0 x sin ( a x ) ( 1 + x 2 ) 2 d x = 2 a 0 x sin ( a x ) ( 1 + x 2 ) 2 d x \displaystyle f(a) = \frac { \sin { (ax) } }{ a(1+{ x }^{ 2 }) } { | }_{ 0 }^{ \infty }+\frac { 2 }{ a } \int _{ 0 }^{ \infty }{ \frac { x\sin { (ax) } }{ { (1+{ x }^{ 2 }) }^{ 2 } } dx } =\frac { 2 }{ a } \int _{ 0 }^{ \infty }{ \frac { x\sin { (ax) } }{ { (1+{ x }^{ 2 }) }^{ 2 } } dx }

a f ( a ) 2 = 0 x sin ( a x ) ( 1 + x 2 ) 2 d x \displaystyle \Rightarrow \frac{af(a)}{2} = \int _{ 0 }^{ \infty }{ \frac { x\sin { (ax) } }{ { (1+{ x }^{ 2 }) }^{ 2 } } dx }

Double differentiating both side with respect to a a we have :

a f ( a ) 2 + f ( a ) = 0 x 3 sin ( a x ) ( 1 + x 2 ) 2 d x \displaystyle \frac{af''(a)}{2}+f'(a) = -\int _{ 0 }^{ \infty }{ \frac { { x }^{ 3 }\sin { (ax) } }{ { (1+{ x }^{ 2 }) }^{ 2 } } dx }

It can be also written as :

a f ( a ) 2 + f ( a ) = 0 x sin ( a x ) 1 + x 2 d x + 0 x sin ( a x ) ( 1 + x 2 ) 2 d x \displaystyle \frac{af''(a)}{2}+f'(a) = -\int _{ 0 }^{ \infty }{ \frac { x\sin { (ax) } }{ 1+{ x }^{ 2 } } dx } +\int _{ 0 }^{ \infty }{ \frac { x\sin { (ax) } }{ { (1+{ x }^{ 2 }) }^{ 2 } } dx }

a f ( a ) 2 + f ( a ) = f ( a ) + a f ( a ) 2 \displaystyle \Rightarrow \frac { af''(a) }{ 2 } +f'(a)=f'(a)+\frac { af(a) }{ 2 }

Finally we have :

f ( a ) = f ( a ) \displaystyle f''(a)=f(a)

The solution of differential equation is :

f ( a ) = c 1 e a + c 2 e a \displaystyle f(a) = {c}_{1}{e}^{a}+{c}_{2}{e}^{-a}

It is easy to check that f ( 0 ) = π 2 f(0)=\dfrac{\pi}{2}

Now f ( a ) = 0 x sin ( a x ) 1 + x 2 d x = 0 x sin ( x ) a 2 + x 2 d x \displaystyle f'(a) = -\int _{ 0 }^{ \infty }{ \frac { x\sin { (ax) } }{ 1+{ x }^{ 2 } } dx } =-\int _{ 0 }^{ \infty }{ \frac { x\sin { (x) } }{ { a }^{ 2 }+{ x }^{ 2 } } dx }

That also proves that f ( 0 ) = 0 sin ( x ) x d x = π 2 \displaystyle f'(0) = -\int _{ 0 }^{ \infty }{ \frac { \sin { (x) } }{ x } dx } =-\frac { \pi }{ 2 }

So with these set of initial values we can establish that :

f ( a ) = π 2 e a \displaystyle f(a) = \frac { \pi }{ 2{ e }^{ a } }

Ronak Agarwal - 5 years, 5 months ago

Log in to reply

Yes, it can be evaluated by real methods, and your technique is fine (if you take a little care with infinite Riemann integrals like the one you have for f ( a ) f'(a) ). However, I said it could be evaluated "most easily" using complex methods.

If you integrate e i k z z 2 + 1 \tfrac{e^{ikz}}{z^2+1} (for k > 0 k> 0 ) around the semicircular contour of radius R R , centre 0 0 , with positive imaginary part, then the result is 2 π i 2\pi i times the residue of this function at the single pole z = i z=i , namely π e 2 k \pi e^{-2k} .

The integral along the straight line segment from R -R to R R is 2 0 R cos k x x 2 + 1 d x 2\int_0^R \frac{\cos kx}{x^2+1}\,dx while the integral around the semicircular arc is O ( R 1 ) O(R^{-1}) . Letting R R \to \infty gives the result.

This is a lot less work! From a complex integration point of view, this technique is well-known enough that simply evaluating the residues at poles with positive imaginary part is almost a theorem.

Mark Hennings - 5 years, 5 months ago

Log in to reply

@Mark Hennings I agree to you, using complex analysis for integration makes integration a lot easier.

Ronak Agarwal - 5 years, 5 months ago

ERROR: You have forgotten to change the limits.

Aditya Kumar - 5 years, 5 months ago

Log in to reply

Oh, yes corrected.

Ronak Agarwal - 5 years, 5 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...