7

I tried this :-

Let $$I =\int_{0}^{\pi}\frac{x}{1 + \cos^2x}dx\tag{1}$$ then $$I = \int_{0}^{\pi}\frac{\pi-x}{1 + \cos^2(\pi-x)}dx= \int_{0}^{\pi}\frac{\pi-x}{1 + \cos^2x}dx\tag{2}$$ Adding (1) and (2), we get $$ 2I = \int_{0}^\pi\frac{\pi}{1 + \cos^2x}dx\\ = \pi\int_{0}^{\pi}\frac{1}{1 + \frac{1}{\sec^2x}}dx\\ = \pi\int_{0}^{\pi}\frac{\sec^2x}{\sec^2x + 1}dx\\ = \pi\int_{0}^{\pi}\frac{\sec^2x}{2 + \tan^2x}dx $$ Let $\tan x = u$, then $du = \sec^2x dx$

Then, $$\int \frac{\sec^2x}{2+\tan^2x}dx = \int \frac{du}{2 + u^2} = \frac{1}{\sqrt{2}}\tan^{-1}\frac{u}{\sqrt{2}}+c = \frac{1}{\sqrt{2}}\tan^{-1}\frac{\tan x}{\sqrt{2}}+c $$ Therefore, $$ 2I = \frac{\pi}{\sqrt{2}}\left[\tan^{-1}\frac{\tan x}{\sqrt{2}}\right]_0^\pi\\ \Rightarrow I = \frac{\pi}{2\sqrt{2}}\left[\tan^{-1}\frac{\tan x}{\sqrt{2}}\right]_0^\pi\\= \frac{π}{2\sqrt{2}}\left[\tan^{-1}\frac{\tan \pi}{\sqrt{2}} - \tan^{-1}\frac{\tan 0}{\sqrt{2}}\right]\\=\frac{\pi}{2\sqrt{2}}[\tan^{-1}0 - \tan^{-1}0] \\= 0\\$$

But the answer given in the book is $\frac{\pi^2}{2\sqrt{2}}$

What am I doing wrong ?

clathratus
  • 17,161
anonymous
  • 601
  • 4
    $\tan^{-1}\dfrac{\tan x}{\sqrt{2}}$ gets discontinuous at $x=\pi/2$. – metamorphy May 18 '19 at 14:57
  • In addition to the comment above, if you split the integral at pi/2, and "double it up" using symmetry, you get a very easy improper integral that leads to the answer. – imranfat May 18 '19 at 17:54

4 Answers4

1

As you have found ever the dicontinuing of $\tan$ is the problem, so you can solve it with your method after this substitution $$\int_{0}^{\pi}\dfrac{1}{1+\cos^2x}\ dx=2\int_{0}^{\pi/2}\dfrac{1}{1+\sin^2t}\ dt= \color{blue}{\dfrac{\pi}{\sqrt{2}}}$$ where we use the substitution $x=t+\dfrac{\pi}{2}$. Other way is complex integration, with $2x=t$ we have $$ \begin{align} \int_{0}^{\pi}\dfrac{1}{1+\cos^2x}\ dx&= \int_{0}^{2\pi}\dfrac{1}{3+\cos t}\ dt \\ &=\int_{|z|=1}\dfrac{1}{3+\frac12(z+\frac1z)}\dfrac{dz}{iz} \\ &= -2i\int_{|z|=1}\dfrac{1}{(z+3-2\sqrt{2})(z+3+2\sqrt{2})}dz \\ &= \color{blue}{\dfrac{\pi}{\sqrt{2}}} \end{align} $$

Nosrati
  • 29,995
1

$$ \begin{aligned} \int_0^\pi \frac{x}{1+\cos ^2 x} d x& \stackrel{x\mapsto \pi -x}{=} \int_0^\pi \frac{\pi - x}{1+\cos ^2 x} d x \\ & =\frac{\pi}{2} \int_0^\pi \frac{d x}{1+\cos ^2 x} \\ & =\pi \int_0^{\frac{\pi}{2}} \frac{d x}{1+\cos ^2 x}\quad (\textrm{ By symmetry}) \\ & =\pi \int_0^{\frac{\pi}{2}} \frac{2d(\tan x)}{2+\tan ^2 x} \\ & =\frac{\pi}{\sqrt{2}} \tan ^{-1}\left(\frac{\tan ^2 x}{\sqrt{2}}\right)_0^{\frac{\pi}{2}} \\ & =\frac{\pi^2}{2 \sqrt{2}} \end{aligned} $$

Lai
  • 20,421
0

As $\tan x$ is discontinuous at $\dfrac\pi2,$ let's fold the integral in the first quadrant

$$I=\int_0^{2a}f(x)\ dx=\int_0^af(x)\ dx+\int_a^{2a}f(x)\ dx$$

Now set $2a-x=y$ in $\displaystyle J=\int_a^{2a}f(x)\ dx$

to find $\displaystyle J=\int_a^0f(2a-y)\ (-dy)=\int_0^af(2a-y)\ dy=\int_0^af(2a-x)\ dx$

$$\displaystyle I=\int_0^{2a}f(x)\ dx=\begin{cases} 2\displaystyle\int_0^af(x)\ dx &\mbox{if } f(2a-x)=f(x) \\ 0& \mbox{if } f(2a-x)=-f(x)\end{cases} $$

Here $2a=\pi,f(x)=\dfrac1{1+\cos^2x}$

0

Hint For a slightly more theoretically demanding solution you can start out like this:


Let $$h(x) = f(x)\cdot g(x)\\ f(x) = x\\ g(x) = \frac{1}{1+\cos(x)^2}$$

Now we seek $$\int_0^{\pi}h(x)dx$$

But with Fourier analysis we know:

$$\hat h(0) = \int h(x)dx$$

And furthermore we know $${\hat {(f\cdot g)}} = \hat f * \hat g$$

Your integral can be viewed as DC component (frequency 0 component of Fourier transform) of product between on interval $x\in [0,\pi]$.

These functions $\hat f, \hat g$ should be raaather nice to describe in Fourier domain and we can leave the rest as an exercise for the curious student.

mathreadler
  • 25,824