## 2019年8月7日水曜日

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

1. $\begin{array}{l}\frac{{a}_{n+1}}{{a}_{n}}\\ =\frac{{\left(n+1\right)}^{2}{e}^{-{\left(n+1\right)}^{3}}}{{n}^{2}{e}^{-{n}^{3}}}\\ ={\left(1+\frac{1}{n}\right)}^{2}\frac{1}{{e}^{{\left(n+1\right)}^{3}-{n}^{3}}}\\ \le \frac{2}{{e}^{3{n}^{2}+3n+1}}\\ \le \frac{2}{{e}^{7}}\\ <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('15.')

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

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

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

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

plt.legend(['Σ n^2e^(-n^3)', 'a_(n+2) / a_n', 2 / exp(7)])
plt.savefig('sample15.png')


C:\Users\...>py sample15.py
15.
∞
____
╲
╲         3
╲   2  -n
╱  n ⋅ℯ
╱
╱
‾‾‾‾
n = 1

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

1

c:\Users\...>