## 2019年10月15日火曜日

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

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

よって、 収束半径は

$\infty$

コード

Python 3

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

print('28.')

n, m, x = symbols('n, m, x')
an = (-1) ** n / (factorial(n) - 1)
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]

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

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

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)
print()

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

% ./sample28.py
28.
____________________
╱  -π⋅im(n) │  1   │
lim n ╱  ℯ        ⋅│──────│
n─→∞╲╱             │n! - 1│

0

zoo

∞
____
╲
╲       n  n
╲  (-1) ⋅x
╱  ────────
╱    n! - 1
╱
‾‾‾‾
n = 2

⎛  2                ⎞
⎜ ____              ⎟
⎜ ╲                 ⎟
⎜  ╲       n  n     ⎟
⎜   ╲  (-1) ⋅x      ⎟
⎜   ╱  ────────, red⎟
⎜  ╱    n! - 1      ⎟
⎜ ╱                 ⎟
⎜ ‾‾‾‾              ⎟
⎝n = 2              ⎠

⎛  3                  ⎞
⎜ ____                ⎟
⎜ ╲                   ⎟
⎜  ╲       n  n       ⎟
⎜   ╲  (-1) ⋅x        ⎟
⎜   ╱  ────────, green⎟
⎜  ╱    n! - 1        ⎟
⎜ ╱                   ⎟
⎜ ‾‾‾‾                ⎟
⎝n = 2                ⎠

⎛  4                 ⎞
⎜ ____               ⎟
⎜ ╲                  ⎟
⎜  ╲       n  n      ⎟
⎜   ╲  (-1) ⋅x       ⎟
⎜   ╱  ────────, blue⎟
⎜  ╱    n! - 1       ⎟
⎜ ╱                  ⎟
⎜ ‾‾‾‾               ⎟
⎝n = 2               ⎠

⎛  5                  ⎞
⎜ ____                ⎟
⎜ ╲                   ⎟
⎜  ╲       n  n       ⎟
⎜   ╲  (-1) ⋅x        ⎟
⎜   ╱  ────────, brown⎟
⎜  ╱    n! - 1        ⎟
⎜ ╱                   ⎟
⎜ ‾‾‾‾                ⎟
⎝n = 2                ⎠

⎛  6                   ⎞
⎜ ____                 ⎟
⎜ ╲                    ⎟
⎜  ╲       n  n        ⎟
⎜   ╲  (-1) ⋅x         ⎟
⎜   ╱  ────────, orange⎟
⎜  ╱    n! - 1         ⎟
⎜ ╱                    ⎟
⎜ ‾‾‾‾                 ⎟
⎝n = 2                 ⎠

⎛  7                   ⎞
⎜ ____                 ⎟
⎜ ╲                    ⎟
⎜  ╲       n  n        ⎟
⎜   ╲  (-1) ⋅x         ⎟
⎜   ╱  ────────, purple⎟
⎜  ╱    n! - 1         ⎟
⎜ ╱                    ⎟
⎜ ‾‾‾‾                 ⎟
⎝n = 2                 ⎠

⎛  8                 ⎞
⎜ ____               ⎟
⎜ ╲                  ⎟
⎜  ╲       n  n      ⎟
⎜   ╲  (-1) ⋅x       ⎟
⎜   ╱  ────────, pink⎟
⎜  ╱    n! - 1       ⎟
⎜ ╱                  ⎟
⎜ ‾‾‾‾               ⎟
⎝n = 2               ⎠

⎛  9                 ⎞
⎜ ____               ⎟
⎜ ╲                  ⎟
⎜  ╲       n  n      ⎟
⎜   ╲  (-1) ⋅x       ⎟
⎜   ╱  ────────, gray⎟
⎜  ╱    n! - 1       ⎟
⎜ ╱                  ⎟
⎜ ‾‾‾‾               ⎟
⎝n = 2               ⎠

⎛  10                   ⎞
⎜ ____                  ⎟
⎜ ╲                     ⎟
⎜  ╲       n  n         ⎟
⎜   ╲  (-1) ⋅x          ⎟
⎜   ╱  ────────, skyblue⎟
⎜  ╱    n! - 1          ⎟
⎜ ╱                     ⎟
⎜ ‾‾‾‾                  ⎟
⎝n = 2                  ⎠

⎛  11                  ⎞
⎜ ____                 ⎟
⎜ ╲                    ⎟
⎜  ╲       n  n        ⎟
⎜   ╲  (-1) ⋅x         ⎟
⎜   ╱  ────────, yellow⎟
⎜  ╱    n! - 1         ⎟
⎜ ╱                    ⎟
⎜ ‾‾‾‾                 ⎟
⎝n = 2                 ⎠

%