0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

なぜ今ヤコビ行列なのか

先日、久しぶりにお会いした研究室の先輩がヤコビアンについて熱く語っていたから

極座標のヤコビ行列

直交座標(x,y)から極座標(r,θ)の変換式は次の通り

\displaylines{
 x = r\cos\theta \\
 y = r\sin\theta
}

これのヤコビ行列は次の通りとなる

\displaylines{
    \begin{pmatrix}
        \frac{\partial x}{\partial r} & \frac{\partial x}{\partial \theta} \\
        \frac{\partial y}{\partial r} & \frac{\partial y}{\partial \theta}
    \end{pmatrix}
    =
    \begin{pmatrix}
        \cos\theta & -r\sin\theta \\
        \sin\theta & r\cos\theta
    \end{pmatrix}
}

pythonで実現

jacobian.py
import numpy as np

def jacob_array(r, theta):
    return np.array([[np.cos(theta), -r*np.sin(theta)],[np.sin(theta), r*np.cos(theta)]])

# r=1, theta=0の場合
j = jacob_array(1,0)

print(j)

実行結果

python jacobian.py
[[ 1. -0.]
 [ 0.  1.]]
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?