0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

「テンソル場の微分の第1、第2の定義の違いを教えて下さい。」をAI先生へ。sympyで教えて下さい。

0
Last updated at Posted at 2026-05-26

(本日の)ChatGPT先生へ

テンソル場の微分の第1、第2の定義の違いを教えて下さい。

(以下抜粋) 小見出しを表示。何となくわかった部分のみ表示。

ざっくり言うと、
第1の定義:
「成分を座標で微分する」
第2の定義:
「幾何学的に意味を保つように接続(connection)を入れて微分する」
です。

  1. 第1の定義(単なる偏微分)...
  2. 第2の定義(共変微分)...
    ベクトル場で比較...
    共変ベクトルでは符号が変わる...
    一般テンソル...
    直感...
    SymPy 的には...
    本当に重要な一言...

(続けて)ChatGPT先生へ

sympy でそれぞれの説明お願いします。

1.準備

第1の定義(偏微分)

from sympy import *

# 座標
r, th = symbols('r th')

# ベクトル成分
Vr  = r**2
Vth = r*th

# 偏微分
dVr_dr   = diff(Vr, r)
dVr_dth  = diff(Vr, th)

dVth_dr  = diff(Vth, r)
dVth_dth = diff(Vth, th)

print("∂Vr/∂r    =", dVr_dr)
print("∂Vr/∂θ    =", dVr_dth)

print("∂Vθ/∂r    =", dVth_dr)
print("∂Vθ/∂θ    =", dVth_dth)

2.極座標では基底が回転する...
3.第2の定義(共変微分)...
SymPyコード

from sympy import *

# 座標
r, th = symbols('r th')

# ベクトル成分
Vr  = r**2
Vth = r*th

# 共変微分
# ∇θ Vr = ∂θ Vr + Γr_θk Vk

nabla_th_Vr = (
    diff(Vr, th)
    + (-r)*Vth
)

# ∇r Vθ = ∂r Vθ + Γθ_rθ Vθ

nabla_r_Vth = (
    diff(Vth, r)
    + (1/r)*Vth
)

print("∇θ Vr =", simplify(nabla_th_Vr))
print("∇r Vθ =", simplify(nabla_r_Vth))

第2の定義

from sympy import *

# 座標
r, th = symbols('r th')

# ベクトル成分
Vr  = r**2
Vth = r*th

# 共変微分
# ∇θ Vr = ∂θ Vr + Γr_θk Vk

nabla_th_Vr = (
    diff(Vr, th)
    + (-r)*Vth
)

# ∇r Vθ = ∂r Vθ + Γθ_rθ Vθ

nabla_r_Vth = (
    diff(Vth, r)
    + (1/r)*Vth
)

print("∇θ Vr =", simplify(nabla_th_Vr))
print("∇r Vθ =", simplify(nabla_r_Vth))

比較表...
SymPyでの本質...
幾何学的イメージ...
一番重要な式

???

いつもと違うおすすめです。

Qiita内

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?