Let $f: \mathbb{R}^n \rightarrow \mathbb{R}.$ Consider second order approximation $f(x) \approx f_0(x)$ where $$f_0(x) = f(x_0) + \nabla f(x_0)^T (x-x_0) + (\mathrm{H}f(x_0)(x - x_0))^T(x - x_0)$$ where $\mathrm{H}$ is a hessian matrix. Write KKT conditions for problem of minimizing $f_0$ with constraint $Ax + b$ = 0.
It seems like there are only equality constraints, I have to create a Lagrangian and for that I need a gradient of $f_0$.
I treat $x$ as a column vector.
My attempt: Let $f(x_0) = c_0, \nabla f(x_0) = c, \mathrm{H}f(x_0) = D$
then $\nabla f_0(x) = c + (D + D^T)x$
Basically I treat value, gradient and hessian at $x_0$ as constants.
Is this correct way of calculating the gradient of $f_0(x)$?
That means the lagrangian is $$c + (D + D^T)x + \lambda^T(Ax - b)$$ with constraint that $Ax - b = 0$.
So the KKT conditions are in this case $$c + (D + D^T)x + \lambda^T(Ax - b) = 0 \\ Ax-b = 0$$
Can someone agree or say what is wrong?