The problem is to find gradient and hessian of: $f(x) = \frac 1 2 || xx^T -A||_F^2$ given $A \in \mathbb{R^{n \times n}}$, $A$ is symmetric, $x \in \mathbb{R}^n$.
Notation: $||\cdot||_F$ is a Frobenius norm of a matrix.
My progress with problem halted after the application of chain rule: no matter the transformation I make, the inner function contains $\frac {\partial} {\partial x} xx^T$.
That is three dimensional object and to the best of my knowledge a matrix differentiation with respect to a vector is generally avoided.
I believe task requires to work around it, but I don't see a way.