## 2 Theoretical Development
### The Mass and Stiffness Matrix after Modification  
In Section 2.3, the method is described to reconstruct a matrix \(\mathbf{J}\) aiming at determining the mass and stiffness matrices after modification. Then, in this section, the process of obtaining the modified mass and stiffness matrices are shown below.  
Since the mass matrix for the torsional vibration of a shafting system is generally simplified as a positive and diagonal matrix and the stiffness matrix may be different based on different connected forms, then the typical forms of \(\mathbf{M}\) and \(\mathbf{K}\) are as follows:  
\[\mathbf{M}=\left[\begin{array}{cccc}m_{1}&0&0&\cdots&0\\ 0&m_{2}&0&\cdots&0\\ \vdots&\vdots&\ddots&&\vdots\\ \vdots&\vdots&&\ddots&\vdots\\ 0&0&\cdots&0&m_{n}\\ \end{array}\right]. \tag{16}\]\[\mathbf{K}=\left[\begin{array}{ccccc}k_{12}+k_{13}+\cdots+k_{1n}&-k_{12}&-k_{13}& \cdots&-k_{1n}\\ -k_{12}&k_{12}+k_{23}+\cdots+k_{2n}&-k_{23}&\cdots&-k_{2n}\\ -k_{13}&-k_{23}&k_{13}+k_{23}+\cdots+k_{3,n}&\cdots&-k_{3,n}\\ \vdots&\vdots&\vdots&\ddots&\vdots\\ -k_{1,n}&-k_{2,n}&-k_{3,n}&\cdots&k_{1,n}+k_{2,n}+\cdots+k_{3,n}\\ \end{array}\right]\!. \tag{17}\]  
According to the connected form of the torsional vibration of the shafting system, let \(\mathbf{q}_{1}=(1,1,\ldots,1)^{\mathrm{T}}\); then, it can be easy to obtained as follows:  
\[\mathbf{K}\mathbf{q}_{1}=(0,0,\ldots,0)^{\mathrm{T}}. \tag{18}\]  
Since \(\mathbf{K}=\mathbf{DJD}\), Equation (18) becomes  
\[\mathbf{DJD}\mathbf{q}_{1}=\mathbf{DJD}(1,1,\ldots,1)^{\mathrm{T}}=(0,0, \ldots,0) \tag{19}\]  
where \(\mathbf{D}=\mathbf{M}^{1/2}=\mathrm{diag}\Big{(}\sqrt{m_{1}},\,\sqrt{m_{2}}, \,\ldots,\,\sqrt{m_{n}}\Big{)}\). Then, Equation (19) is rewritten as  
\[\mathbf{J}\Big{(}\sqrt{m_{1}},\,\sqrt{m_{2}},\ldots,\,\sqrt{m_{n}}\Big{)}^{ \mathrm{T}}=(0,0,\ldots,0)^{\mathrm{T}}. \tag{20}\]  
For the torsional vibration of a shafting, the final problem becomes finding a special solution of Homogeneous Ordinary Differential Equation (20), which is denoted by \(\mathbf{q}=(q_{1},q_{2},q_{3},\ldots q_{n})\). Since such a solution remains a solution of Equation (20) when multiplied by a non-zero factor, the solution of Equation (20) can be expressed as  
\[\big{(}\sqrt{m_{1}},\,\sqrt{m_{2}},\ldots,\,\sqrt{m_{n}}\Big{)}^{\mathrm{T}}=e \mathbf{q} \tag{21}\]  
where \(e\) is a proportionality constant.  
As discussed in Section 2.3, the matrix \(\mathbf{J}=\mathbf{Z}\) can be determined from the gradient flow method, which meets the requirement of containing the desired eigenvalues. Then, it can be substituted into Equation (20) to get \(\mathbf{q}\), and \(m_{i}\) (\(i=1,\,2,\,\ldots,\,n\)) can be found from Equation (21) based on \(\mathbf{q}\) and \(e\). Factor \(e\) is apparently not unique and depends on how a system mass or system masses are specified. For example, it can be assumed that \(m_{1}\) is kept, and it can be known that \(e=\sqrt{m_{1}}/q_{1}\). Then, all the other masses of the modified mass matrix \(\mathbf{M}\) can be computed by substituting \(e\) into Equation (21). Finally, the stiffness matrix can be obtained from equation \(\mathbf{K}=\mathbf{DJD}\), in which \(\mathbf{D}=\mathrm{diag}\Big{(}\sqrt{m_{1}},\,\sqrt{m_{2}},\ldots,\sqrt{m_{n }}\Big{)}\). So, the modified mass matrix \(\mathbf{M}\) and stiffness matrix \(\mathbf{K}\) are both obtained, which form a new system with those desired eigenvalues and those original eigenvalues.