学習環境
- Surface、Surface ペン(端末)
- Windows 10 Pro (OS)
- Nebo(Windows アプリ)
- iPad Pro 10.5 + Apple Pencil
- MyScript Nebo - MyScript(iPad アプリ(iOS))
- 参考書籍
解析入門 原書第3版 (S.ラング(著)、松坂 和夫(翻訳)、片山 孝次(翻訳)、岩波書店)の第4部(級数)、第14章(テイラーの公式)、3(三角関数)の練習問題11-(f)の解答を求めてみる。
置換積分法。
テイラー の公式。
よって、
ゆえに、
かつ
よって求める積分の小数第3位までの値は、
コード
Python 3
#!/usr/bin/env python3
from sympy import pprint, symbols, sin, Integral, plot, factorial, Rational
print('11-(f).')
x = symbols('x')
f = sin(x ** 2) / x ** 2
i = Integral(f, (x, 0, 1))
g = Rational(1, 2) * (x ** -Rational(1, 2) -
1 / factorial(3) * x ** Rational(3, 2) +
1 / factorial(5) * x ** Rational(7, 2))
for o in [i, i.doit(), float(i.doit()), g]:
pprint(o)
print()
p = plot(f, g, (x, -2, 2), show=False, legend=True)
colors = ['red', 'green', 'blue', 'brown']
for s, color in zip(p, colors):
s.line_color = color
p.show()
p.save('sample11.png')
入出力結果(cmd(コマンドプロンプト)、Terminal、Jupyter(IPython))
C:\Users\...>py -3 sample11.py
11-(f).
1
⌠
⎮ ⎛ 2⎞
⎮ sin⎝x ⎠
⎮ ─────── dx
⎮ 2
⎮ x
⌡
0
⎛√2⎞
√2⋅√π⋅fresnelc⎜──⎟⋅Γ(1/4)
sin(1)⋅Γ(1/4) ⎝√π⎠
- ───────────── + ─────────────────────────
4⋅Γ(5/4) 4⋅Γ(5/4)
0.9675774909926477
7/2 3/2
x x 1
──── - ──── + ────
240 12 2⋅√x
C:\Users\...>
0 コメント:
コメントを投稿