```python
from sympy import *
from sympy.abc import *
from sympy.galgebra.ga import *
import numpy as np
from numpy import linalg as LA
from __future__ import print_function
init_printing()
```

## PDE 
The acoustic wave equation for the square slowness m and a source q is given in 3D by :

\begin{cases} 
 &mm  \frac{d^2 u(x,t)}{dt^2} - \nabla^2 u(x,t) =q  \\
 &u(.,0) = 0 \\
 &\frac{d u(x,t)}{dt}|_{t=0} = 0 
\end{cases}

with the zero initial conditons to guaranty unicity of the solution

# 4th order discretizaition

We have 

$ \frac{d^2 u(x,t)}{dt^2} \simeq \frac{u(x,t+dt) - 2 u(x,t) + u(x,t-dt)}{dt^2} - \frac{dt^2}{12}\frac{d^4u}{dt^4}+O(dt^4) $

and by differentiating the PDE we have 

$ m \frac{d^4u}{dt^4} = \nabla^2 \frac{d^2 u(x,t)}{dt^2} + \frac{d^2 q}{dt^2}$

and finally by replacing the discrete forms in the original pde we have

$ m \frac{u(x,t+dt) - 2 u(x,t) + u(x,t-dt)}{dt^2} = \nabla^2u(x,t) + q(t) + \frac{dt^2}{12} \left(m^{-1} \nabla^2 (\nabla^2 u(x,t) + q(t) ) +  \frac{d^2 q}{dt^2} \right)$

not that the term $\nabla^2 (\nabla^2 u(x,t))$ contains cross derivatives e.g in 2D :

$ \nabla^2 (\nabla^2 u(x,t)) = \frac{d^4 u(x,t)}{dx^4}  + \frac{d^4 u(x,t)}{dz^4} + 2  \frac{d^4 u(x,t)}{dx^2dz^2} $

but it can be computed in cascade by first computing $\nabla^2 u(x,t) + q(t)$ then compute $u(x,t+dt)$


```python

```

8f84d9080842322d2e1c74ddae9f82a14ceb190b
ipynb
Jupyter Notebook
AcousticFWI/4thorder.ipynb
devitocodes/notebooks
c2be1782afc525f4f9808e972860014726c06260
BSD-3-Clause
2016-04-05T14:04:58.000Z
2016-04-12T15:23:39.000Z
AcousticFWI/4thorder.ipynb
devitocodes/notebooks
c2be1782afc525f4f9808e972860014726c06260
BSD-3-Clause
2016-02-25T08:07:00.000Z
2017-02-17T13:03:52.000Z
AcousticFWI/4thorder.ipynb
opesci/notebooks
c2be1782afc525f4f9808e972860014726c06260
BSD-3-Clause
2016-07-27T22:44:14.000Z
2016-10-31T09:11:35.000Z
Qwen/Qwen-72B
1. YES
2. YES