## 2019年8月24日土曜日

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

1. $\begin{array}{l}\underset{b\to \infty }{\mathrm{lim}}{\int }_{1}^{b}\frac{\mathrm{log}x}{{x}^{\frac{3}{2}}}\mathrm{dx}\\ =\underset{b\to \infty }{\mathrm{lim}}\left({\left[-2{x}^{-\frac{1}{2}}\mathrm{log}x\right]}_{1}^{b}-\underset{1}{\overset{b}{\int }}\left(-2x-\frac{1}{2}\right)·\frac{1}{x}\mathrm{dx}\right)\\ =-2\underset{b\to \infty }{\mathrm{lim}}\left({b}^{-\frac{1}{2}}\mathrm{log}b-{\int }_{1}^{b}{x}^{-\frac{3}{2}}\mathrm{dx}\right)\\ =-2\underset{b\to \infty }{\mathrm{lim}}\left({b}^{-\frac{1}{2}}\mathrm{log}b-{\left[-2{x}^{-\frac{1}{2}}\right]}_{1}^{b}\right)\\ =-2\underset{b\to \infty }{\mathrm{lim}}\left({b}^{-\frac{1}{2}}\mathrm{log}b+2\left({b}^{-\frac{1}{2}}-1\right)\right)\\ =-2·\left(-2\right)\\ =4\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-(b).')

n = symbols('n')
f = log(n) / n ** Rational(3, 2)
s = summation(f, (n, 1, oo))
I = Integral(f, (n, 1, oo))

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

p = plot(f,
(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}) for k in range(1, m)])

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


C:\Users\...>py sample12.py
12-(b).
∞
____
╲
╲   log(n)
╲  ──────
╱    3/2
╱    n
╱
‾‾‾‾
n = 1

∞
⌠
⎮ log(n)
⎮ ────── dn
⎮   3/2
⎮  n
⌡
1

4

c:\Users\...>