## 2019年9月26日木曜日

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

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

よって、収を半径は1。

コード

Python 3

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

print('7.')

n, m, x = symbols('n, m, x')
an = log(n) ** 2
f = summation(an * x ** n, (n, 2, 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]
p = plot(*fs,
(x, -2, 2),
ylim=(-2, 2),
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('sample7.png')


$./sample7.py 7. ___________ n ╱ │ 2 │ lim ╲╱ │log (n)│ n─→∞ 1 1 ∞ ___ ╲ ╲ n 2 ╱ x ⋅log (n) ╱ ‾‾‾ n = 2 ⎛ 2 ⎞ ⎜ ___ ⎟ ⎜ ╲ ⎟ ⎜ ╲ n 2 ⎟ ⎜ ╱ x ⋅log (n), red⎟ ⎜ ╱ ⎟ ⎜ ‾‾‾ ⎟ ⎝n = 2 ⎠ ⎛ 3 ⎞ ⎜ ___ ⎟ ⎜ ╲ ⎟ ⎜ ╲ n 2 ⎟ ⎜ ╱ x ⋅log (n), green⎟ ⎜ ╱ ⎟ ⎜ ‾‾‾ ⎟ ⎝n = 2 ⎠ ⎛ 4 ⎞ ⎜ ___ ⎟ ⎜ ╲ ⎟ ⎜ ╲ n 2 ⎟ ⎜ ╱ x ⋅log (n), blue⎟ ⎜ ╱ ⎟ ⎜ ‾‾‾ ⎟ ⎝n = 2 ⎠ ⎛ 5 ⎞ ⎜ ___ ⎟ ⎜ ╲ ⎟ ⎜ ╲ n 2 ⎟ ⎜ ╱ x ⋅log (n), brown⎟ ⎜ ╱ ⎟ ⎜ ‾‾‾ ⎟ ⎝n = 2 ⎠ ⎛ 6 ⎞ ⎜ ___ ⎟ ⎜ ╲ ⎟ ⎜ ╲ n 2 ⎟ ⎜ ╱ x ⋅log (n), orange⎟ ⎜ ╱ ⎟ ⎜ ‾‾‾ ⎟ ⎝n = 2 ⎠ ⎛ 7 ⎞ ⎜ ___ ⎟ ⎜ ╲ ⎟ ⎜ ╲ n 2 ⎟ ⎜ ╱ x ⋅log (n), purple⎟ ⎜ ╱ ⎟ ⎜ ‾‾‾ ⎟ ⎝n = 2 ⎠ ⎛ 8 ⎞ ⎜ ___ ⎟ ⎜ ╲ ⎟ ⎜ ╲ n 2 ⎟ ⎜ ╱ x ⋅log (n), pink⎟ ⎜ ╱ ⎟ ⎜ ‾‾‾ ⎟ ⎝n = 2 ⎠ ⎛ 9 ⎞ ⎜ ___ ⎟ ⎜ ╲ ⎟ ⎜ ╲ n 2 ⎟ ⎜ ╱ x ⋅log (n), gray⎟ ⎜ ╱ ⎟ ⎜ ‾‾‾ ⎟ ⎝n = 2 ⎠ ⎛ 10 ⎞ ⎜ ___ ⎟ ⎜ ╲ ⎟ ⎜ ╲ n 2 ⎟ ⎜ ╱ x ⋅log (n), skyblue⎟ ⎜ ╱ ⎟ ⎜ ‾‾‾ ⎟ ⎝n = 2 ⎠ ⎛ 11 ⎞ ⎜ ___ ⎟ ⎜ ╲ ⎟ ⎜ ╲ n 2 ⎟ ⎜ ╱ x ⋅log (n), yellow⎟ ⎜ ╱ ⎟ ⎜ ‾‾‾ ⎟ ⎝n = 2 ⎠ /opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sympy/plotting/experimental_lambdify.py:233: UserWarning: The evaluation of the expression is problematic. We are trying a failback method that may still work. Please report this as a bug. warnings.warn('The evaluation of the expression is'$