https://www.youtube.com/watch?v=So7vlARGs68&list=PLMrJAkhIeNNQromC4WswpU1krLOq5Ro6S&index=4
divergence 對一個 vector field 計算得到的是一個 scalar
課程舉簡單三個例子分別說明 divergence 正的、負的、0 (divergence free)
如果我們把 vector field 想成是如下的 dynamic system 的話 (如同在第一個課程提到的):
$$ \begin{align} \frac{d\vec{x}}{dt}=\vec{f}(\vec{x},t) \end{align} $$
在上圖右的 Ex1 第一個例子為
$$ \frac{d}{dt}\left[\begin{array}{c} x\\y\end{array}\right]=\vec{f}(x,y)= \left[\begin{array}{cc} 1 && 0\\ 0 && 1\\ \end{array}\right] \left[\begin{array}{c} x\\y \end{array}\right] $$
其中 $x,y$ 都和 $t$ 有關, 寫清楚點是 $x(t),y(t)$
則上式可以知道這是個簡單的 ODE: $\frac{d}{dt}x(t)=x(t)$ 和 $\frac{d}{dt}y(t)=y(t)$, 解為
$$ \left \begin{array}{c} x\\y \end{array} \right = \left[ \begin{array}{c} e^tx(0) \\ e^ty(0) \end{array} \right] $$
最後如果對 gradient 做 divergence 又會變回 scalar field 稱 Laplacian
Input field | Output field | Formula 二維舉例 | |
---|---|---|---|
Gradient $\nabla$ | scalar field | ||
$f:\mathbb{R}^n\rightarrow\mathbb{R}$ | vector field | $\nabla f=\left[\begin{array}{c} | |
\partial f/\partial x\\ | |||
\partial f/\partial y | |||
\end{array}\right]$ | |||
Divergence $\nabla\cdot$ | vector field | ||
$\vec{f}:\mathbb{R}^n\rightarrow\mathbb{R}^n$ | scalar field | $\nabla\cdot f=\left[\begin{array}{c} | |
\partial /\partial x\\ | |||
\partial /\partial y | |||
\end{array}\right] \cdot | |||
\left[\begin{array}{c} | |||
f_1\\ | |||
f_2 | |||
\end{array}\right]=\frac{\partial f_1}{\partial x}+\frac{\partial f_2}{\partial y}$ | |||
Curl $\nabla\times$ | vector field | ||
$\vec{f}:\mathbb{R}^n\rightarrow\mathbb{R}^n$ | vector field | ||
$\nabla\times\vec{f}=\left | |||
\begin{array}{cc} | |||
\vec{i} && \vec{j} && \vec{k} \\ | |||
\partial/\partial x && \partial/\partial y && \partial/\partial z \\ | |||
f_1(x,y,z) && f_2(x,y,z) && f_3(x,y,z) | |||
\end{array} | |||
\right | \\ | ||
=\left(\frac{\partial f_3}{\partial y}-\frac{\partial f_2}{\partial z}\right)\vec{i} | |||
-\left(\frac{\partial f_3}{\partial x}-\frac{\partial f_1}{\partial z}\right)\vec{j} | |||
+\left(\frac{\partial f_2}{\partial x}-\frac{\partial f_1}{\partial y}\right)\vec{k}$ | |||
Laplacian $\nabla\cdot\nabla$ | |||
或寫成 $\nabla^2$ | scalar field | ||
$f:\mathbb{R}^n\rightarrow\mathbb{R}$ | scalar field | $\nabla\cdot\nabla f= | |
\left[\begin{array}{c} | |||
\partial /\partial x\\ | |||
\partial /\partial y | |||
\end{array}\right] \cdot | |||
\left[\begin{array}{c} | |||
\partial f/\partial x\\ | |||
\partial f/\partial y | |||
\end{array}\right] = \frac{\partial^2 f}{\partial x^2} + \frac{\partial^2 f}{\partial y^2} = \nabla^2 f$ | |||
vector field | |||
$\vec{f}:\mathbb{R}^n\rightarrow\mathbb{R}^n$ | vector field | $\nabla\cdot\nabla \vec{f}= | |
\left[\begin{array}{c} | |||
\nabla\cdot\nabla f_1 \\ | |||
\nabla\cdot\nabla f_2 | |||
\end{array}\right] = | |||
\left[\begin{array}{c} | |||
\frac{\partial^2 f_1}{\partial x^2} + \frac{\partial^2 f_1}{\partial y^2}\\ | |||
\frac{\partial^2 f_2}{\partial x^2} + \frac{\partial^2 f_2}{\partial y^2} | |||
\end{array}\right]$ |