学習環境
- Surface 3 (4G LTE)、Surface 3 タイプ カバー、Surface ペン(端末)
- Windows 10 Pro (OS)
- Nebo(Windows アプリ)
- iPad Pro + Apple Pencil
- MyScript Nebo(iPad アプリ)
- 参考書籍
解析入門〈3〉(松坂 和夫(著)、岩波書店)の第14章(多変数の関数)、14.1(微分可能性と勾配ベクトル)、問題12.を取り組んでみる。
- 
    
 
- (0,0) において微分可能であると仮定する。 - よって矛盾。 - ゆえに、原点において f は微分可能ではない。 
 
コード(Emacs)
Python 3
#!/usr/bin/env python3
from sympy import pprint, symbols, Matrix, Derivative
x, y = symbols('x, y')
xs = [x, y]
f = x ** 3 / (x ** 2 + y ** 2)
gradf = Matrix([Derivative(f, xi, 1).doit() for xi in xs])
for t in [f, gradf]:
    pprint(t)
    print()
入出力結果(Terminal, Jupyter(IPython))
$ ./sample12.py
    3  
   x   
───────
 2    2
x  + y 
⎡        4           2 ⎤
⎢     2⋅x         3⋅x  ⎥
⎢- ────────── + ───────⎥
⎢           2    2    2⎥
⎢  ⎛ 2    2⎞    x  + y ⎥
⎢  ⎝x  + y ⎠           ⎥
⎢                      ⎥
⎢           3          ⎥
⎢       -2⋅x ⋅y        ⎥
⎢      ──────────      ⎥
⎢               2      ⎥
⎢      ⎛ 2    2⎞       ⎥
⎣      ⎝x  + y ⎠       ⎦
$
macOS High Sierraの標準搭載されているグラフ作成ソフト、Grapher で作成。
 
0 コメント:
コメントを投稿