## 2019年8月25日日曜日

### 数学 - Python - 解析学 - 級数 - 積分による判定法 - 対数関数、累乗(べき乗)、1より大きい場合、逆数、極限、収束

1. $\begin{array}{l}\underset{b\to \infty }{\mathrm{lim}}\underset{1}{\overset{b}{\int }}\frac{\mathrm{log}x}{{x}^{1+\epsilon }}\mathrm{dx}\\ =\underset{b\to \infty }{\mathrm{lim}}\left({\left[-\frac{1}{\epsilon }{x}^{-\epsilon }\mathrm{log}x\right]}_{1}^{b}+\frac{1}{\epsilon }\underset{1}{\overset{b}{\int }}{x}^{-\epsilon }·{x}^{-1}\mathrm{dx}\right)\\ =\frac{1}{\epsilon }\underset{b\to \infty }{\mathrm{lim}}\left(-{b}^{-\epsilon }\mathrm{log}b+\underset{1}{\overset{b}{\int }}{x}^{-\epsilon -1}\mathrm{dx}\right)\\ =\frac{1}{\epsilon }\underset{b\to \infty }{\mathrm{lim}}\left(-{b}^{-\epsilon }\mathrm{log}b+{\left[-\frac{1}{\epsilon }{x}^{-\epsilon }\right]}_{1}^{b}\right)\\ =\frac{1}{\epsilon }\underset{b\to \infty }{\mathrm{lim}}\left(-\frac{\mathrm{log}b}{{b}^{\epsilon }}-\frac{1}{\epsilon }\left({b}^{-\epsilon }-1\right)\right)\\ =\frac{1}{\epsilon }\underset{b\to \infty }{\mathrm{lim}}\left(-\frac{\mathrm{log}b}{{b}^{\epsilon }}-\frac{1}{\epsilon }\left(\frac{1}{{b}^{\epsilon }}-1\right)\right)\\ =\frac{1}{\epsilon }·\frac{1}{\epsilon }\\ =\frac{1}{{\epsilon }^{2}}\end{array}$

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

コード

Python 3

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

print('12-(c).')

n = symbols('n')
epsilon = symbols('ε', positive=True)
f = log(n) / n ** (1 + epsilon)
s = summation(f, (n, 1, oo))
I = Integral(f, (n, 1, oo))

for o in [s, I, I.doit()]:
pprint(o)
print()

d = {epsilon: 0.00001}
p = plot(f.subs(d),
(n, 1, 11),
legend=True,
show=False)
colors = ['red', 'green', 'blue', 'brown', 'orange',
'purple', 'pink', 'gray', 'skyblue', 'yellow']

for s, color in zip(p, colors):
s.line_color = color

p.show()
p.save('sample12.png')

def g(m):
return sum([f.subs({n: k}).subs(d) for k in range(1, m)])

ms = range(1, 11)
plt.plot(ms, [g(m) for m in ms])
plt.legend(['Σ log n / n^(1 + ε)'])
plt.savefig('sample12.png')


C:\Users\...>py sample12.py
12-(c).
∞
___
╲
╲    -ε - 1
╱   n      ⋅log(n)
╱
‾‾‾
n = 1

∞
⌠
⎮  -ε - 1
⎮ n      ⋅log(n) dn
⌡
1

1
──
2
ε

c:\Users\...>