\[f(A)=\lambda_{1}\sum_{k} s_{k}^{T}w_{1}w_{1}^{T}s_{k} + \lambda_{2}\sum_{k} s_{k}^{T}w_{2}w_{2}^{T}s_{k} = \lambda_{1}S_{1}+\lambda_{2}S_{2}\le 1\]
\[ dx=S_{j}[\frac{1}{2S_{i}}\sum_{k}\frac{D_{i,k}}{\sqrt{\lambda_{i}D_{i,k}+\lambda_{j}D_{j,k}}}-\frac{1}{2S_{j}}\sum_{k}\frac{D_{j,k}}{\sqrt{\lambda_{j}D_{j,k}+\lambda_{j}D_{j,k}}}] \]