## 2019年10月24日木曜日

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

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

よって、

$\begin{array}{l}{x}^{2}{J}_{k}\text{'}\text{'}\left(x\right)+x{J}_{k}\text{'}\left(x\right)+\left({x}^{2}-{k}^{2}\right){J}_{k}\left(x\right)\\ =\sum _{n=0}^{\infty }\frac{{\left(-1\right)}^{n}}{n!\left(n+k\right)!}·\frac{\left(2n+k\right)\left(2n+k-1\right)}{{2}^{2n+k}}·{x}^{2n+k}\\ +\sum _{n=0}^{\infty }\frac{{\left(-1\right)}^{n}}{n!\left(n+k\right)}·\frac{2n+k}{{2}^{2n+k}}{x}^{2n+k}\\ +\sum _{n=0}^{\infty }\frac{{\left(-1\right)}^{n}}{n!\left(n+k\right)!}·\frac{1}{{2}^{2n+k}}{x}^{2n+k+2}\\ -\sum _{n=0}^{\infty }\frac{{\left(-1\right)}^{n}}{n!\left(n+k\right)!}·\frac{{k}^{2}}{{2}^{2n+k}}{x}^{2n+k}\\ =\sum _{n=0}^{\infty }\frac{{\left(-1\right)}^{n}}{n!\left(n+k\right)!}·\frac{1}{{2}^{2n+k}}\left(4{n}^{2}+4nk\right){x}^{2n+k}\\ +\sum _{n=1}^{\infty }\frac{{\left(-1\right)}^{n-1}}{\left(n-1\right)!\left(n+k-1\right)!}·\frac{1}{{2}^{2n+k-2}}{x}^{2n+k}\\ =\sum _{n=1}^{\infty }\frac{{\left(-1\right)}^{n}}{\left(n-1\right)!\left(n+k-1\right)!}·\frac{1}{{2}^{2n+k-2}}{x}^{2n+k}\\ -\sum _{n=1}^{\infty }\frac{{\left(-1\right)}^{n}}{\left(n-1\right)!\left(n+k-1\right)!}·\frac{1}{{2}^{2n+k·2}}{x}^{2a+k}\\ =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')
k = symbols('k', positive=True, integer=True)
t = (-1) ** n / (factorial(n) * factorial(n + k)) * (x / 2) ** (2 * n + k)
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 ** - k ** 2) * f).simplify()]:
pprint(o)
print()

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

k0 = 1
fs = [g(m).subs({k: k0}) for m in range(9)]
p = plot(f.subs({k: k0}), *fs,
ylim=(-10, 10),
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('sample6.png')


% ./sample6.py
5.
besselj(k, x)

besselj(k - 1, x)   besselj(k + 1, x)
───────────────── - ─────────────────
2                   2

-2⋅besselj(k, x) + besselj(k - 2, x) + besselj(k + 2, x)
────────────────────────────────────────────────────────
4

⎛  2
2 ⎜ k  + 1
-k  ⎜x      ⋅(x⋅(-2⋅besselj(k, x) + besselj(k - 2, x) + besselj(k + 2, x)) +
x   ⋅⎜────────────────────────────────────────────────────────────────────────
⎝                                                        4

⎞
⎟
2⋅besselj(k - 1, x) - 2⋅besselj(k + 1, x))                ⎟
────────────────────────────────────────── + besselj(k, x)⎟
⎠

⎛x     ⎞
⎜─, red⎟
⎝2     ⎠

⎛   3           ⎞
⎜  x    x       ⎟
⎜- ── + ─, green⎟
⎝  16   2       ⎠

⎛  5    3          ⎞
⎜ x    x    x      ⎟
⎜─── - ── + ─, blue⎟
⎝384   16   2      ⎠

⎛     7      5    3           ⎞
⎜    x      x    x    x       ⎟
⎜- ───── + ─── - ── + ─, brown⎟
⎝  18432   384   16   2       ⎠

⎛    9        7      5    3            ⎞
⎜   x        x      x    x    x        ⎟
⎜─────── - ───── + ─── - ── + ─, orange⎟
⎝1474560   18432   384   16   2        ⎠

⎛      11          9        7      5    3            ⎞
⎜     x           x        x      x    x    x        ⎟
⎜- ───────── + ─────── - ───── + ─── - ── + ─, purple⎟
⎝  176947200   1474560   18432   384   16   2        ⎠

⎛     13           11          9        7      5    3          ⎞
⎜    x            x           x        x      x    x    x      ⎟
⎜─────────── - ───────── + ─────── - ───── + ─── - ── + ─, pink⎟
⎝29727129600   176947200   1474560   18432   384   16   2      ⎠

⎛        15             13           11          9        7      5    3
⎜       x              x            x           x        x      x    x    x
⎜- ───────────── + ─────────── - ───────── + ─────── - ───── + ─── - ── + ─, g
⎝  6658877030400   29727129600   176947200   1474560   18432   384   16   2

⎞
⎟
ray⎟
⎠

⎛       17                15             13           11          9        7
⎜      x                 x              x            x           x        x
⎜──────────────── - ───────────── + ─────────── - ───────── + ─────── - ─────
⎝1917756584755200   6658877030400   29727129600   176947200   1474560   18432

5    3             ⎞
x    x    x         ⎟
+ ─── - ── + ─, skyblue⎟
384   16   2         ⎠

%