Let \(\mathbf{w}_1 \in \mathbb{R}^D\) be the direction obtained from Fisher discriminant analysis (FDA) that satisfies \(\mathbf{S}_B \mathbf{w}_1 = \lambda_1 \mathbf{S}_W \mathbf{w}_1\), where \(\mathbf{S}_B, \mathbf{S}_W \in \mathbb{R}^{D \times D}\) are the between-class covariance and within-class covariance matrices, respectively. Consider the following constrained optimization problem:
\(\max_{\mathbf{w}} \frac{\mathbf{w}^T \mathbf{S}_B \mathbf{w}}{\mathbf{w}^T \mathbf{S}_W \mathbf{w}}\) subject to \(\mathbf{w}_1^T \mathbf{S}_W \mathbf{w} = 0\).
(1) Obtain \(\frac{\partial \mathcal{L}}{\partial \mathbf{w}} \in \mathbb{R}^D\) for the Lagrangian \(\mathcal{L} = \frac{\mathbf{w}^T \mathbf{S}_B \mathbf{w}}{\mathbf{w}^T \mathbf{S}_W \mathbf{w}} - \mu \mathbf{w}_1^T \mathbf{S}_W \mathbf{w}\), where \(\mu \in \mathbb{R}\) is a Lagrange multiplier.
(2) Set \(\frac{\partial \mathcal{L}}{\partial \mathbf{w}} = 0\) and find the value of the Lagrange multiplier \(\mu\). (Hint: multiply \(\mathbf{w}_1^T\) to the left for both sides of the equation \(\frac{\partial \mathcal{L}}{\partial \mathbf{w}} = 0\)).
(3) Show that the problem becomes the generalized eigenvalue problem of \(\mathbf{S}_B \mathbf{w} = \lambda \mathbf{S}_W \mathbf{w}\), and the optimal solution \(\mathbf{w}\) is the generalized eigenvector corresponding to the second largest eigenvalue.