## 2019年8月8日木曜日

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

1. $\begin{array}{l}\frac{{a}_{n+1}}{{a}_{n}}\\ =\frac{{\left(n+1\right)}^{5}{e}^{-{\left(n+1\right)}^{2}}}{{n}^{5}{e}^{-{n}^{2}}}\\ ={\left(1+\frac{1}{n}\right)}^{5}\frac{1}{{e}^{2n+1}}\\ \le \frac{{2}^{5}}{{e}^{2n}}\\ n\ge 3\\ \frac{{a}_{n+1}}{{a}_{n}}\\ \le \frac{{2}^{5}}{{e}^{6}}\\ <1\end{array}$

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

コード

Python 3

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

print('16.')

n = symbols('n', integer=True)
s = summation(n ** 5 * exp(-n ** 2), (n, 1, oo))
l = Limit((n + 1) ** 5 * exp(-(n + 1) ** 2) / (n ** 5 * exp(-n ** 2)), n, oo)

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

def f(n):
return sum([k ** 5 * exp(-k ** 2) for k in range(2, n + 1)])

ns = range(1, 20)
plt.plot(ns, [f(n) for n in ns],
ns, [(n + 1) ** 5 * exp(-(n + 1) ** 2) / (n ** 5 * exp(-n ** 2))
for n in ns],
ns, [2 ** 5 / exp(6) for _ in ns])

plt.legend(['Σ n^5e^(-n^2)', 'a_(n+1) / a_n', 2 ** 5 / exp(6)])
plt.savefig('sample16.png')


C:\Users\...>py sample16.py
16.
∞
____
╲
╲         2
╲   5  -n
╱  n ⋅ℯ
╱
╱
‾‾‾‾
n = 1

⎛          ⎛ 2⎞          2⎞
⎜       5  ⎝n ⎠  -(n + 1) ⎟
⎜(n + 1) ⋅ℯ    ⋅ℯ         ⎟
lim ⎜─────────────────────────⎟
n─→∞⎜             5           ⎟
⎝            n            ⎠

1

c:\Users\...>