```python
from galgebra.ga import Ga
from sympy import symbols
from galgebra.printer import Format

Format()
coords = (et,ex,ey,ez) = symbols('t,x,y,z',real=True)
base=Ga('e*t|x|y|z',g=[1,-1,-1,-1],coords=symbols('t,x,y,z',real=True),wedge=False)

potential=base.mv('phi','vector',f=True)
potential
```




\begin{equation*}phi = \phi ^{t}  \boldsymbol{e}_{t} + \phi ^{x}  \boldsymbol{e}_{x} + \phi ^{y}  \boldsymbol{e}_{y} + \phi ^{z}  \boldsymbol{e}_{z}\end{equation*}




```python
field=base.grad*potential
field
```




\begin{equation*}\left ( \partial_{t} \phi ^{t}  + \partial_{x} \phi ^{x}  + \partial_{y} \phi ^{y}  + \partial_{z} \phi ^{z} \right )  + \left ( \partial_{x} \phi ^{t}  + \partial_{t} \phi ^{x} \right ) \boldsymbol{e}_{tx} + \left ( \partial_{y} \phi ^{t}  + \partial_{t} \phi ^{y} \right ) \boldsymbol{e}_{ty} + \left ( \partial_{z} \phi ^{t}  + \partial_{t} \phi ^{z} \right ) \boldsymbol{e}_{tz} + \left ( \partial_{y} \phi ^{x}  - \partial_{x} \phi ^{y} \right ) \boldsymbol{e}_{xy} + \left ( \partial_{z} \phi ^{x}  - \partial_{x} \phi ^{z} \right ) \boldsymbol{e}_{xz} + \left ( \partial_{z} \phi ^{y}  - \partial_{y} \phi ^{z} \right ) \boldsymbol{e}_{yz}\end{equation*}




```python
grad_field = base.grad*field
grad_field
```




\begin{equation*}\left ( \partial^{2}_{t} \phi ^{t}  - \partial^{2}_{x} \phi ^{t}  - \partial^{2}_{y} \phi ^{t}  - \partial^{2}_{z} \phi ^{t} \right ) \boldsymbol{e}_{t} + \left ( \partial^{2}_{t} \phi ^{x}  - \partial^{2}_{x} \phi ^{x}  - \partial^{2}_{y} \phi ^{x}  - \partial^{2}_{z} \phi ^{x} \right ) \boldsymbol{e}_{x} + \left ( \partial^{2}_{t} \phi ^{y}  - \partial^{2}_{x} \phi ^{y}  - \partial^{2}_{y} \phi ^{y}  - \partial^{2}_{z} \phi ^{y} \right ) \boldsymbol{e}_{y} + \left ( \partial^{2}_{t} \phi ^{z}  - \partial^{2}_{x} \phi ^{z}  - \partial^{2}_{y} \phi ^{z}  - \partial^{2}_{z} \phi ^{z} \right ) \boldsymbol{e}_{z}\end{equation*}




```python
part=field.proj([base.mv()[0]^base.mv()[1]])
part
```




\begin{equation*}\left ( \partial_{x} \phi ^{t}  + \partial_{t} \phi ^{x} \right ) \boldsymbol{e}_{tx}\end{equation*}




```python
dpart = base.grad*part
dpart
```




\begin{equation*}\left ( - \partial^{2}_{x} \phi ^{t}  - \partial_{t}\partial_{x} \phi ^{x} \right ) \boldsymbol{e}_{t} + \left ( \partial^{2}_{t} \phi ^{x}  + \partial_{t}\partial_{x} \phi ^{t} \right ) \boldsymbol{e}_{x} + \left ( - \partial_{x}\partial_{y} \phi ^{t}  - \partial_{t}\partial_{y} \phi ^{x} \right ) \boldsymbol{e}_{txy} + \left ( - \partial_{x}\partial_{z} \phi ^{t}  - \partial_{t}\partial_{z} \phi ^{x} \right ) \boldsymbol{e}_{txz}\end{equation*}



80b34e5cf6b2d4173d98d854c8435e03f70c3487
ipynb
Jupyter Notebook
examples/ipython/second_derivative.ipynb
pygae/galgebra
3a53b29fb141be1ae47d8df8fc7005c10869cded
BSD-3-Clause
2018-09-18T12:30:14.000Z
2022-03-16T08:02:48.000Z
examples/ipython/second_derivative.ipynb
caiomrcs/galgebra
3a53b29fb141be1ae47d8df8fc7005c10869cded
BSD-3-Clause
2018-09-19T01:42:30.000Z
2022-01-18T14:02:00.000Z
examples/ipython/second_derivative.ipynb
caiomrcs/galgebra
3a53b29fb141be1ae47d8df8fc7005c10869cded
BSD-3-Clause
2019-02-22T08:25:50.000Z
2022-01-15T05:20:22.000Z
Qwen/Qwen-72B
1. YES
2. YES