# Sensitivity Analysis of P-Wave Polarization Direction and Velocity Gradient Inversion
## 3 Sensitivity Analysis of Polarization Direction to Relative Velocity Gradient
The following steps provide a detailed explanation on how to analyze the sensitivity of polarization direction data to relative velocity gradients:In the first step, while keeping the source position \(r_{b}\) and the ray exit direction \(n_{b}\) constant, the relative velocity gradient model is slightly changed to obtain changes in the polarization direction and position at the ray endpoints. The polarization direction \(n\) is a unit vector. The differences between unit vectors are primarily reflected in their directions or angles [26]. Therefore, in this section, we use the angles \(\alpha\) and \(\beta\) to compare the magnitude of changes in the polarization direction. Here, \(\alpha\) denotes the angle between \(n_{b}\) and the vertical downward direction, and \(\beta\) denotes the angle between \(n\) and the vertical downward direction. Under the condition that the source position and the ray exit direction remain unchanged, a small perturbation \(\delta g(\mathbf{r})\) is applied to the relative velocity gradient. According to Equation (7), the changes in \(\beta_{e}\) and \(\beta\) can be expressed as follows:  
\[\delta\beta_{e}^{g}\approx\frac{sin\ \ae^{\int_{0}^{L}g(\mathbf{r})\cdot\text{mdl}} \int_{0}^{L}\delta g(\mathbf{r})\cdot\text{mdl}}{\sqrt{1-\left(sin\ \ae^{\int_{0}^{L}g(\mathbf{r})\cdot\text{mdl}}\right)^{2}}}, \tag{10}\]  
\[\delta g\approx\frac{sin\ \ae^{\int_{0}^{L}g(\mathbf{r})\cdot\text{mdl}}\int_{0}^{L} \delta g(\mathbf{r})\cdot\text{mdl}}{\sqrt{1-\ \left(sin\ae^{\int_{0}^{L}g(\mathbf{r})\cdot\text{mdl}} \right)^{2}}}. \tag{11}\]  
From Equation (10), it is evident that the magnitude of \(\delta\beta_{e}^{g}\) is independent of the position where the perturbation \(\delta g(\mathbf{r})\) occurs. Regardless of where the relative velocity gradient experiences a perturbation \(\delta g(\mathbf{r})\), the resulting change in the polarization direction at the ray endpoint remains the same. When \(\mathbf{g}(\mathbf{r})\) is subjected to a small perturbation \(\delta g(\mathbf{r})\) while keeping other factors constant, we can perform a first-order Taylor expansion of Equation (5) to obtain the change in \(\mathbf{r}_{e}\) as follows:  
\[\delta\mathbf{r}_{e}^{g}=\int_{0}^{L}\delta\mathbf{n}^{g}dl, \tag{12}\]  
where \(\delta\mathbf{n}^{g}\) represents the changes in the polarization direction at each position along the ray path. This occurrs when the relative velocity gradient changes, while all other parameters remain constant. In two-dimensional space, vector \(n\) is composed of components \(n_{x}\) and \(n_{z}\) in the \(x\) and \(z\) directions, respectively. Therefore, \(\delta\mathbf{n}^{g}\) in Equation (12) can be expressed as follows:  
\[\delta n^{g}= \begin{bmatrix}\delta n_{x}\\ \delta n_{z}\end{bmatrix} = \begin{bmatrix}\frac{\partial\sin\theta}{\partial \theta}\delta g^{g}\\ \frac{\partial\cos\theta}{\partial\theta}\delta g^{g}\end{bmatrix} = \begin{bmatrix} \cos\ \beta\\ -sin\ \beta\end{bmatrix} \delta\beta g. \tag{13}\]  
By combining Equations (11) and (13), we can express Equation (12) in the following form:  
\[\delta\mathbf{r}_{e}^{g}=\int_{0}^{l}\delta g(\mathbf{r})\cdot\text{mdl}\int_{0}^{L} \left\{ \begin{bmatrix}\cos\ \beta\\ -sin\ \beta\end{bmatrix} \frac{sin\ae^{\int_{0}^{l}g(\mathbf{r})\cdot\text{mdl}}}{ \sqrt{1-\left(sin\ae^{\int_{0}^{l}g(\mathbf{r})\cdot\text{mdl}}\right)^{2}}} \right\}dl. \tag{14}\]  
Changes in the relative velocity gradient at a certain position on the ray path can affect the polarization direction near that position and along the path from that position to the ray endpoint. From Equation (14), it is evident that the magnitude of the change in the ray endpoint position \(\delta\mathbf{r}_{e}^{g}\) caused by the variation in the relative velocity gradient \(\delta g(\mathbf{r})\) at any position along the ray path depends on the length of the integrated path \(l\). This integration path is the length of the ray path from the location where the relative velocity gradient changes to the endpoint of the ray.