学習環境
- Surface、Surface ペン(端末)
- Windows 10 Pro (OS)
- Nebo(Windows アプリ)
- iPad Pro 10.5 + Apple Pencil
- MyScript Nebo - MyScript(iPad アプリ(iOS))
- 参考書籍
解析入門 原書第3版 (S.ラング(著)、松坂 和夫(翻訳)、片山 孝次(翻訳)、岩波書店)の第3部(積分)、第13章(積分の応用)、補充問題、回転体の体積の練習問題11の解答を求めてみる。
よって、 求める回転体の体積は、
コード
Python 3
#!/usr/bin/env python3 from sympy import pprint, symbols, Integral, pi, plot, tan x = symbols('x') f = tan(x) x1, x2 = 0, pi / 3 I = Integral(pi * f ** 2, (x, x1, x2)) for o in [I, I.doit()]: pprint(o.simplify()) print() x0 = -pi x3 = pi p = plot((f, (x, x0, x1)), (f, (x, x1, x2)), (f, (x, x2, x3)), ylim=(-5, 5), legend=True, show=False) colors = ['red', 'green', 'blue', 'brown', 'orange', 'purple'] 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 π ─ 3 ⌠ ⎮ 2 ⎮ π⋅tan (x) dx ⌡ 0 π⋅(-π + 3⋅√3) ───────────── 3 C:\Users\...>
0 コメント:
コメントを投稿