## 2019年9月21日土曜日

### 数学 - Python - 解析学 - 級数 - べき級数 - 収束半径、累乗、逆数、係数、絶対値、極限

1. $\begin{array}{l}\underset{n\to \infty }{\mathrm{lim}}{\left|\frac{1}{{n}^{n}}\right|}^{\frac{1}{n}}\\ =\underset{n\to \infty }{\mathrm{lim}}\frac{1}{n}\\ =0\end{array}$

よって、収束半径は

$\infty$

コード

Python 3

#!/usr/bin/env python3
from sympy import pprint, symbols, summation, oo, Limit, plot

print('2.')

n, m, x = symbols('n, m, x')
an = 1 / n ** n
f = summation(an * x ** n, (n, 1, m))

s = Limit(abs(an) ** (1 / n), n, oo)

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

ms = range(1, 10)
fs = [f.subs({m: m0}) for m0 in ms] + [f.subs({m: oo})]
p = plot(*fs,
(x, -10, 10),
ylim=(-10, 10),
legend=False,
show=False)
colors = ['red', 'green', 'blue', 'brown', 'orange',
'purple', 'pink', 'gray', 'skyblue', 'yellow']

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

for o in zip(fs, colors):
pprint(o)

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


C:\Users\...>py sample2.py
2.
_______
n ╱ │ -n│
lim ╲╱  │n  │
n─→∞

0

zoo

⎛  1              ⎞
⎜ ___             ⎟
⎜ ╲               ⎟
⎜  ╲    -n  n     ⎟
⎜  ╱   n  ⋅x , red⎟
⎜ ╱               ⎟
⎜ ‾‾‾             ⎟
⎝n = 1            ⎠
⎛  2                ⎞
⎜ ___               ⎟
⎜ ╲                 ⎟
⎜  ╲    -n  n       ⎟
⎜  ╱   n  ⋅x , green⎟
⎜ ╱                 ⎟
⎜ ‾‾‾               ⎟
⎝n = 1              ⎠
⎛  3               ⎞
⎜ ___              ⎟
⎜ ╲                ⎟
⎜  ╲    -n  n      ⎟
⎜  ╱   n  ⋅x , blue⎟
⎜ ╱                ⎟
⎜ ‾‾‾              ⎟
⎝n = 1             ⎠
⎛  4                ⎞
⎜ ___               ⎟
⎜ ╲                 ⎟
⎜  ╲    -n  n       ⎟
⎜  ╱   n  ⋅x , brown⎟
⎜ ╱                 ⎟
⎜ ‾‾‾               ⎟
⎝n = 1              ⎠
⎛  5                 ⎞
⎜ ___                ⎟
⎜ ╲                  ⎟
⎜  ╲    -n  n        ⎟
⎜  ╱   n  ⋅x , orange⎟
⎜ ╱                  ⎟
⎜ ‾‾‾                ⎟
⎝n = 1               ⎠
⎛  6                 ⎞
⎜ ___                ⎟
⎜ ╲                  ⎟
⎜  ╲    -n  n        ⎟
⎜  ╱   n  ⋅x , purple⎟
⎜ ╱                  ⎟
⎜ ‾‾‾                ⎟
⎝n = 1               ⎠
⎛  7               ⎞
⎜ ___              ⎟
⎜ ╲                ⎟
⎜  ╲    -n  n      ⎟
⎜  ╱   n  ⋅x , pink⎟
⎜ ╱                ⎟
⎜ ‾‾‾              ⎟
⎝n = 1             ⎠
⎛  8               ⎞
⎜ ___              ⎟
⎜ ╲                ⎟
⎜  ╲    -n  n      ⎟
⎜  ╱   n  ⋅x , gray⎟
⎜ ╱                ⎟
⎜ ‾‾‾              ⎟
⎝n = 1             ⎠
⎛  9                  ⎞
⎜ ___                 ⎟
⎜ ╲                   ⎟
⎜  ╲    -n  n         ⎟
⎜  ╱   n  ⋅x , skyblue⎟
⎜ ╱                   ⎟
⎜ ‾‾‾                 ⎟
⎝n = 1                ⎠
⎛  ∞                 ⎞
⎜ ___                ⎟
⎜ ╲                  ⎟
⎜  ╲    -n  n        ⎟
⎜  ╱   n  ⋅x , yellow⎟
⎜ ╱                  ⎟
⎜ ‾‾‾                ⎟
⎝n = 1               ⎠

c:\Users\...>