# Sensitivity Analysis of P-Wave Polarization Direction and Velocity Gradient Inversion
## 3 Sensitivity Analysis of Polarization Direction to Relative Velocity Gradient
The closer the position of the relative velocity gradient perturbation is to the receiver, the shorter the integral path length is. It can be inferred that, when both \(\alpha\) and \(\beta\) are simultaneously within the intervals \([0,\pi/2]\) or \([\pi/2,\pi]\), the farther away the position where the relative velocity gradient changes is from the receiver position, the larger the change in the position of the ray endpoint caused. From the first step, we derived the following conclusions: while keeping the source position and the ray exit direction constant, the magnitude of changes in the polarization direction of the ray endpoints caused by relative velocity gradients at different positions along the same ray is similar. However, the farther the position where the relative velocity gradient change is from the receiver, the greater the change in the position of the ray endpoint caused by this change. (1) In the second step, by appropriately changing the exit direction of the ray, we reposition the ray endpoint back to the position of the receiver. In the case of the source position and the relative velocity gradient remaining unchanged, a small perturbation \(\delta\alpha\) is applied to the exit direction of the ray. According to Equation (7), the changes in \(\beta_{e}\) and \(\beta\) can be expressed as follows:  
\[\delta\beta_{e}^{\alpha}\approx\frac{cos\ \alpha e^{\int_{0}^{L}s(r)\cdot ndl}}{\sqrt{1- \left(sin\ \alpha e^{\int_{0}^{L}s(r)\cdot ndl}\right)^{2}}}\delta\alpha, \tag{15}\]  
\[\delta\beta^{\alpha}\approx\frac{cos\ \alpha e^{\int_{0}^{L}s(r)\cdot ndl}}{\sqrt{1- \left(sin\ \alpha e^{\int_{0}^{L}s(r)\cdot ndl}\right)^{2}}}\delta\alpha. \tag{16}\]  
In Equation (15), on the right-hand side of the approximately equal sign, all terms except for the variable \(\delta\alpha\) are constants. Therefore, comparing \(\delta\beta_{e}^{\alpha}\) is equivalent to comparing \(\delta\alpha\). When \(\alpha\) is subjected to a small perturbation \(\delta\alpha\) 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}^{\alpha^{\alpha}}=\int_{0}^{L}\delta\mathbf{n}^{\alpha}dl, \tag{17}\]  
where \(\delta\mathbf{n}^{\alpha}\) denotes the changes in the polarization direction at each position along the ray path. These changes occur when the exit direction of the ray is altered, while all other parameters remain constant. The \(\delta\mathbf{n}^{\alpha}\) in Equation (17) can be expressed as follows:  
\[\delta\mathbf{n}^{\alpha}= \begin{bmatrix}cos\ \beta\\ -sin\ \beta\end{bmatrix} \delta\beta^{\alpha}. \tag{18}\]  
By combining Equations (18) and (16), we can express Equation (17) in the following form:  
\[\delta\mathbf{r}_{e}^{\alpha^{\alpha}}=\delta\alpha\int_{0}^{L}\left\{ \begin{bmatrix} cos\ \beta\\ -sin\ \beta\end{bmatrix} \frac{cos\ \alpha e^{\int_{0}^{L}s(r)\cdot ndl}}{ \sqrt{1-\left(sin\ \alpha e^{\int_{0}^{L}s(r)\cdot ndl}\right)^{2}}}\right\}dl. \tag{19}\]  
According to Equation (19), it can be inferred that comparing \(\delta\mathbf{r}_{e}^{\alpha^{\alpha}}\) is equivalent to comparing \(\delta\alpha\). Due to changes in the relative velocity gradient, the ray endpoint deviates from the receiver position by \(\delta\mathbf{r}_{e}^{\alpha^{\alpha}}\). To reposition the ray endpoint back to the receiver position, we need to adjust the ray exit direction. This adjustment causes the ray endpoint to undergo a displacement opposite to \(\delta\mathbf{r}_{e}^{\alpha^{\alpha}}\), thereby counteracting the deviation. In other words, a negative change in the exit direction of the ray is required to achieve this opposite displacement. This way, the change in the ray endpoint position due to the ray exit direction change (\(\delta\varphi_{e}^{\pi^{\pm}}\)) will counteract the change in the ray endpoint position due to the relative velocity gradient change (\(\delta\varphi_{e}^{\pi^{\pm}}\)).