学習環境
- Surface、Surface ペン(端末)
- Windows 10 Pro (OS)
- Nebo(Windows アプリ)
- iPad Pro 10.5 + Apple Pencil
- MyScript Nebo - MyScript(iPad アプリ(iOS))
- 参考書籍
解析入門(上) (松坂和夫 数学入門シリーズ 4) (松坂 和夫(著)、岩波書店)の第5章(各種の初等関数)、5.4(三角関数(続き)、逆三角関数)、問題10の解答を求めてみる。
また、
よって、
と仮定すると、
よって、 帰納法により 成り立つ。
(証明終)
コード
Python 3
#!/usr/bin/env python3
from sympy import pprint, symbols, sin, cos, factorial, plot
from sympy import summation, factorial
print('10.')
k, n, x = symbols('k, n, x')
fn = summation((-1) ** (k - 1) * x ** (2 * k - 1) / factorial(2 * k - 1),
(k, 1, n))
gn = summation((-1) ** (k - 1) * x ** (2 * k - 2) / factorial(2 * k - 2),
(k, 1, n))
ns = range(1, 5)
fns = [fn.subs({n: n0}) for n0 in ns]
gns = [gn.subs({n: n0}) for n0 in ns]
hs = [sin(x)] + fns + [cos(x)] + gns
p = plot(*hs,
(x, 0, 5),
ylim=(-2.5, 2.5),
show=False,
legend=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(hs, colors):
pprint(o)
print()
p.show()
p.save(f'sample10.png')
入出力結果(Bash、cmd.exe(コマンドプロンプト)、Terminal、Jupyter(IPython))
$ ./sample10.py 10. (sin(x), red) ⎛ ⎛ │ 2 ⎞ ⎞ ⎜ 3 ┌─ ⎜ 1 │ -x ⎟ ⎟ ⎜x ⋅ ├─ ⎜ │ ────⎟ ⎟ ⎜ 1╵ 2 ⎝2, 5/2 │ 4 ⎠ ⎟ ⎜─────────────────────── + sin(x), green⎟ ⎝ 6 ⎠ ⎛ ⎛ │ 2 ⎞ ⎞ ⎜ 5 ┌─ ⎜ 1 │ -x ⎟ ⎟ ⎜ x ⋅ ├─ ⎜ │ ────⎟ ⎟ ⎜ 1╵ 2 ⎝3, 7/2 │ 4 ⎠ ⎟ ⎜- ─────────────────────── + sin(x), blue⎟ ⎝ 120 ⎠ ⎛ ⎛ │ 2 ⎞ ⎞ ⎜ 7 ┌─ ⎜ 1 │ -x ⎟ ⎟ ⎜x ⋅ ├─ ⎜ │ ────⎟ ⎟ ⎜ 1╵ 2 ⎝4, 9/2 │ 4 ⎠ ⎟ ⎜─────────────────────── + sin(x), brown⎟ ⎝ 5040 ⎠ ⎛ ⎛ │ 2 ⎞ ⎞ ⎜ 9 ┌─ ⎜ 1 │ -x ⎟ ⎟ ⎜ x ⋅ ├─ ⎜ │ ────⎟ ⎟ ⎜ 1╵ 2 ⎝5, 11/2 │ 4 ⎠ ⎟ ⎜- ──────────────────────── + sin(x), orange⎟ ⎝ 362880 ⎠ (cos(x), purple) ⎛ ⎛ │ 2 ⎞ ⎞ ⎜ 2 ┌─ ⎜ 1 │ -x ⎟ ⎟ ⎜x ⋅ ├─ ⎜ │ ────⎟ ⎟ ⎜ 1╵ 2 ⎝3/2, 2 │ 4 ⎠ ⎟ ⎜─────────────────────── + cos(x), pink⎟ ⎝ 2 ⎠ ⎛ ⎛ │ 2 ⎞ ⎞ ⎜ 4 ┌─ ⎜ 1 │ -x ⎟ ⎟ ⎜ x ⋅ ├─ ⎜ │ ────⎟ ⎟ ⎜ 1╵ 2 ⎝5/2, 3 │ 4 ⎠ ⎟ ⎜- ─────────────────────── + cos(x), gray⎟ ⎝ 24 ⎠ ⎛ ⎛ │ 2 ⎞ ⎞ ⎜ 6 ┌─ ⎜ 1 │ -x ⎟ ⎟ ⎜x ⋅ ├─ ⎜ │ ────⎟ ⎟ ⎜ 1╵ 2 ⎝7/2, 4 │ 4 ⎠ ⎟ ⎜─────────────────────── + cos(x), skyblue⎟ ⎝ 720 ⎠ ⎛ ⎛ │ 2 ⎞ ⎞ ⎜ 8 ┌─ ⎜ 1 │ -x ⎟ ⎟ ⎜ x ⋅ ├─ ⎜ │ ────⎟ ⎟ ⎜ 1╵ 2 ⎝9/2, 5 │ 4 ⎠ ⎟ ⎜- ─────────────────────── + cos(x), yellow⎟ ⎝ 40320 ⎠ $
0 コメント:
コメントを投稿