## 2019年10月8日火曜日

### 数学 - Python - 解析学 - 級数 - べき級数 - 対数関数、2の累乗(べき乗)、商、係数、累乗根、収束半径、絶対値、極限、逆数

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

よって、収束半径は2。

コード

Python 3

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

print('21.')

n, m, x = symbols('n, m, x')
an = log(n) / 2 ** 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(),
f.subs({m: oo})]:
pprint(o)
print()

ms = range(2, 12)
# fs = [f.subs({m: m0}) for m0 in ms]

def g(m):
return sum([an.subs({n: m}) * x ** m for m in range(1, m)])

fs = [g(m) for m in ms]

p = plot(*fs,
(x, -5, 5),
ylim=(-5, 5),
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)
print()

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


$./sample21.py 21. __________________ n ╱ -re(n) lim ╲╱ 2 ⋅│log(n)│ n─→∞ ∞ ___ ╲ ╲ -n n ╱ 2 ⋅x ⋅log(n) ╱ ‾‾‾ n = 1 (0, red) ⎛ 2 ⎞ ⎜x ⋅log(2) ⎟ ⎜─────────, green⎟ ⎝ 4 ⎠ ⎛ 3 2 ⎞ ⎜x ⋅log(3) x ⋅log(2) ⎟ ⎜───────── + ─────────, blue⎟ ⎝ 8 4 ⎠ ⎛ 4 3 2 ⎞ ⎜x ⋅log(4) x ⋅log(3) x ⋅log(2) ⎟ ⎜───────── + ───────── + ─────────, brown⎟ ⎝ 16 8 4 ⎠ ⎛ 5 4 3 2 ⎞ ⎜x ⋅log(5) x ⋅log(4) x ⋅log(3) x ⋅log(2) ⎟ ⎜───────── + ───────── + ───────── + ─────────, orange⎟ ⎝ 32 16 8 4 ⎠ ⎛ 6 5 4 3 2 ⎞ ⎜x ⋅log(6) x ⋅log(5) x ⋅log(4) x ⋅log(3) x ⋅log(2) ⎟ ⎜───────── + ───────── + ───────── + ───────── + ─────────, purple⎟ ⎝ 64 32 16 8 4 ⎠ ⎛ 7 6 5 4 3 2 ⎞ ⎜x ⋅log(7) x ⋅log(6) x ⋅log(5) x ⋅log(4) x ⋅log(3) x ⋅log(2) ⎟ ⎜───────── + ───────── + ───────── + ───────── + ───────── + ─────────, pink⎟ ⎝ 128 64 32 16 8 4 ⎠ ⎛ 8 7 6 5 4 3 2 ⎜x ⋅log(8) x ⋅log(7) x ⋅log(6) x ⋅log(5) x ⋅log(4) x ⋅log(3) x ⋅lo ⎜───────── + ───────── + ───────── + ───────── + ───────── + ───────── + ───── ⎝ 256 128 64 32 16 8 4 ⎞ g(2) ⎟ ────, gray⎟ ⎠ ⎛ 9 8 7 6 5 4 3 ⎜x ⋅log(9) x ⋅log(8) x ⋅log(7) x ⋅log(6) x ⋅log(5) x ⋅log(4) x ⋅lo ⎜───────── + ───────── + ───────── + ───────── + ───────── + ───────── + ───── ⎝ 512 256 128 64 32 16 8 2 ⎞ g(3) x ⋅log(2) ⎟ ──── + ─────────, skyblue⎟ 4 ⎠ ⎛ 10 9 8 7 6 5 4 ⎜x ⋅log(10) x ⋅log(9) x ⋅log(8) x ⋅log(7) x ⋅log(6) x ⋅log(5) x ⋅ ⎜─────────── + ───────── + ───────── + ───────── + ───────── + ───────── + ─── ⎝ 1024 512 256 128 64 32 3 2 ⎞ log(4) x ⋅log(3) x ⋅log(2) ⎟ ────── + ───────── + ─────────, yellow⎟ 16 8 4 ⎠$