学習環境
- 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
- 参考書籍
解析入門 原書第3版 (S.ラング(著)、松坂 和夫(翻訳)、片山 孝次(翻訳)、岩波書店)の第2部(微分と基本的な関数)、第6章(曲線をえがくこと)、4(極座標)、練習問題45、46、47.を取り組んでみる。
半直線。
半直線。
半直線。
コード(Emacs)
Python 3
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from sympy import pprint, symbols, plot, solve, tan, Rational
x, y = symbols('x y', real=True)
eqs = [x,
y - x * tan(Rational(3, 10)),
y - x * tan(Rational(1, 2))]
for i, eq in enumerate(eqs, 45):
try:
print(f'{i}.')
s = solve(eq, y)
pprint(s)
p = plot(*s, show=False, legend=True)
p.save(f'sample{i}.svg')
except Exception as err:
print(type(err), err)
print()
入出力結果(Terminal, IPython)
$ ./sample45.py 45. [] <class 'IndexError'> list index out of range 46. [x⋅tan(3/10)] 47. [x⋅tan(1/2)] $
0 コメント:
コメントを投稿