2020年2月19日水曜日

学習環境

解析入門(上) (松坂和夫 数学入門シリーズ 4) (松坂 和夫(著)、岩波書店)の第9章(関数列と関数級数)、9.2(整級数)、問題5の解答を求めてみる。



    1. 1 1 + x 2 = 1 + x - 2 = n = 0 - 2 n x n = 1 - 2 x + - 2 - 3 2 ! x 2 + - 2 - 3 - 4 3 ! x 3 + = 1 - 2 x + 3 x 2 - 4 x 3 +

    2. 1 + x = 1 + x 1 2 = n = 0 1 n 2 x n = 1 + 1 2 x + 1 2 · - 1 2 2 ! x 2 + 1 2 · - 1 2 - 3 2 3 ! x 3 + 1 2 - 1 2 - 3 2 - 5 2 4 ! x 4 + = 1 + 1 2 x - 1 2 · 1 4 x 2 + 1 · 3 2 · 4 · 1 6 x 3 - 1 · 3 · 5 2 · 4 · 6 · 1 8 x 4 +

    3. 1 1 - x 2 = 1 - x 2 - 1 2 = n = 0 - 1 2 n - x 2 n = 1 + - 1 2 - x 2 + - 1 2 - 3 2 2 ! - x 2 2 + - 1 2 - 3 2 - 5 2 3 ! - x 2 3 + - 1 2 - 3 2 - 5 2 - 7 2 4 ! - x 2 4 + = 1 + 1 2 x 2 + 1 · 3 2 · 4 x 4 + 1 · 3 · 5 2 · 4 · 6 x 6 + 1 · 3 · 5 · 7 2 · 4 · 6 · 8 x 8 +

コード

#!/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')

入出力結果(Zsh、PowerShell、Terminal、Jupyter(IPython))

% ./sample5.py
5.
%

0 コメント:

コメントを投稿