学習環境
- Surface 3 (4G LTE)、Surface 3 タイプ カバー、Surface ペン(端末)
- Windows 10 Pro (OS)
- Nebo(Windows アプリ)
- iPad Pro + Apple Pencil
- MyScript Nebo(iPad アプリ)
- 参考書籍
解析入門〈3〉(松坂 和夫(著)、岩波書店)の第14章(多変数の関数)、14.2(高次偏導関数、テイラーの定理)、問題3-(c).を取り組んでみる。
コード(Emacs)
Python 3
#!/usr/bin/env python3 from sympy import pprint, symbols, exp, Function, Derivative u, v = symbols('u, v') x = exp(u) + exp(v) y = exp(-u) + exp(-v) f = Function('f')(x, y) expr = Derivative(f, u, 2) + 2 * Derivative(Derivative(f, v, 1), u, 1) + Derivative(f, v, 2) for t in [expr, expr.doit(), expr.doit().factor()]: pprint(t) print()
入出力結果(Terminal, Jupyter(IPython))
$ ./sample3.py ⎛ ⎛ 2 ⎞│ ⎛⎛ 2 ⎞│ ⎜ v ⎜ ∂ ⎛ ⎛ -v -u⎞⎞⎟│ -v ⎜⎜ ∂ ⎟│ 2⋅⎜ℯ ⋅⎜────⎝f⎝ξ₁, ℯ + ℯ ⎠⎠⎟│ - ℯ ⋅⎜⎜───────(f(ξ₁, ξ₂))⎟│ u ⎜ ⎜ 2 ⎟│ u v ⎝⎝∂ξ₂ ∂ξ₁ ⎠│ξ₁=ℯ + ⎝ ⎝∂ξ₁ ⎠│ξ₁=ℯ + ℯ ⎞│ ⎞ ⎛ ⎛⎛ 2 ⎞│ ⎞│ ⎟│ ⎟ u ⎜ v ⎜⎜ ∂ ⎟│ ⎟│ v⎟│ -v -u⎟⋅ℯ - 2⋅⎜ℯ ⋅⎜⎜───────(f(ξ₁, ξ₂))⎟│ -v -u⎟│ u v - ℯ ⎠│ξ₂=ℯ + ℯ ⎟ ⎜ ⎝⎝∂ξ₂ ∂ξ₁ ⎠│ξ₂=ℯ + ℯ ⎠│ξ₁=ℯ + ℯ ⎠ ⎝ ⎛ 2 ⎞│ ⎞ 2 -v ⎜ ∂ ⎛ ⎛ u v ⎞⎞⎟│ ⎟ -u ∂ ⎛ ⎛ u v -v -u⎞⎞ ∂ ℯ ⋅⎜────⎝f⎝ℯ + ℯ , ξ₂⎠⎠⎟│ ⎟⋅ℯ + ───⎝f⎝ℯ + ℯ , ℯ + ℯ ⎠⎠ + ── ⎜ 2 ⎟│ -v -u⎟ 2 ⎝∂ξ₂ ⎠│ξ₂=ℯ + ℯ ⎠ ∂u ∂v 2 ⎛ ⎛ u v -v -u⎞⎞ ─⎝f⎝ℯ + ℯ , ℯ + ℯ ⎠⎠ 2 ⎛ ⎛ 2 ⎞│ ⎛⎛ 2 ⎞│ ⎜ u ⎜ ∂ ⎛ ⎛ -v -u⎞⎞⎟│ -u ⎜⎜ ∂ ⎟│ ⎜ℯ ⋅⎜────⎝f⎝ξ₁, ℯ + ℯ ⎠⎠⎟│ - ℯ ⋅⎜⎜───────(f(ξ₁, ξ₂))⎟│ u v ⎜ ⎜ 2 ⎟│ u v ⎝⎝∂ξ₂ ∂ξ₁ ⎠│ξ₁=ℯ + ℯ ⎝ ⎝∂ξ₁ ⎠│ξ₁=ℯ + ℯ ⎞│ ⎞ ⎛ ⎛⎛ 2 ⎞│ ⎞│ ⎟│ ⎟ u ⎜ u ⎜⎜ ∂ ⎟│ ⎟│ -u ⎟│ -v -u⎟⋅ℯ - ⎜ℯ ⋅⎜⎜───────(f(ξ₁, ξ₂))⎟│ -v -u⎟│ u v - ℯ ⋅ ⎠│ξ₂=ℯ + ℯ ⎟ ⎜ ⎝⎝∂ξ₂ ∂ξ₁ ⎠│ξ₂=ℯ + ℯ ⎠│ξ₁=ℯ + ℯ ⎠ ⎝ ⎛ 2 ⎞│ ⎞ ⎛ ⎛ 2 ⎞│ ⎜ ∂ ⎛ ⎛ u v ⎞⎞⎟│ ⎟ -u ⎜ v ⎜ ∂ ⎛ ⎛ -v -u⎞⎞⎟│ ⎜────⎝f⎝ℯ + ℯ , ξ₂⎠⎠⎟│ ⎟⋅ℯ + 2⋅⎜ℯ ⋅⎜────⎝f⎝ξ₁, ℯ + ℯ ⎠⎠⎟│ ⎜ 2 ⎟│ -v -u⎟ ⎜ ⎜ 2 ⎟│ ⎝∂ξ₂ ⎠│ξ₂=ℯ + ℯ ⎠ ⎝ ⎝∂ξ₁ ⎠│ξ₁=ℯ ⎛⎛ 2 ⎞│ ⎞│ ⎞ ⎛ ⎛ 2 -v ⎜⎜ ∂ ⎟│ ⎟│ ⎟ u ⎜ v ⎜ ∂ ⎛ ⎛ - ℯ ⋅⎜⎜───────(f(ξ₁, ξ₂))⎟│ u v⎟│ -v -u⎟⋅ℯ + ⎜ℯ ⋅⎜────⎝f⎝ u v ⎝⎝∂ξ₂ ∂ξ₁ ⎠│ξ₁=ℯ + ℯ ⎠│ξ₂=ℯ + ℯ ⎟ ⎜ ⎜ 2 + ℯ ⎠ ⎝ ⎝∂ξ₁ ⎞│ ⎛⎛ 2 ⎞│ ⎞│ -v -u⎞⎞⎟│ -v ⎜⎜ ∂ ⎟│ ⎟│ ξ₁, ℯ + ℯ ⎠⎠⎟│ - ℯ ⋅⎜⎜───────(f(ξ₁, ξ₂))⎟│ u v⎟│ -v ⎟│ u v ⎝⎝∂ξ₂ ∂ξ₁ ⎠│ξ₁=ℯ + ℯ ⎠│ξ₂=ℯ + ℯ ⎠│ξ₁=ℯ + ℯ ⎞ ⎛ ⎛⎛ 2 ⎞│ ⎞│ ⎛ 2 ⎟ v ⎜ v ⎜⎜ ∂ ⎟│ ⎟│ -v ⎜ ∂ ⎛ ⎛ u -u⎟⋅ℯ - ⎜ℯ ⋅⎜⎜───────(f(ξ₁, ξ₂))⎟│ -v -u⎟│ u v - ℯ ⋅⎜────⎝f⎝ℯ + ⎟ ⎜ ⎝⎝∂ξ₂ ∂ξ₁ ⎠│ξ₂=ℯ + ℯ ⎠│ξ₁=ℯ + ℯ ⎜ 2 ⎠ ⎝ ⎝∂ξ₂ ⎞│ ⎞ ⎛ ⎛⎛ 2 ⎞│ ⎞│ v ⎞⎞⎟│ ⎟ -v ⎜ v ⎜⎜ ∂ ⎟│ ⎟│ ℯ , ξ₂⎠⎠⎟│ ⎟⋅ℯ - 2⋅⎜ℯ ⋅⎜⎜───────(f(ξ₁, ξ₂))⎟│ -v -u⎟│ u ⎟│ -v -u⎟ ⎜ ⎝⎝∂ξ₂ ∂ξ₁ ⎠│ξ₂=ℯ + ℯ ⎠│ξ₁=ℯ ⎠│ξ₂=ℯ + ℯ ⎠ ⎝ ⎛ 2 ⎞│ ⎞ -v ⎜ ∂ ⎛ ⎛ u v ⎞⎞⎟│ ⎟ -u u ⎛ ∂ ⎛ ⎛ -v -u v - ℯ ⋅⎜────⎝f⎝ℯ + ℯ , ξ₂⎠⎠⎟│ ⎟⋅ℯ + ℯ ⋅⎜───⎝f⎝ξ₁, ℯ + ℯ + ℯ ⎜ 2 ⎟│ -v -u⎟ ⎝∂ξ₁ ⎝∂ξ₂ ⎠│ξ₂=ℯ + ℯ ⎠ ⎞⎞⎞│ v ⎛ ∂ ⎛ ⎛ -v -u⎞⎞⎞│ -v ⎛ ∂ ⎛ ⎛ u v ⎠⎠⎟│ u v + ℯ ⋅⎜───⎝f⎝ξ₁, ℯ + ℯ ⎠⎠⎟│ u v + ℯ ⋅⎜───⎝f⎝ℯ + ℯ , ξ ⎠│ξ₁=ℯ + ℯ ⎝∂ξ₁ ⎠│ξ₁=ℯ + ℯ ⎝∂ξ₂ ⎞⎞⎞│ -u ⎛ ∂ ⎛ ⎛ u v ⎞⎞⎞│ ₂⎠⎠⎟│ -v -u + ℯ ⋅⎜───⎝f⎝ℯ + ℯ , ξ₂⎠⎠⎟│ -v -u ⎠│ξ₂=ℯ + ℯ ⎝∂ξ₂ ⎠│ξ₂=ℯ + ℯ ⎛ ⎛ 2 ⎞│ ⎛ 2 ⎛ u v⎞ ⎜ 3⋅u 2⋅v ⎜ ∂ ⎛ ⎛ -v -u⎞⎞⎟│ 2⋅u 3⋅v ⎜ ∂ ⎛ ⎛ ⎝ℯ + ℯ ⎠⋅⎜ℯ ⋅ℯ ⋅⎜────⎝f⎝ξ₁, ℯ + ℯ ⎠⎠⎟│ + ℯ ⋅ℯ ⋅⎜────⎝f⎝ξ ⎜ ⎜ 2 ⎟│ u v ⎜ 2 ⎝ ⎝∂ξ₁ ⎠│ξ₁=ℯ + ℯ ⎝∂ξ₁ ⎞│ -v -u⎞⎞⎟│ 2⋅u 2⋅v ⎛ ∂ ⎛ ⎛ -v -u⎞⎞⎞│ ₁, ℯ + ℯ ⎠⎠⎟│ + ℯ ⋅ℯ ⋅⎜───⎝f⎝ξ₁, ℯ + ℯ ⎠⎠⎟│ u v - 2⋅ ⎟│ u v ⎝∂ξ₁ ⎠│ξ₁=ℯ + ℯ ⎠│ξ₁=ℯ + ℯ ⎛⎛ 2 ⎞│ ⎞│ ⎛⎛ 2 2⋅u v ⎜⎜ ∂ ⎟│ ⎟│ u 2⋅v ⎜⎜ ∂ ℯ ⋅ℯ ⋅⎜⎜───────(f(ξ₁, ξ₂))⎟│ -v -u⎟│ u v - 2⋅ℯ ⋅ℯ ⋅⎜⎜───────(f ⎝⎝∂ξ₂ ∂ξ₁ ⎠│ξ₂=ℯ + ℯ ⎠│ξ₁=ℯ + ℯ ⎝⎝∂ξ₂ ∂ξ₁ ⎞│ ⎞│ ⎟│ ⎟│ u v ⎛ ∂ ⎛ ⎛ u v ⎞⎞⎞│ (ξ₁, ξ₂))⎟│ -v -u⎟│ u v + ℯ ⋅ℯ ⋅⎜───⎝f⎝ℯ + ℯ , ξ₂⎠⎠⎟│ -v -u ⎠│ξ₂=ℯ + ℯ ⎠│ξ₁=ℯ + ℯ ⎝∂ξ₂ ⎠│ξ₂=ℯ + ℯ ⎛ 2 ⎞│ ⎛ 2 ⎞│ u ⎜ ∂ ⎛ ⎛ u v ⎞⎞⎟│ v ⎜ ∂ ⎛ ⎛ u v ⎞⎞⎟│ + ℯ ⋅⎜────⎝f⎝ℯ + ℯ , ξ₂⎠⎠⎟│ + ℯ ⋅⎜────⎝f⎝ℯ + ℯ , ξ₂⎠⎠⎟│ ⎜ 2 ⎟│ -v -u ⎜ 2 ⎟│ -v ⎝∂ξ₂ ⎠│ξ₂=ℯ + ℯ ⎝∂ξ₂ ⎠│ξ₂=ℯ + ⎞ ⎟ -2⋅u -2⋅v ⎟⋅ℯ ⋅ℯ -u⎟ ℯ ⎠ $
0 コメント:
コメントを投稿