## 4 Sensitivity Analysis for Eigenfrequency Problems Using HYPAD
### Simple Harmonic Oscillator  
This example presents a step-by-step demonstration of the procedure introduced in Section 3 to obtain the mixed second-order partial derivatives for the simple harmonic oscillator shown in Figure 3a. The sensitivities were calculated with respect to the mass, \(\rho\), and the spring stiffness, \(c\). Due to the simplicity of the problem, all the steps can be calculated analytically. The inputs for the algorithm presented in Figure 1 were the model parameters \(\mathbf{\alpha}=\{\rho,c\}\), and the order of the derivative, in this case second-order \(m=2\). **Stage 1**  
1. For the case of mixed second-order sensitivities, both variables \(\rho\) and \(c\) must be converted into multidual arrays. In this case, bi-dual numbers are used with \(p=3\). Therefore, three imaginary axes (e.g., \(\epsilon_{1}\), \(\epsilon_{2}\), and \(\epsilon_{12}\)) are required. A graphical representation of this procedure is shown in Figure 3b. 2. Next, to calculate mixed second-order partial derivatives with respect to \(\rho\) and \(c\), both variables are perturbed by applying a unitary step to the imaginary axes \(\epsilon_{1}\) and \(\epsilon_{2}\), respectively: \[\rho^{*}=\rho^{Re}+1\epsilon_{1}+0\epsilon_{2}+0\epsilon_{12}\] (12) \[c^{*}=c^{Re}+0\epsilon_{1}+1\epsilon_{2}+0\epsilon_{12}\] (13)
3. As this system corresponds to a one degree of freedom problem, no domain discretization and spatial integrations are necessary. Following the conventions from Figure 2, we have \([M]^{*}=\rho^{*}\) and \([K]^{*}=c^{*}\). 4. Consequently, the real components of the multidual variables \([M]^{*}\) and \([K]^{*}\) are extracted to form the following arrays: \[[M]=\mathit{Im}_{0}\big{[}[M]^{*}\big{]}=\mathit{Real}\big{[}[M]^{*}\big{]} =\rho^{Re}\] (14) \[[K]=\mathit{Im}_{0}\big{[}[K]^{*}\big{]}=\mathit{Real}\big{[}[K]^{*}\big{]}=c^{ Re}\] (15)
5. Similarly, the partial derivatives of \(M\) and \(K\) are obtained by evaluating Equation (7) using the information from the \(p\) dual imaginary components of the multidual variables \([M]^{*}\) and \([K]^{*}\) as follows: \[\tfrac{\partial M}{\partial\rho}=\mathit{Im}_{1}\big{[}[M]^{*}\big{]}=\mathit{ Im}_{1}\big{[}\rho^{Re}+1\epsilon_{1}+0\epsilon_{2}+0\epsilon_{12}\big{]}=1\] (16a)  
Figure 3: (**a**) Schematic representation of the hypercomplex masses and spring system. (**b**) Schematic representation of the different axes of the multidual representation of the mass-spring discrete model. \[\frac{\partial M}{\partial c}=Im_{2}\big{[}[M]^{*}\big{]}=Im_{2}\big{[}\rho^{Re}+1 \epsilon_{1}+0\epsilon_{2}+0\epsilon_{12}\big{]}=0 \tag{16b}\] \[\frac{\partial^{2}M}{\partial\partial c}=Im_{12}\big{[}[M]^{*}\big{]}=Im_{12} \big{[}\rho^{Re}+1\epsilon_{1}+0\epsilon_{2}+0\epsilon_{12}\big{]}=0\] (16c) \[\frac{\partial K}{\partial\rho}=Im_{1}\big{[}[K]^{*}\big{]}=Im_{1} \big{[}c^{Re}+0\epsilon_{1}+1\epsilon_{2}+0\epsilon_{12}\big{]}=0\] (17a) \[\frac{\partial K}{\partial c}=Im_{2}\big{[}[K]^{*}\big{]}=Im_{2} \big{[}c^{Re}+0\epsilon_{1}+1\epsilon_{2}+0\epsilon_{12}\big{]}=1\] (17b) \[c^{*}=c^{Re}+0\epsilon_{1}+1\epsilon_{2}+0\epsilon_{12}\]0  
Equations (14)-(17) constitute the output of Stage 1, which must be passed to the subsequent stages to calculate the eigenvalues' and eigenvectors' sensitivities. **Stage 2**  
Using the variables from Equations (14)-(15), the following generalized eigenvalue problem was solved:  
\[c^{*}=c^{Re}+0\epsilon_{1}+1\epsilon_{2}+0\epsilon_{12}\]1  
where the eigenvalue and mass normalized eigenvector correspond to:  
\[c^{*}=c^{Re}+0\epsilon_{1}+1\epsilon_{2}+0\epsilon_{12}\]2 \[c^{*}=c^{Re}+0\epsilon_{1}+1\epsilon_{2}+0\epsilon_{12}\]3  
**Stage 3**  
_Iteration 1 (\(s=0\))_: Following the procedure from Figure 2b, the loop variable is initialized from \(s=0\). 1. In this pass, multidual numbers of order zero (real numbers) were employed; therefore, the input variables \(m=2,\lambda_{1},\phi_{1},[M],[K]\), and the partial derivatives obtained in Stage 1 were kept as real numbers. 2.