how would I calculate the derivative of the following. I want to know the derivative so that I can maximise it.
$ \frac{x^TAx}{x^TBx} $
Both the matricies A and B are symmetric. I know the derivative of $\frac{d}{dx}x^TAx = 2Ax$. Haven't been very successful applying the quotient rule to the above though. Appreciate the help. Thanks!
EDIT: In response to "What goes wrong when applying the chain rule". We know that: $ \frac{d}{dx}\frac{u}{v} = \frac{vu' - uv'}{v^2} $ Which would give me: $ \frac{2x^TBxAx - 2x^TAxBx}{x^TBx^2} \, or \, \frac{2Axx^TBx - 2Bxx^TAx}{(x^TBx)^2} $
In the first case the dimensions don't agree. In the second they do, but I don't want to assume that it's correct just because the dimensions agree. If it is correct then please do let me know!