学習環境
- Surface、Surface ペン(端末)
- Windows 10 Pro (OS)
- Nebo(Windows アプリ)
- iPad Pro 10.5 + Apple Pencil
- MyScript Nebo - MyScript(iPad アプリ(iOS))
- 参考書籍
解析入門 原書第3版 (S.ラング(著)、松坂 和夫(翻訳)、片山 孝次(翻訳)、岩波書店)の第4部(級数)、第14章(テイラーの公式)、6(逆正接関数)の練習問題12の解答を求めてみる。
コード
Python 3
#!/usr/bin/env python3
from sympy import pprint, symbols, exp, Limit, plot, Rational
print('12.')
x = symbols('x')
f = exp(x) - (1 + x)
g = x ** 2
h = f / g
l = Limit(h, x, 0)
for d in ['+', '-']:
l = Limit(h, x, 0, dir=d)
for o in [l, l.doit()]:
pprint(o)
print()
p = plot(f, g, h,
Rational(1, 2),
(x, -5, 5),
ylim=(0, 10),
show=False,
legend=True)
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('sample12.png')
入出力結果(cmd(コマンドプロンプト)、Terminal、Jupyter(IPython))
C:\Users\...>py sample12.py
12.
⎛ x ⎞
⎜-x + ℯ - 1⎟
lim ⎜───────────⎟
x─→0⁺⎜ 2 ⎟
⎝ x ⎠
1/2
⎛ x ⎞
⎜-x + ℯ - 1⎟
lim ⎜───────────⎟
x─→0⁻⎜ 2 ⎟
⎝ x ⎠
1/2
C:\Users\...>
0 コメント:
コメントを投稿