## 2020年2月19日水曜日

### 数学 - Python - 解析学 - 関数列と関数級数 - 整級数 - 基本的な整級数展開、二項定理

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

2. $\begin{array}{l}\sqrt{1+x}\\ ={\left(1+x\right)}^{\frac{1}{2}}\\ =\sum _{n=0}^{\infty }\left(\frac{1}{{n}^{2}}\right){x}^{n}\\ =1+\frac{1}{2}x+\frac{\frac{1}{2}·\left(-\frac{1}{2}\right)}{2!}{x}^{2}+\frac{\frac{1}{2}·\left(-\frac{1}{2}\right)\left(-\frac{3}{2}\right)}{3!}{x}^{3}+\frac{\frac{1}{2}\left(-\frac{1}{2}\right)\left(-\frac{3}{2}\right)\left(-\frac{5}{2}\right)}{4!}{x}^{4}+\dots \\ =1+\frac{1}{2}x-\frac{1}{2}·\frac{1}{4}{x}^{2}+\frac{1·3}{2·4}·\frac{1}{6}{x}^{3}-\frac{1·3·5}{2·4·6}·\frac{1}{8}{x}^{4}+\dots \end{array}$

3. $\begin{array}{l}\frac{1}{\sqrt{1-{x}^{2}}}\\ ={\left(1-{x}^{2}\right)}^{-\frac{1}{2}}\\ =\sum _{n=0}^{\infty }\left(\begin{array}{c}-\frac{1}{2}\\ n\end{array}\right){\left(-{x}^{2}\right)}^{n}\\ =1+\left(-\frac{1}{2}\right)\left(-{x}^{2}\right)+\frac{\left(-\frac{1}{2}\right)\left(-\frac{3}{2}\right)}{2!}{\left(-{x}^{2}\right)}^{2}+\frac{\left(-\frac{1}{2}\right)\left(-\frac{3}{2}\right)\left(-\frac{5}{2}\right)}{3!}{\left(-{x}^{2}\right)}^{3}\\ +\frac{\left(-\frac{1}{2}\right)\left(-\frac{3}{2}\right)\left(-\frac{5}{2}\right)\left(-\frac{7}{2}\right)}{4!}{\left(-{x}^{2}\right)}^{4}+\dots \\ =1+\frac{1}{2}{x}^{2}+\frac{1·3}{2·4}{x}^{4}+\frac{1·3·5}{2·4·6}{x}^{6}+\frac{1·3·5·7}{2·4·6·8}{x}^{8}+\dots \end{array}$

コード

#!/usr/bin/env python3
from sympy import symbols, sqrt, plot

print('5.')

x = symbols('x')
fs = [1 / (1 + x) ** 2,
sqrt(1 + x),
1 / sqrt(1 - x ** 2)]

p = plot(*fs,
ylim=(0, 20),
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('sample5.png')


% ./sample5.py
5.
%