## 2019年7月27日土曜日

### 数学 - Python - 解析学 - 級数 - 比による判定法 - 対数関数、累乗(べき乗、平方)、収束、微分

1. $\begin{array}{l}\frac{{a}_{n+1}}{{a}_{n}}\\ =\frac{\mathrm{log}\left(n+1\right)}{{\left(n+1\right)}^{2}}·\frac{{n}^{2}}{\mathrm{log}n}\\ \le \frac{{n}^{2}}{{\left(n+n\right)}^{2}}·\frac{\mathrm{log}\left(n+1\right)}{\mathrm{log}n}\\ =\frac{1}{2}·\frac{\mathrm{log}\left(n+1\right)}{\mathrm{log}n}\\ \underset{n\to \infty }{\mathrm{lim}}\frac{1}{2}\frac{\mathrm{log}\left(n+1\right)}{\mathrm{log}n}\\ =\frac{1}{2}\underset{n\to \infty }{\mathrm{lim}}\frac{n}{n+1}\\ =\frac{1}{2}\underset{n\to \infty }{\mathrm{lim}}\frac{1}{1+\frac{1}{n}}\\ =\frac{1}{2}\end{array}$

よって、

$\frac{{a}_{n+1}}{{a}_{n}}\le \frac{1}{2}$

より、 問題の無限級数は収束する。

コード

Python 3

#!/usr/bin/env python3
from sympy import pprint, symbols, plot, summation, oo, log, Limit
import matplotlib.pyplot as plt

print('4.')

n = symbols('n', integer=True)
s = summation(log(n) / n ** 2, (n, 1, oo))
pprint(s)

def f(n):
return sum([log(k) / k ** 2 for k in range(1, n + 1)])

ns = range(2, 20)
plt.plot(ns, [f(n) for n in ns],
ns, [s for _ in ns])

plt.legend(['Σ log(n) / n^2', 'an+1 / an', 1])
plt.savefig('sample4.png')


C:\Users\...>py sample4.py
4.
∞
____
╲
╲   log(n)
╲  ──────
╱     2
╱     n
╱
‾‾‾‾
n = 1

C:\Users\...>