学習環境
- Surface 3 (4G LTE)、Surface 3 タイプ カバー、Surface ペン(端末)
- Windows 10 Pro (OS)
- 数式入力ソフト(TeX, MathML): MathType
- MathML対応ブラウザ: Firefox、Safari
- MathML非対応ブラウザ(Internet Explorer, Microsoft Edge, Google Chrome...)用JavaScript Library: MathJax
- 参考書籍
数学読本〈5〉微分法の応用/積分法/積分法の応用/行列と行列式(松坂 和夫(著)、岩波書店)の第19章(細分による加法 - 積分法)、19.3(定積分の性質と計算)、積分と不等式、問39.を取り組んでみる。
コード(Emacs)
Python 3
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from sympy import pprint, symbols, Integral, plot
print('39.')
x = symbols('x')
a = -1
b = 2
f = x
I1 = abs(Integral(f, (x, a, b)))
I2 = Integral(f, (x, a, b))
for I in [I1, I2]:
pprint(I)
print()
print(I1.doit() <= I2.doit())
p = plot(f, -f, abs(f), show=False, legend=True)
for i, color in enumerate(['red', 'green', 'blue']):
p[i].line_color = color
p.save('sample39.svg')
入出力結果(Terminal, IPython)
$ ./sample39.py 39. │2 │ │⌠ │ │⎮ x dx│ │⌡ │ │-1 │ 2 ⌠ ⎮ x dx ⌡ -1 True $
0 コメント:
コメントを投稿