学習環境
- Surface 3 (4G LTE)、Surface 3 タイプ カバー、Surface ペン(端末)
- Windows 10 Pro (OS)
- 数式入力ソフト(TeX, MathML): MathType
- MathML対応ブラウザ: Firefox、Safari
- MathML非対応ブラウザ(Internet Explorer, Google Chrome...)用JavaScript Library: MathJax
- 参考書籍
オイラーの贈物―人類の至宝eiπ=-1を学ぶ (吉田 武(著)、東海大学出版会)の第Ⅰ部(基礎理論(Basic Theory))、2章(方程式と関数)、2.5(関数とグラフ)、2.1.5(連立方程式)、問題2.を取り組んでみる。
-
-
x=17−5y1500(17−5y)+7501y=25500+100a(−5·1500+7501)y=25500−1050·17+100ay=25500−1500·17+1000a−5·1500+7501=1000ax=17−5000a
x=17−5000·41000=−3y=1000·41000=4
x=17y=0
コード(Emacs)
Python 3
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from sympy import pprint, symbols, solve x, y, a = symbols('x y a') eqs = (x + 5 * y - 17, 1.5 * x + 7.501 * y - 25.5 - a) for a0 in [0, 0.004]: pprint(solve(map(lambda eq: eq.subs({a: a0}), eqs), dict=True))
入出力結果(Terminal, IPython)
$ ./sample2.py [{x: 17.0, y: 0.0}] [{x: -3.0, y: 4.0}] $
0 コメント:
コメントを投稿