I have the following expression for which I wish to find the $\vec{w}$ which minimizes it:
$$ L = \frac{\vec{w}^TA\vec{w}}{\vec{w}^TB\vec{w}} - \lambda(\vec{w}^T\vec{1} - 1) $$
The partial derivates with respect to $\vec{w}$ and $\lambda$ are as follows
\begin{align*} \frac{\partial L}{\partial \vec{w}} &= \frac{2(\vec{w}^TB\vec{w})A\vec{w}-2(\vec{w}^TA\vec{w})B\vec{w}}{(\vec{w}^TB\vec{w})^2} - \lambda \\ \frac{\partial L}{\partial \lambda} &= -\vec{w}^T\vec{1} + 1 \end{align*}
But I'm having a hard time simplifying these to get the minimizing value of $\vec{w}$. Any insights?