这篇博客用于记录一些比较有趣的积分问题。
求\(\displaystyle I = \int \frac{1-\ln x}{(x- \ln x)^2} dx\)
\[I =\displaystyle \int \frac{\displaystyle \frac{1-\ln x}{x^2}}{(1 - \displaystyle \frac{\ln x}{x})^2} = \int- \frac{ d(1 -\displaystyle \frac{\ln x}{x})}{(1 - \displaystyle \frac{\ln x}{x})^2} = \frac{x}{x - \ln x} + C \]
使用类似的方法还可以求解有下面的三个积分。
求\(I = \displaystyle \int \frac{\sin^2 x}{(x\cos x -\sin x)^2} dx\)
注意到\(\displaystyle \int x \sin x dx = \sin x - x \cos x + C\)。
\[I = \displaystyle \int \frac{\sin x}{x} \cdot \frac{x \sin x}{(x \cos x - \sin x)^2} dx = \int \frac{\sin x}{x} d(\frac{1}{x \cos x - \sin x}) = \frac{\cos x}{x \cos x - \sin x} + C\]
求\(I = \displaystyle \int \frac{xe^x}{(1+x)^2} dx\)
\[I = \displaystyle \int \frac{\displaystyle \frac{x}{e^x}}{(\displaystyle\frac{1+x}{e^x})^2} dx = \int - \frac{d(\displaystyle\frac{1+x}{e^x})}{\displaystyle(\frac{1+x}{e^x})^2} = \frac{e^x}{1+x} + C\]
求\(I = \displaystyle \int \frac{\cos x + x \sin x}{(x + \cos x) ^ 2}\)
\[I = \displaystyle \int \frac{\displaystyle \frac{\cos x + x \sin x}{x^2}}{(\displaystyle 1 + \frac{\cos x}{x})^2}dx = \int - \frac{d(\displaystyle 1 + \frac{\cos x}{x})}{(\displaystyle 1 + \frac{\cos x}{x})^2} = \frac{x}{x + \cos x} + C\]
求\(\displaystyle I = -\frac{2}{3} \int \frac{dx}{\sqrt[3]{(x+1)^2(x-1)^4}}\)
注意到\(\displaystyle (\sqrt[3]{\frac{x+1}{x-1}})' = \frac{1}{\sqrt[3]{(x+1)^2(x-1)^4}}\)。
\[I = \displaystyle -\frac{3}{2} \sqrt[3]{\frac{x+1}{x-1}} + C\]
事实上,不难发现以下结果。
\[\displaystyle (\sqrt[n]{\frac{x+1}{x-1}})' = -\frac{2}{n} \frac{1}{\sqrt[n]{(x+1)^{n-1}(x-1)^{n+1}}}\]
\[\displaystyle (\sqrt[n]{\frac{x-1}{x+1}})' = \frac{2}{n} \frac{1}{\sqrt[n]{(x-1)^{n-1}(x+1)^{n+1}}}\]
求\(I = \displaystyle \int x^2 e^{\frac{x^2}{2} - x}dx\)
\[\displaystyle I = \int [(x-1)^2+2(x-1)+1]e^{\frac{x^2}{2}-x}dx = \int (x-1)d(e^{\frac{x^2}{2}-x}) + 2e^{\frac{x^2}{2}-x} + \int e^{\frac{x^2}{2}-x}dx = (x+1)e^{\frac{x^2}{2}-x} + C\]
求\(I = \displaystyle \int e^{\sin x}\frac{x \cos^3 x - \sin x}{\cos^2 x}\)
\[I = \displaystyle \int e^{\sin x} x\cos x dx - \int e^{\sin x} \frac{\sin x}{\cos^2 x} dx = \int x d(e^{\sin x}) - \int e^{\sin x}d(\frac{1}{\cos x}) = e^{\sin x}(x - \frac{1}{\cos x}) + C\]
求\(I= \displaystyle \int_{0}^{1} \ln x \cdot \ln (1-x) dx\)
题目求解
根据\(\ln(1-x) = -\displaystyle\sum_{n=1}^{\infty}\frac{x^n}{n},x\in(-1,1]\)可得\(I=\displaystyle-\int_0^1\sum_{n=1}^{\infty}\frac{x^n}{n}\ln x=-\sum_{n=1}^{\infty}\frac{1}{n}\int_0^1 x^n \ln xdx\)。
而\(\displaystyle \int_0^1 x^n \ln x dx {\xlongequal{\ln x = -t}}-\int_0^{+\infty} te^{-(n+1)t}dt=-\frac{1}{(n+1)^2}\),故\(I=\displaystyle\sum_{n=1}^{\infty}\frac{1}{n(n+1)^2}\)。
对于最后一步的级数,可以使用有理函数的拆分得到\(I=\displaystyle\sum_{n=1}^{\infty}(\frac{1}{n}-\frac{1}{n+1})-\sum_{n=1}^{\infty}\frac{1}{(n+1)^2}\),前者通过裂项相消可得\(\displaystyle\sum_{n=1}^{\infty}(\frac{1}{n}-\frac{1}{n+1})=1\),而后者可以通过巴塞尔级数求解,最终得到\(I=2-\displaystyle\frac{\pi^2}{6}\)。
相关知识
Fubini's Theorem
若\(\displaystyle\int_{A \times B}|f(x,y)|d(x,y)<\infty\),其中积分是关于空间\(A \times B\)的积测度,且\(A\)和\(B\)都是\(\sigma\)-有限测度空间,那么有\(\displaystyle\int_A(\int_B f(x,y)dy)dx=\int_B(\int_A f(x,y)dx)dy=\int_{A \times B}|f(x,y)|d(x,y)\),前二者是在两个测度空间上的逐次积分, 但积分次序不同; 第三个是在乘积空间上关于乘积测度的积分。
特别地,如果\(f(x,y)=h(x)g(x)\),那么\(\displaystyle \int_A h(x)dx\int_Bg(y)dy=\int_{A \times B}|f(x,y)|d(x,y)\)。注意,如果条件中绝对值积分值不是有限,那么上述两个逐次积分的值可能不同。
巴塞尔级数
即\(\displaystyle \sum_{n=1}^{\infty}\frac{1}{n^2}=\frac{\pi^2}{6}\),证明方法有很多种,在此不再赘述。
常见函数的幂级数
具体推导详见概率论相关计算技巧,这里只给出公式。
\[\sin x= \displaystyle \sum_{n=0}^{\infty}(-1)^n\frac{x^{2n+1}}{(2n+1)!},x\in(-\infty,+\infty)\]
\[\cos x= \displaystyle \sum_{n=0}^{\infty}(-1)^n\frac{x^{2n}}{(2n)!},x\in(-\infty,+\infty)\]
\[e^x = \displaystyle\sum_{n=0}^{\infty}\frac{x^n}{n!},x\in(-\infty,+\infty)\]
\[\displaystyle\frac{1}{1-x}=\sum_{n=0}^{\infty}x^{n},|x|<1\]
\[(1+x)^{\alpha}=1+\alpha x +\displaystyle \frac{\alpha(\alpha-1)}{2!}x^2+\cdots\]
求\(I = \displaystyle \int_{0}^{\frac{\pi}{2}} \ln \cos x dx\)
使用区间再现可以得到如下结论。
\[I \xlongequal{t = \frac{\pi}{2} - x} \displaystyle - \int_{\frac{\pi}{2}}^{0} \ln \sin t dt = \int_{0}^{\frac{\pi}{2}} \ln \sin x dx\]
因此可得:
\[I = \displaystyle \frac{1}{2} \int_{0}^{\frac{\pi}{2}} (\ln \sin x + \ln \cos x) dx = \frac{1}{2} \int_{0}^{\frac{\pi}{2}} \ln \sin 2x dx - \frac{\pi}{4}\ln 2\]
又因为:
\[\displaystyle \int_{0}^{\frac{\pi}{2}} \ln \sin 2x dx \xlongequal{t = 2x} \frac{1}{2} \int_{0}^{\pi} \ln \sin t dt = \frac{1}{2}(\int_{0}^{\frac{\pi}{2}} \ln \sin x dx + \int_{\frac{\pi}{2}}^{\pi} \ln \sin x dx) = I\]
因此\(I = \displaystyle - \frac{\pi}{2} \ln 2\)。
求\(I = \displaystyle \int_{0}^{+\infty} \frac{dx}{(1+x^2)(1+x^{\alpha})}\),其中\(\alpha > 0\)
\[I = \displaystyle \int_{0}^{1} \frac{dx}{(1+x^2)(1+x^{\alpha})} + \int_{1}^{+\infty} \frac{dx}{(1+x^2)(1+x^{\alpha})}\]
\[\displaystyle \int_{1}^{+\infty} \frac{dx}{(1+x^2)(1+x^{\alpha})} \xlongequal{t = \frac{1}{x}} -\int_{1}^{0} \frac{\displaystyle\frac{1}{t^2}dt}{(1+t^{-2})(1+t^{-\alpha})} = \int_{0}^{1} \frac{x^{\alpha}dx}{(1+x^2)(1+x^{\alpha})}\]
\[I = \displaystyle \int_{0}^{1} \frac{dx}{1+x^2} = \frac{\pi}{4}\]
求\(I=\displaystyle\int \frac{\ln (1+x) - \ln x}{x(x+1)} dx\)
观察可知\(\displaystyle \frac{1}{x(x+1)} = \frac{1}{x} - \frac{1}{1+x} = [\ln x - \ln(1+x)]'\),因此可得以下结果。
\[I = \displaystyle -\frac{1}{2}[\ln x - \ln(1+x)]^2 +C\]
求\(I=\displaystyle \int \sec^3 x dx\)
\[\displaystyle I= \int \sec^3 x dx = \int \sec x (1+\tan^2 x) dx = \int \sec x dx + \int \tan x d(\sec x) = \ln|\sec x + \tan x| + \tan x\sec x - I \]
\[I = \displaystyle \frac{1}{2}(\ln|\sec x +\tan x| + \tan x \sec x) + C\]
求\(I=\displaystyle \frac{\ln x}{\sqrt{x^3(1-x)}} dx\)
注意到\(\displaystyle \int \frac{dx}{\sqrt{x^3(1-x)}} = \int \frac{\displaystyle \frac{1}{x^2}dx}{\sqrt{\displaystyle \frac{1}{x} - 1}} = -2\sqrt{\frac{1}{x} - 1} + C\)。
\[I = \displaystyle -2 \int \ln x d(\sqrt{\frac{1-x}{x}}) = -2\sqrt{\frac{1-x}{x}} \cdot \ln x + 2\int \frac{1}{x} \sqrt{\frac{1-x}{x}} dx\]
\[\int \frac{1}{x} \sqrt{\frac{1 - x}{x}} dx \xlongequal{\sqrt{\displaystyle \frac{1-x}{x}} = t} - 2\int \frac{t^2}{t^+1} dt = 2\arctan t - 2t + C = 2\arctan \sqrt{\displaystyle \frac{1-x}{x}} - 2\sqrt{\displaystyle \frac{1-x}{x}} + C\]
\[I = -2\sqrt{\frac{1-x}{x}} \cdot \ln x + 4\arctan \sqrt{\displaystyle \frac{1-x}{x}} - 4\sqrt{\displaystyle \frac{1-x}{x}} + C\]
求\(I=\displaystyle \int_{0}^{2\pi} \sin(\sin x - x) dx\)
\[I = \displaystyle \int_{0}^{2\pi} \sin (\sin x) \cos x dx - \int_{0}^{2\pi} \sin x \cos (\sin x) dx = [-\cos(\sin x)]^{2\pi}_{0} + \int_{0}^{2\pi} \sin x \cos (\sin x) dx = \int_{0}^{2\pi} \sin x \cos (\sin x) dx\]
\[\int_{0}^{2\pi} \sin x \cos (\sin x) dx \xlongequal{t = x - \pi} - \int_{-\pi}^{\pi}\sin t \cos(\sin t) dt = 0\]
\[\therefore I = 0\]
求\(\displaystyle \int e^{2x} (1+\tan x)^2 dx\)
不妨观察\(\displaystyle \int e^{2x} \tan x dx\)。
\[\displaystyle \int e^{2x} \tan x dx = \frac{1}{2} \int \tan x d(e^{2x})=\frac{1}{2}e^{2x}\tan x - \frac{1}{2}\int e^{2x} \sec^2x dx\]
而\(\displaystyle \int e^{2x} \sec^2x dx = \int e^{2x}(1+\tan^2 x)dx\),
故\(\displaystyle \int e^{2x} (1+\tan x)^2 dx = e^{2x} \tan x + C\)。
求\(\displaystyle \int \frac{e^{\sin 2x}\sin^2x}{e^{2x}}dx\)
\(\displaystyle \int \frac{e^{\sin 2x}\sin^2x}{e^{2x}}dx=\int \frac{e^{\sin 2x} \frac{1-\cos 2x}{2}}{e^{2x}} dx=\frac{1}{2}\int \frac{e^{\sin 2x}}{e^{2x}}dx-\frac{1}{4}\int e^{-2x}d(e^{\sin2x})=-\frac{1}{4}e^{\sin2x-2x}+C\)
求\(\displaystyle \int \frac{x+\cos x \sin x}{(\cos x-x\sin x)^2}dx\)
\(\displaystyle \int \frac{x+\cos x \sin x}{(\cos x-x\sin x)^2}dx=\int \frac{x\sec^2x+\tan x}{(1-x\tan x)^2} dx =- \int \frac{d(1-x \tan x)}{(1-x\tan x)^2} = \frac{1}{1-x\tan x} + C\)
求 \(I=\displaystyle \int_{0}^{1}dx\int_0^{x}\frac{e^y}{\sqrt{(1-x)(x-y)}}dy\)
注意到\(I=\displaystyle \int_{0}^{1}\frac{1}{\sqrt{1-x}}dx\int_{0}^{x}\frac{e^y}{\sqrt{x-y}}dy\),不妨考虑对\(\displaystyle\int_{0}^{x}\frac{e^y}{\sqrt{x-y}}dy\)进行换元。
\(\displaystyle\int_{0}^{x}\frac{e^y}{\sqrt{x-y}}dy\xlongequal{\sqrt{x-y}=t}2\int_{0}^{\sqrt{x}}e^{x-t^2}dt=2e^x\int_0^{\sqrt{x}}e^{-t^2}dt\)
那么原积分转化为\(I=2\displaystyle \int_{0}^{1}\frac{e^x}{\sqrt{1-x}}dx\int_0^{\sqrt{x}}e^{-t^2}dt\)。
类似地有\(\displaystyle \int_{0}^{1}\frac{e^x}{\sqrt{1-x}}dx=2\int_0^{1}e^{1-u^2}du\),其中 \(x=1-u^2\)。
那么\(I=4e\displaystyle \int_{0}^{1}e^{-u^2}du\int_0^{\sqrt{1-u^2}}e^{-t^2}dt\)。
显然上式用极坐标计算较为方便,积分区域为单位圆的第一象限部分。
\(I=4e\displaystyle \int_{0}^{1}e^{-u^2}du\int_0^{\sqrt{1-u^2}}e^{-t^2}dt=4e\int_0^{\frac{\pi}{2}}d \theta\int_{0}^{1}\rho e^{-\rho^2}d\rho =\pi e(1-\frac{1}{e})=\pi(e-1)\)