Maximizing inner product of unit vectors I am working on a research project and the main algorithm is based on computing the following function:

Given a symmetric matrix $A$ and a unit vector $x_0$, compute: $\max\langle Ax,x\rangle : ||x|| = 1$ and $\langle x,x_0\rangle= 0$. 

I have some bounds but neither a closed formula nor numerical solution or approximation. Any ideas will be welcomed.
Thanks
 A: For any vector $y$ with $\|y\|\le1$, let $x=Py$ where $P=I-x_0x_0^T$. Then $\|x\|\le1$ and $\langle x,x_0\rangle=0$. Further, every $x$ satisfying these constraints is obtained as $x=Py$ for some $y$ (for example, just take $y=x$).
Therefore, the problem is equivalent to maximizing $\langle Py,APy\rangle=\langle y,P^TAPy\rangle$ subject to $\|y\|\le1$, and the solution is given by the eigenvector corresponding to the largest eigenvalue of $P^TAP$.
A: Old question, but you can use power iteration to optimize a Rayleigh quotient over a subspace. To adapt the power iteration algorithm to the subspace constraint, alternate applying matrix $A$ and a projection $P$ into the subspace (in your case the subspace is the vectors orthogonal to $x_0$).
That is, pick a starting vector $v_0$ randomly, and repeatedly do
$$ v_{n+1} \gets PAv_n$$
$$ v_{n+1} \gets \frac{v_{n+1}}{\|v_{n+1}\|_2}$$
After enough iterations, $\langle v_n, A v_n\rangle$ will be close to $\max_{v \in S, \|v\|_2 = 1} \langle v, Av\rangle$.
