Bonus. Show more generally that if f is continuous, ฯ-periodic, and satisfies f(ฯโx)=f(x), then
โซ0โโxsinxโf(x)dx=โซ0ฯ/2โf(x)dx.
As a check, fโก1 gives the Dirichlet integral ฯ/2.
Hint. You may use the partial fraction expansion of the cosecant:
sinu1โ=mโZโโu+mฯ(โ1)mโ,
where the sum is taken symmetrically.
integration beeLobachevsky integral formulaperiodic foldingpartial fractions of cosecantMittag-Lefflerconditionally convergent integral
Answer: Lobachevsky's Folding Trick
Key Idea / Intuition
The factor f(x) repeats every ฯ. The only non-periodic part is xsinxโ, and sinx itself just flips sign on each period.
So cut [0,โ) into intervals of length ฯ and stack them all on top of [0,ฯ]. Then use the mirror symmetry f(ฯโx)=f(x) to fold [0,ฯ] onto [0,ฯ/2].
After stacking and folding, the factor x1โ becomes an alternating sum over all its shifted copies u+mฯ1โ. By Euler's partial fractions, that sum is exactly sinu1โ. It cancels the sinu, and what remains is simply โซ0ฯ/2โf.
The infinite oscillatory integral collapses to a finite, elementary one.
Formal Proof / Solution
Step 1 (Convergence). The function g(x)=sinxf(x) satisfies g(x+ฯ)=โg(x). So g has period 2ฯ and zero mean over a period, which means its antiderivative is bounded. Since 1/xโ0, Dirichlet's test shows that โซ1โโg(x)/xdx converges. Near 0 the integrand is bounded. Hence
I=Nโโlimโโซ0Nฯโxsinxโf(x)dx.
Step 2 (Stack the periods). On [kฯ,(k+1)ฯ], substitute x=t+kฯ. This uses sin(t+kฯ)=(โ1)ksint and f(t+kฯ)=f(t):
Step 3 (Fold the period in half). Split [0,ฯ] into [0,ฯ/2]โช[ฯ/2,ฯ]. On the second half put t=ฯโu, which uses sin(ฯโu)=sinu and f(ฯโu)=f(u). The k-th piece becomes
The terms with kโฅ0 (that is, mโฅ0) and with mโคโ1 combine into the symmetric full sum. By Euler's expansion sinฯzฯโ=โmโzโm(โ1)mโ with z=u/ฯ,
S(u)=mโZโโu+mฯ(โ1)mโ=sinu1โ.
So the sinu cancels, and we obtain Lobachevsky's formula:
โซ0โโxsinxโf(x)dx=โซ0ฯ/2โf(u)du.
Step 6 (Apply to our f). The function f(x)=1+cos2x1โ is continuous and ฯ-periodic, and cos2(ฯโx)=cos2x, so the formula applies. With v=tanu, dv=sec2udu, and 1+cos2u=sec2usec2u+1โ=sec2uv2+2โ:
With fโก1 this recovers โซ0โโxsinxโdx=2ฯโ.
With f(x)=x2sin2xโโ sin2xx2โ the formula does not apply directly. However, a variant of the same folding gives โซ0โโx2sin2xโf(x)dx=โซ0ฯ/2โf as well. This variant uses โmโ(u+mฯ)21โ=csc2u.
The structural lesson: periodic times 1/x can be summed by folding, and the fold turns 1/x into a Mittag-Leffler series.