利用级数算定积分一例

问题:计算定积分

\[\int_0^1{\frac{\ln x}{1+x}\text{d}x} \]


过程如下:

已知

\[\begin{equation*} \frac{1}{1+x}=\sum_{n=0}^{\infty}{\left( -x \right) ^n}=\sum_{n=0}^{\infty}{\left( -1 \right) ^nx^n} \\ \sum_{n=1}^{\infty}{\frac{1}{n^2}}=\frac{\pi ^2}{6} \end{equation*} \]

所以有

\[\begin{align*} \int_0^1{\frac{\ln x}{1+x}\text{d}x}&=\int_0^1{\ln x\cdot \left( \sum_{n=0}^{\infty}{\left( -1 \right) ^nx^n} \right) \text{d}x} \\ &=\sum_{n=0}^{\infty}{\left( -1 \right) ^n\int_0^1{x^n\ln x\text{d}x}} \\ &=\sum_{n=0}^{\infty}{\left( -1 \right) ^n\frac{1}{n+1}\int_0^1{\ln x\text{d}x^{n+1}}} \\ &=\sum_{n=0}^{\infty}{\left( -1 \right) ^n\frac{1}{n+1}\left( x^{n+1}\ln x\mid_{0}^{1}-\int_0^1{x^n\text{d}x} \right)} \\ &=-\sum_{n=0}^{\infty}{\left( -1 \right) ^n\frac{1}{n+1}\int_0^1{x^n\text{d}x}} \\ &=-\sum_{n=0}^{\infty}{\left( -1 \right) ^n\frac{1}{\left( n+1 \right) ^2}} \\ &=-\left( \frac{1}{1^2}-\frac{1}{2^2}+\frac{1}{3^2}-\frac{1}{4^2}+\frac{1}{5^2}+\cdots \right) \\ &=-\left( \sum_{n=1}^{\infty}{\frac{1}{n^2}}-2\sum_{n=1}^{\infty}{\frac{1}{\left( 2n \right) ^2}} \right) \\ &=-\frac{1}{2}\sum_{n=1}^{\infty}{\frac{1}{n^2}} \\ &=-\frac{\pi ^2}{12} \end{align*} \]

上一篇:图论Warshall和Floyd矩阵传递闭包


下一篇:fibnacci数列递归实现