Dear Jing,
Your idea seems to be very interesting, but I am not quite sure about the choice of manifold for optimizing the function F(Y).
I see perfectly how it could be optimized on the Grassman manifold but not on the manifold of rank-k symmetric positive semidefinite matrices.
Could you show us how you expressed your function F(Y) in terms of X ?
In the code you showed, it seems that you are optimizing F(X) and not F(Y) and since your function is based on logarithm, F(Y) is defined but not F(X).
About the computation of the euclidean, I obtain the following (but I did not find time to check it numerically) :
Gradient F(Y) = 4 Y'A Dlog (Y'AY) [log(Y'AY)-log(Y'BY)] + 4 Y'B Dlog (Y'BY) [log(Y'BY)-log(Y'AY)]
For obtaining this, I used the directionnal derivative and Dlog is the directionnal derivative of the log.
We discussed some of this issues in a previous post :
Differentiation a cost function based on a matrix logarithm About the Hessian, I have no idea how to compute it, but it may not be needed, since the trustregion can approximate it.
Cheers
Florian