## 2019年10月21日月曜日

### 数学 - Python - 解析学 - 級数 - べき級数の微分と積分 - 累乗、階乗、等式の証明、絶対収束、項別微分、BESSELI関数

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

よって、

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

（証明終）

コード

Python 3

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

print('3.')

x, n = symbols('x, n')
f = summation(x ** (2 * n) / factorial(n) ** 2, (n, 0, oo))
f1 = Derivative(f, x, 1).doit()
f2 = Derivative(f, x, 2).doit()

class MyTestCase(TestCase):
def setUp(self):
pass

def tearDown(self):
pass

def test(self):
self.assertEqual((x ** 2 * f2 + x * f1).simplify(), 4 * x ** 2 * f)

p = plot(f, f1, f2,
(x, -10, 10),
ylim=(-10, 10),
legend=True,
show=False)
colors = ['red', 'green', 'blue', 'brown', 'orange',
'purple', 'pink', 'gray', 'skyblue', 'yellow']

for o, color in zip(p, colors):
o.line_color = color

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

if __name__ == '__main__':
main()


% ./sample3.py
3.
.
----------------------------------------------------------------------
Ran 1 test in 0.040s

OK
%