## 2020年2月21日金曜日

### 数学 - Python - 解析学 - 関数列と関数級数 - 整級数 - 逆正弦関数の整級数展開、微分、無限等比級数、二項定理、収束半径、項別積分

1. 逆正弦関数を微分すると、

$\frac{d}{\mathrm{dx}}\mathrm{arcsin}x=\frac{1}{\sqrt{1-{x}^{2}}}$

また、二項定理より、

$\begin{array}{l}\frac{1}{\sqrt{1-{x}^{2}}}\\ ={\left(1-{x}^{2}\right)}^{-\frac{1}{2}}\\ =\sum _{n=0}^{\infty }\left(-\frac{1}{{n}^{2}}\right){\left(-{x}^{2}\right)}^{n}\\ =\sum _{n=0}^{\infty }\left(\begin{array}{c}-\frac{1}{2}\\ n\end{array}\right){\left(-1\right)}^{n}{x}^{2n}\end{array}$

この整級数の項別積分を考えれば、

$\begin{array}{l}\mathrm{arcsin}x\\ =\sum _{n=0}^{\infty }\left(\begin{array}{c}-\frac{1}{2}\\ n\end{array}\right){\left(-1\right)}^{n}\frac{1}{2n+1}{x}^{2n+1}\end{array}$

コード

#!/usr/bin/env python3
from sympy import symbols, plot, factorial, pprint, asin, Rational

print('7.')

def comb(a, n):
num = 1
for n0 in range(n):
num *= (a - n0)
return num / factorial(n)

x = symbols('x')
p = plot(asin(x),
*[sum([comb(-Rational(1, 2), n) * (-1) ** n * 1 / (2 * n + 1) * x ** (2 * n + 1) for n in range(m)])
for m in range(1, 6)],
(x, -1.5, 1.5),
ylim=(-1.5, 1.5),
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(p, colors):
pprint(o)

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


% ./sample7.py
7.
(cartesian line: asin(x) for x over (-1.5, 1.5), red)
(cartesian line: x for x over (-1.5, 1.5), green)
(cartesian line: x**3/6 + x for x over (-1.5, 1.5), blue)
(cartesian line: 3*x**5/40 + x**3/6 + x for x over (-1.5, 1.5), brown)
(cartesian line: 5*x**7/112 + 3*x**5/40 + x**3/6 + x for x over (-1.5, 1.5), ora
nge)
(cartesian line: 35*x**9/1152 + 5*x**7/112 + 3*x**5/40 + x**3/6 + x for x over (
-1.5, 1.5), purple)
%