I am interested in solving the following equality constrained quadratic (?) problem. \begin{align} \min_{u^{H}u=1}~(u^{H}A_1u) \\\ s.t.~ u^{H}A_2u=0 \end{align}

$A_1$ and $A_2$ are $N\times N$ hermitian matrices. $u$ is the unit-norm $N\times 1$ complex vector I need to find. I have worked on it a bit and I am reaching no where. I was trying to numerically solve it with an augmented lagrangian method. I am not a mathematician and I need to implement this. So an iterative algorithm that gives reasonable performance is also fine with me.

PREVIOUS VERSION OF THE QUESTION

\begin{align} \max_{u^{H} u=1}~|u^{H}A_1u| \\ s.t.~ u^{H}A_2u=0 \end{align}

I have this idea that the more smooth problem \begin{align} \max_{u^{H}u=1}~(u^{H}A_1u)(u^{H}A_1u) \\\ s.t.~ u^{H}A_2u=0 \end{align} is same as the first one in the sense it gives the same optimal $u$.

EDIT-2

In fact, after some thought, it looks like solving the following two optimization problems

\begin{align} \max_{u^{H}u=1}~(u^{H}A_1u) \\\ s.t.~ u^{H}A_2u=0 \end{align}

AND

should give me the optimal solution for the original problem