这篇博客用于记录一些比较有趣的积分问题。
求\(I=\displaystyle \int_{0}^{+\infty}\sin(x^2)dx\)
题目为著名的 Fersnel 积分,下面分步进行求解。
\[I\xlongequal{x^2=t}\frac{1}{2}\int_{0}^{+\infty}\frac{\sin t}{\sqrt{t}}dt\]
考虑积分\(\displaystyle \int_{0}^{+\infty}e^{-ax^2}dx\),其中\(a>0\):
\[\int_{0}^{\infty}e^{-ax^2}dx = \frac{1}{2} \sqrt{\frac{\pi}{a}} \int_{-\infty}^{+\infty}\frac{1}{\sqrt{2\pi}\cdot\frac{1}{\sqrt{2a}}}e^{-\frac{x^2}{2(\frac{1}{\sqrt{2a}})^2}}dx = \frac{1}{2} \sqrt{\frac{\pi}{a}} \Rightarrow\sqrt{\frac{1}{a}}=\frac{2}{\sqrt{\pi}}\int_{0}^{\infty}e^{-ax^2}dx\]
则有:
\[I\xlongequal{x^2=t}\frac{1}{\sqrt{\pi}}\int_{0}^{+\infty}\sin t (\int_{0}^{+\infty} e^{-tx^2}dx)dt=\frac{1}{\sqrt{\pi}}\int_{0}^{+\infty}dx\int_{0}^{+\infty}e^{-x^2t}\sin t dt=\frac{1}{\sqrt{\pi}}J\]
上式最后一步直接使用了\(\mathcal{L}(\sin at)\)的结果,其中\(J=\displaystyle \int_{0}^{+\infty}\frac{1}{x^4+1}dx\),下面求解\(J\)。
\[J \xlongequal{ x = \frac{1}{t} }\int_{0}^{+\infty}\frac{t^2}{1+t^4}dt=\int_{0}^{+\infty}\frac{x^2}{1+x^4}dx\]
\[J = \frac{1}{2}\int_{0}^{+\infty}\frac{1+x^2}{1+x^4}dx =\frac{1}{2} \int_{0}^{+\infty}\frac{d(x-\frac{1}{x})}{(x-\frac{1}{x})^2+2}=[\frac{1}{2\sqrt{2}}\arctan(\frac{x-\frac{1}{x}}{\sqrt{2}})]_{0}^{+\infty}=\frac{\pi}{2\sqrt{2}}\]
最终得到\(\displaystyle\int_{0}^{+\infty} \sin(x^2) dx = \displaystyle \frac{1}{2} \sqrt{\frac{\pi}{2}}\)。此外,\(\displaystyle\int_{0}^{+\infty} \sin(x^2) dx = \displaystyle\int_{0}^{+\infty} \cos(x^2) dx\),这一性质根据\(\mathcal{L}(\sin at)\)和\(\mathcal{L}(\cos at)\)的关系显而易见。
求\(I = \displaystyle \int_{0}^{\frac{\pi}{2}}\ln \sin xdx\)
显然\(\displaystyle \int_{0}^{\frac{\pi}{2}}\ln \sin xdx =\int_{0}^{\frac{\pi}{2}}\ln \cos xdx\),那么有:
\[I = \frac{1}{2}\int_{0}^{\frac{\pi}{2}}\ln (\sin x \cos x)dx=\frac{1}{2}\int_{0}^{\frac{\pi}{2}}\ln \sin 2x dx - \frac{\pi}{4}\ln 2\]
\[\int_{0}^{\frac{\pi}{2}}\ln \sin 2x dx \xlongequal{2x = u} \frac{1}{2}\int_{0}^{\pi}\ln \sin udu = \frac{1}{2}(\int_{0}^{\frac{\pi}{2}}\ln \sin xdx + \int_{\frac{\pi}{2}}^{\pi}\ln \sin xdx)\]
\[\int_{\frac{\pi}{2}}^{\pi}\ln \sin xdx \xlongequal{u=\pi-x}\int_{0}^{\frac{\pi}{2}}\ln \sin udu\]
最终得到\(I = \displaystyle-\frac{\pi}{2}\ln 2\)
求\(I = \displaystyle\int_{0}^{\frac{\pi}{2}}\sin x \ln \sin x dx\)
首先求解被积函数的原函数:
\[\int\sin x \ln \sin x dx=\int\ln \sin xd(-\cos x)=-\cos x\ln \sin x + \int \frac{1-\sin^2x}{\sin x} \]
\[= (1-\cos x)\ln \sin x - \ln(1+\cos x)+\cos x+C\]
再代入积分限有:
\[I = \ln 2-1-[\lim_\limits{x\to 0}(1-\cos x)\ln \sin x]=\ln2 - 1\]
在此可以复习一下自适应 Simpson 积分的 C++
实现。
1 |
|
求\(I = \displaystyle \int_{0}^{1}\frac{\ln x}{1-x^2}dx\)
\[I = \displaystyle \int_{0}^{1}\sum_{n=0}^{\infty}x^{2n}\ln xdx=\sum_{n=0}^{\infty}\int_{0}^{1}x^{2n}\ln xdx \xlongequal{\ln x = t}-\sum_{n=0}^{\infty}\int_{0}^{+\infty}te^{-(2n+1)t}dt=-\sum_{n=0}^{\infty}\frac{1}{(2n+1)^2}\]
由 Basel 级数易得\(\displaystyle\sum_{n=0}^{\infty}\frac{1}{(2n+1)^2}=\frac{3}{4}\cdot\frac{\pi^2}{6}=\frac{\pi^2}{8}\),那么\(I=\displaystyle -\frac{\pi^2}{8}\)。
求\(I = \displaystyle \int_{0}^\pi \frac{dx}{a+b\cos x}, a^2>b^2\)
\(\displaystyle \int_{0}^\pi \frac{dx}{a+b\cos x}=\int_{0}^{+\infty}\frac{\frac{2}{1+t^2}dt}{a+b\frac{1-t^2}{1+t^2}}=\frac{2}{a-b}\int_{0}^{+\infty}\frac{dt}{t^2+\frac{a+b}{a-b}}=\frac{2}{a-b}[\sqrt{\frac{a-b}{a+b}}\arctan \frac{x}{\sqrt{\frac{a-b}{a+b}}}]_{0}^{+\infty}=\frac{\pi}{\sqrt{a^2-b^2}}\)
\(\displaystyle \int_{0}^{+\infty}\frac{dx}{1+x^n}=\frac{\pi}{n\sin\frac{\pi}{n}}\)
求\(I = \displaystyle \int_{-\infty}^{+\infty}\frac{\cos x}{1+x^2}dx\)
费曼积分法
令\(y(a) = \displaystyle \int_{0}^{+\infty} \frac{\cos ax}{1+x^2}dx,a>0\),则\(I = 2y(1)\),并且有\(y(0) = \displaystyle\frac{\pi}{2}\)。
\[y'(a) = \int_{0}^{+\infty}(\frac{\partial}{\partial a}\frac{\cos ax}{1+x^2})dx = -\frac{\pi}{2}+\int_{0}^{+\infty}\frac{\sin ax}{x(1+x^2)}dx \Rightarrow y'(0) = -\frac{\pi}{2}\]
\[y''(a) = \int_{0}^{+\infty}[\frac{\partial}{\partial a}\frac{\sin ax}{x(1+x^2)}]dx = y(a) \Rightarrow y(a) = C_1e^{a}+C_2e^{-a}\]
求解常数\(C_1\)和\(C_2\),得到\(y(a) = \displaystyle \frac{\pi}{2}e^{-a}\),那么\(I = \displaystyle \frac{\pi}{e}\)。
留数法
注意到\(I = \displaystyle \int_{-\infty}^{+\infty}\frac{\text{Re}(e^{ix})}{1+x^2}dx = \text{Re}(\int_{-\infty}^{+\infty}\frac{e^{ix}}{1+x^2}dx)\),那么有:
\[\int_{-\infty}^{+\infty}\frac{e^{ix}}{1+x^2}dx = 2\pi i \text{Res}[\frac{e^{ix}}{1+x^2},i]=\frac{\pi}{e} \Rightarrow I = \frac{\pi}{e}\]
Frullani积分
假设\(f(+\infty)\)存在且有限,那么:
\[\int_{0}^{+\infty}\frac{f(ax)-f(bx)}{x}dx=(f(0)-f(+\infty))\ln\frac{b}{a}\]