Same to the tag
calculate $\int_0^{\pi}\frac {x}{1+\cos^2x}dx$.
Have no ideas on that.
Any suggestion?
Many thanks
Same to the tag
calculate $\int_0^{\pi}\frac {x}{1+\cos^2x}dx$.
Have no ideas on that.
Any suggestion?
Many thanks
Using $\int_a^bf(x)\ dx=\int_a^bf(a+b-x)\ dx$
$$I=\int_0^\pi\dfrac x{1+\cos^2x}dx=\int_0^\pi\dfrac{\pi-x}{1+\cos^2(\pi-x)}dx$$
$$I+I=\pi\int_0^\pi\dfrac1{1+\cos^2x}dx$$
$$\int_0^\pi\dfrac1{1+\cos^2x}dx=\int_0^\pi\dfrac{\sec^2x}{2+\tan^2x}dx$$
Set $\tan x=u$
Or...along the same lines
$$\begin{align}\int_0^{\pi} \frac{x^2}{1+\cos^2{x}} &= \int_0^{\pi} \frac{(\pi-x)^2}{1+\cos^2{x}}\\ &= \pi^2 \int_0^{\pi} \frac{1}{1+\cos^2{x}} - 2 \pi \int_0^{\pi} \frac{x}{1+\cos^2{x}} + \int_0^{\pi} \frac{x^2}{1+\cos^2{x}} \end{align}$$
Thus,
$$ \int_0^{\pi} \frac{x}{1+\cos^2{x}} = \frac{\pi}{2} \int_0^{\pi} dx \frac{1}{1+\cos^2{x}} $$
..and use the sub $x = \arctan{u}$, etc.
ALTERNATIVE COMPLEX SOLUTION
We can use an integration over the unit circle, in the spirit of a similar problem I have done before. To start, consider
$$\begin{align}\int_0^{2 \pi} dx \frac{x}{1+\cos^2{x}} &= \int_0^{\pi} dx \frac{x}{1+\cos^2{x}} + \int_{\pi}^{2 \pi} dx \frac{x}{1+\cos^2{x}}\\ &= 2 \int_0^{\pi} dx \frac{x}{1+\cos^2{x}} + \pi \int_0^{\pi} dx \frac{1}{1+\cos^2{x}} + \end{align}$$
So we can get the integral we want in terms of an integral over a unit circle. (Yes, and also in terms of the integral above...but at this point we're just having fun and exploring, not being efficient.)
Now, consider
$$J(a) = \int_0^{2 \pi} dx \frac{e^{i a x}}{1+\cos^2{x}} $$
Then
$$\int_0^{2 \pi} dx \frac{x}{1+\cos^2{x}} = -i J'(0) $$
Now, let's consider
$$-i \oint_C \frac{dz}{z} \frac{z^a}{1+\frac14 (z+z^{-1})^2} = -i 4 \oint_C dz \frac{z^{a+1}}{z^4+6 z^2+1}$$
where $C$ is a keyhole contour about $(0,1]$ and around the unit circle. The only poles inside the unit circle are at $z_{\pm} = \pm i (\sqrt{2}-1)$. Thus, by the residue theorem, we may write the contour integral as
$$J(a) - i 4 (1- e^{i 2 \pi a}) \int_0^1 dx \frac{x^{a+1}}{x^4+6 x^2+1} = i 2 \pi (-i 4) \frac{(\sqrt{2}-1)^{a+1} \left (e^{i \pi/2 (a+1)} - e^{i 3 \pi/2 (a+1)} \right )}{4 i (\sqrt{2}-1)[-(\sqrt{2}-1)^2+3] } $$
Note that the arguments of the poles are $\pi/2$ and $3 \pi/2$ in keeping with the definition of the contour $C$. Thus,
$$J(a) = i 4 (1- e^{i 2 \pi a}) \int_0^1 dx \frac{x^{a+1}}{x^4+6 x^2+1} - i \pi \frac{(\sqrt{2}-1)^{a} \left (e^{i \pi/2 (a+1)} - e^{i 3 \pi/2 (a+1)} \right )}{ \sqrt{2} }$$
Then
$$-i J'(0) = -i 8 \pi \int_0^1 dx \frac{x}{x^4+6 x^2+1} + \sqrt{2} \pi^2 - i \frac{2 \pi \log{(\sqrt{2}-1)}}{\sqrt{2}} $$
Now,
$$\begin{align}\int_0^1 dx \frac{x}{x^4+6 x^2+1} &= \frac12 \int_0^1 \frac{dx}{x^2+6 x+1}\\ &= \frac12 \frac1{x_+-x_-} \int_0^1 dx \, \left (\frac1{x-x_+}-\frac1{x-x_-} \right )\\ &= \frac12 \frac1{x_+-x_-} \left [\log{\left (\frac{x_-}{x_+}\frac{1-x_+}{1-x_-} \right )} \right ] \end{align}$$
where $x_{\pm}=-3 \pm 2 \sqrt{2}$ so that $x_+-x_- = 4 \sqrt{2}$. The argument of the log turns out to be $3 + 2 \sqrt{2} = (\sqrt{2}+1)^2$. Thus,
$$-i J'(0) = -i \sqrt{2} \pi \log{(\sqrt{2}+1)} + \sqrt{2} \pi^2 - i \sqrt{2} \pi \log{(\sqrt{2}-1)} = \sqrt{2} \pi^2 $$
Thus,
$$\int_0^{2 \pi} dx \frac{x}{1+\cos^2{x}} = \sqrt{2} \pi^2 $$
Now, we also need to evaluate
$$\int_0^{\pi} \frac{dx}{1+\cos^2{x}} = -i 2 \oint_{|z|=1} dz \frac{z}{z^4+6 z^2+1} = 4 \pi \cdot 2 \frac1{4 \cdot 2 \sqrt{2}} = \frac{\pi}{\sqrt{2}}$$
Thus, from the original relation derived above:
$$\int_0^{\pi} dx \frac{x}{1+\cos^2{x}} = \frac12 \left (\int_0^{2 \pi} dx \frac{x}{1+\cos^2{x}} - \pi \int_0^{\pi} dx \frac{1}{1+\cos^2{x}} \right ) = \frac{\pi^2}{2 \sqrt{2}} $$
which, of course, we could have obtained with one step if we just stuck with the symmetry argument. But hey, some of us love to see this done using the residue theorem over weird contours.
Ok i think i found a way which is quiet different from the approaches above. It is based on the residue theorem using an rectangle with vertices $(0,0),(\pi,0),(\pi,\pi+ i R),(0, i R)$
Defining
$$ f(z)=\frac{z}{1+\cos^2(z)} $$
We obtain
$$ \oint dz f(z)=\underbrace{\int_0^{\pi}f(x)dx}_{I}+i\pi\underbrace{\int_0^{R}\frac{1}{1+\cosh^2(y)}dy}_{K}+\underbrace{i\int_0^{R}f(iy)dy+i\int_R^{0}f(iy)dy}_{=0}+\underbrace{\int_0^{\pi}f(iR+x)dx}_{J} =2\pi i\sum_j\text{Res}(f(z),z=z_j) $$
It is now easy to show that $J$ vanishs in the limit $R \rightarrow\infty$ and that $z_0=\arccos(-i)=\frac{\pi}{2}+i\log(1+\sqrt{2})$ is the only zero of the denominator of $f(z)$ inside the contour of integration. We are therefore down to
$$ I=2\pi i \text{Res}(f(z),z=z_0)-i\pi K $$
the last integral can be computed by standard methods (Weierstrass subsitution)and yields $K=\frac{\text{arctanh}(\sqrt{2})}{\sqrt{2}}$. One may also show that $\text{Res}(f(z),z=z_0)=\frac{\log(1+\sqrt{2})}{2\sqrt{2}}-i \pi\frac{1}{4\sqrt{2}}$. Playling a little bit with the logarithmic representation of arctanh we find that the imaginary parts cancel (as they should) and we end up with
$$ I=\frac{\pi^2}{2\sqrt{2}} $$
This numerically agrees with WA!
\begin{aligned} \int_0^{ \pi} \frac{x}{1+\cos ^2 x} d x & \stackrel{x\mapsto \pi-x}{=} \frac{\pi}{2} \int_0^\pi \frac{d x}{1+\cos ^2 x} \\ & =\pi \int_0^{\frac{\pi}{2}} \frac{\sec ^2 x}{\sec ^2 x+1} d x \\ & =\pi \int_0^{\infty} \frac{d(\tan x)}{2+\tan ^2 x} \\ & =\frac{\pi}{\sqrt{2}}\left[\tan ^{-1}\left(\frac{\tan x}{\sqrt{2}}\right)\right]_0^{\infty} \\ & =\frac{\pi^2}{2 \sqrt{2}} \end{aligned}
Using the substitution chain,
$$x=y+\frac\pi2 \to z=\sec y+\tan y$$
$$\begin{align*} \implies & \int_0^\pi \frac x{1+\cos^2x} \, dx \\ &= \int_{-\tfrac\pi2}^{\tfrac\pi2} \frac{y+\frac\pi2}{1+\sin^2y} \, dy \\ &= \frac\pi2 \int_{-\tfrac\pi2}^{\tfrac\pi2} \frac{dy}{1+\sin^2y} \\ &= \frac\pi2 \int_0^\infty \frac{1+z^2}{1+z^4} \, dz = \boxed{\frac{\pi^2}{2\sqrt2}} \end{align*}$$
where the last integral is computed here and here (the latter using residues).