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



A certain type of quadratic problem.
You can solve $\min\{u^HA\_1u\mid u^HA\_2 u=0, u^Hu=1\}$ by semidefinite optimization.


Here's why. Let $\lambda(t)$ be the smallest eigenvalue of $A\_1+tA\_2$. Then for any $t\in \mathbb{R}$ you have
$$\lambda(t)=\min\_{u^Hu=1} u^H(A\_1+tA\_2)u\leq \min\{u^HA\_1u\mid u^HA\_2 u=0, u^Hu=1\}$$
because any feasible solution $u$ of the RHS problem is also a feasible solution of the LHS problem, with the same objective value. In fact
`\begin{equation}\max_{t\in \mathbb{R}} \lambda(t)=\min\{u^HA_1u\mid u^HA_2 u=0, u^Hu=1\}.\end{equation}`
(Proof: Suppose to the contrary that there is strict inequality in the above 
and that the maximum is attained at $t^\*$. Consider
$$U=\{u\mid u^Hu=1, \lambda(t^\*)=u^H(A\_1+t^\*A\_2)u\}.$$
If $u^HA\_2u>0$ for all $u\in U$, then $\lambda(t^\*+\epsilon)>\lambda(t^\*)$ for some $\epsilon>0$. 


Similarly, if $u^HA\_2u<0$ for all $u\in U$, then $\lambda(t^\*-\epsilon)>\lambda(t^\*)$ for some $\epsilon>0$.


If there is a $u\in U$ with $u^HA\_2u=0$, then 
$$\lambda(t^\*)=u^H(A\_1+t^\*A\_2)u=u^HA\_1u=\min\{u^HA\_1u\mid u^HA\_2 u=0, u^Hu=1\},$$
contradiction.


Now $U$ is nonempty, so contains some $v$ with $v^HA\_2v>0$ and some $w$ with $w^HA\_2w<0$. Then 
some linear combination $u$ of $v$ and $w$ is in $U$ and has $u^HA\_2u=0$, QED)


Now $$\max\_{t\in \mathbb{R}} \lambda(t)=\max\{z\mid A\_1+tA\_2-zI\text{ is positive semidefinite}, t,z\in\mathbb{R} \}.$$


This can be computed by any semidefinite solver (say Sedumi, or CVX). 


