## 2 Mathematical Foundations
### Direct Method  
The direct method, also often referred to as the forward modeling method, involves simulating how a BRL measurement would appear given a specific soil resistivity model. This method is fundamental for understanding how different soil properties influence resistivity measurements and is essential for comparing theoretical predictions with actual data. Let us consider a point current source of strength \(I\) located at \(\overset{\rightarrow}{r}_{P}\) in a semi-infinite soil (\(z\geq 0\)) whose conductivity is a function \(\sigma(\overset{\rightarrow}{r})\). The electric potential \(\phi(\overset{\rightarrow}{r})\) generated at point \(\overset{\rightarrow}{r}\), also called [PERSON]'s function, is the solution of the boundary value problem (BVP). \[ \begin{array}{l}\
abla\cdot(\sigma(\overset{\rightarrow}{r})\
abla\phi( \overset{\rightarrow}{r}))=-I\delta(\overset{\rightarrow}{r}-\overset{ \rightarrow}{r}_{P})\\ \
abla\phi\cdot\overset{\rightarrow}{n}_{z}|_{z=0}=0\\ \phi(\overset{\rightarrow}{r}\rightarrow\infty)=0\end{array}  \tag{1}\]  
BVP (1) is difficult to solve in general. Through the change \(u=\phi\cdot\sqrt{\sigma}\), (1) becomes part of the following equation for the new variable \(u(\overset{\rightarrow}{r})\),  
\[\
abla^{2}u(\overset{\rightarrow}{r})-\frac{\
abla^{2}(\sqrt{\sigma( \overset{\rightarrow}{r})})}{\sqrt{\sigma(\overset{\rightarrow}{r})}}u( \overset{\rightarrow}{r})=-\frac{I}{\sqrt{\sigma(\overset{\rightarrow}{r})} }\delta(\overset{\rightarrow}{r}-\overset{\rightarrow}{r}_{P}) \tag{2}\]When the conductivity \(\sigma(\overrightarrow{r})\) only depends on the z coordinate, the LHS second term of (2) becomes \(F=\frac{1}{\sqrt{\sigma(z)}}\frac{d^{2}\sqrt{\sigma(z)}}{dz^{2}}\), which will be forced to take a constant value. Among other possibilities, when the constant value \(F\) is set to \(\beta^{2}\), it can be proof that \(\sigma(z)=\left(C_{1}\cdot e^{\beta\cdot z}+C_{2}\cdot e^{-\beta\cdot z} \right)^{2}\), which will be called an exponentially graded model, and (2) becomes a modified Helmholtz equation. The solution for \(u(\overrightarrow{r})\) and \(\phi(\overrightarrow{r})\) in an infinite medium is:  
\[ \begin{split}&\
abla^{2}u(\overrightarrow{r})-\beta^{2}u( \overrightarrow{r})=-\frac{1}{\sqrt{\sigma(\overrightarrow{r})}}\delta( \overrightarrow{r}-\overrightarrow{r}_{P})\\ & u(\overrightarrow{r})=\frac{I\exp(-\beta\left|\overrightarrow {r}-\overrightarrow{r}_{P}\right|)}{4\pi\sqrt{\sigma(\overrightarrow{r}) \left|\overrightarrow{r}-\overrightarrow{r}_{P}\right|}}\\ &\phi(\overrightarrow{r})=\frac{I\exp(-\beta\left|\overrightarrow {r}-\overrightarrow{r}_{P}\right|)}{4\pi\sqrt{\sigma(\overrightarrow{r} _{P})\sqrt{\sigma(\overrightarrow{r})\left|\overrightarrow{r}- \overrightarrow{r}_{P}\right|}}}\end{split}  \tag{3}\]  
For a semi-infinite medium composed by horizontal layers where a conductivity of the type described can be defined in each layer, what in this paper is called EGMS model, a cylindrical coordinates system can be used to solve the homogeneous equations associated with (3). For a point current source located in the \(i\) layer at \(\overrightarrow{r}_{P}\), the potential at any point \(\overrightarrow{r}\) of the \(j\) layer \(\phi_{ij}(\overrightarrow{r})\) can be expressed as:  
\[ \begin{split}&\phi_{ij}(\overrightarrow{r})=\frac{I\exp(-\beta \left|\overrightarrow{r}-\overrightarrow{r}_{P}\right|)}{4\pi\sqrt{\sigma_{( \overrightarrow{r})}\sqrt{\sigma_{(\overrightarrow{r})}\left|\overrightarrow {r}-\overrightarrow{r}_{P}\right|}}}\delta_{ij}+\\ &+\int\limits_{0}^{\infty}(f_{ij}(\lambda)e^{-\sqrt{\lambda^{2} +\beta_{i}^{2}}(z-z_{P})}+g_{ij}(\lambda)e^{\sqrt{\lambda^{2}+\beta_{i}^{2}}(z -z_{P})})J_{0}(\lambda r)d\lambda\end{split}  \tag{4}\]  
where \(\delta_{ij}\) is the Kronecker delta and the unknown functions \(f_{ij}\) and \(g_{ij}\) need to be calculated by imposing the boundary conditions at each interface.