## 2019年10月23日水曜日

### 数学 - Python - 解析学 - 級数 - べき級数の微分と積分 - 項別微分、等式の証明、第1種ベッセル関数(besselj)

1. $\begin{array}{l}J\left(x\right)\\ =\sum _{n=0}^{\infty }\frac{{\left(-1\right)}^{n}}{{\left(n!\right)}^{2}}{\left(\frac{x}{2}\right)}^{2n}\\ =\sum _{n=0}^{\infty }\frac{{\left(-1\right)}^{n}}{{\left(n!\right)}^{2}{2}^{2n}}{x}^{2n}\\ \frac{d}{\mathrm{dx}}J\left(x\right)\\ =\sum _{n=1}^{\infty }\frac{{\left(-1\right)}^{n}}{{\left(n!\right)}^{2}{2}^{2n}}·2n{x}^{2n-1}\\ =\sum _{n=1}^{\infty }\frac{{\left(-1\right)}^{n}n}{{\left(n!\right)}^{2}{2}^{2n-1}}{x}^{2n-1}\\ =\sum _{n=0}^{\infty }\frac{{\left(-1\right)}^{n+1}\left(n+1\right)}{{\left(\left(n+1\right)!\right)}^{2}{2}^{2n+1}}{x}^{2n+1}\\ \frac{{d}^{2}}{d{x}^{2}}J\left(x\right)\\ =\sum _{n=0}^{\infty }\frac{{\left(-1\right)}^{n+1}\left(n+1\right)}{{\left(\left(n+1\right)!\right)}^{2}{2}^{2n+1}}\left(2n+1\right){x}^{2n}\end{array}$

よって、

$\begin{array}{l}{x}^{2}J\text{'}\text{'}\left(x\right)+xJ\text{'}\left(x\right)+{x}^{2}J\left(x\right)\\ =\sum _{n=0}^{\infty }\frac{{\left(-1\right)}^{n+1}\left(n+1\right)}{{\left(\left(n+1\right)!\right)}^{2}{2}^{2n+1}}\left(2n+1\right){x}^{2n+2}\\ +\sum _{n=0}^{\infty }\frac{{\left(-1\right)}^{n+1}\left(n+1\right)}{{\left(\left(n+1\right)!\right)}^{2}{2}^{2n+1}}{x}^{2n+2}\\ +\sum _{n=0}^{\infty }\frac{{\left(-1\right)}^{n}}{{\left(n!\right)}^{2}{2}^{2n}}{x}^{2n+2}\\ =\sum _{n=0}^{\infty }\frac{-{\left(-1\right)}^{n}\left(n+1\right)\left(2n+1\right)-{\left(-1\right)}^{n}\left(n+1\right)+{\left(-1\right)}^{n}{\left(n+1\right)}^{2}2}{{\left(\left(n+1\right)!\right)}^{2}{2}^{2n+1}}{x}^{2n+2}\\ =\sum _{n=0}^{\infty }\frac{{\left(-1\right)}^{n}\left(-2{n}^{2}-3n-1-n-1+2{n}^{2}+4n+2\right)}{{\left(\left(n+1\right)!\right)}^{2}{2}^{2n+1}}{x}^{2n+2}\\ =0\end{array}$

（証明終）

コード

Python 3

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

print('5.')

x, n = symbols('x, n')
t = (-1) ** n / factorial(n) ** 2 * (x / 2) ** (2 * n)
f = summation(t, (n, 0, oo))
f1 = Derivative(f, x, 1).doit()
f2 = Derivative(f, x, 2).doit()
for o in [f, f1, f2, (x ** 2 * f2 + x * f1 + x ** 2 * f).simplify()]:
pprint(o)
print()

def g(m):
return sum([t.subs({n: k}) for k in range(m + 1)])

fs = [1 / (1 + x ** 2)] + [g(m) for m in range(9)]
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 o, color in zip(p, colors):
o.line_color = color

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

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


% ./sample5.py
5.
besselj(0, x)

-besselj(1, x)

-besselj(0, x) + besselj(2, x)
──────────────────────────────
2

0

⎛  1        ⎞
⎜──────, red⎟
⎜ 2         ⎟
⎝x  + 1     ⎠

(1, green)

⎛     2      ⎞
⎜    x       ⎟
⎜1 - ──, blue⎟
⎝    4       ⎠

⎛ 4    2           ⎞
⎜x    x            ⎟
⎜── - ── + 1, brown⎟
⎝64   4            ⎠

⎛    6     4    2            ⎞
⎜   x     x    x             ⎟
⎜- ──── + ── - ── + 1, orange⎟
⎝  2304   64   4             ⎠

⎛   8       6     4    2            ⎞
⎜  x       x     x    x             ⎟
⎜────── - ──── + ── - ── + 1, purple⎟
⎝147456   2304   64   4             ⎠

⎛     10         8       6     4    2          ⎞
⎜    x          x       x     x    x           ⎟
⎜- ──────── + ────── - ──── + ── - ── + 1, pink⎟
⎝  14745600   147456   2304   64   4           ⎠

⎛    12          10         8       6     4    2          ⎞
⎜   x           x          x       x     x    x           ⎟
⎜────────── - ──────── + ────── - ──── + ── - ── + 1, gray⎟
⎝2123366400   14745600   147456   2304   64   4           ⎠

⎛       14            12          10         8       6     4    2
⎜      x             x           x          x       x     x    x
⎜- ──────────── + ────────── - ──────── + ────── - ──── + ── - ── + 1, skyblue
⎝  416179814400   2123366400   14745600   147456   2304   64   4

⎞
⎟
⎟
⎠

⎛       16              14            12          10         8       6     4
⎜      x               x             x           x          x       x     x
⎜─────────────── - ──────────── + ────────── - ──────── + ────── - ──── + ── -
⎝106542032486400   416179814400   2123366400   14745600   147456   2304   64

2            ⎞
x             ⎟
── + 1, yellow⎟
4             ⎠

%