# KKT for second order approximation of $f(x)$

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?

• I hope everyone who ipvotes this also upvotes it on the at least 2 other SE sites where this school assignment is posted. Jan 21, 2021 at 11:46
• Should I delete this on 2 out of 3 of these sites?
– Naah
Jan 21, 2021 at 13:01
• Yes. .............. Jan 21, 2021 at 15:16
• I think it's done.
– Naah
Jan 21, 2021 at 15:18

The gradient and Hessian of $$f$$ at $$x=x_0$$ are constants (vector and matrix respectively), so $$f_0(x)$$ is a quadratic function of $$x$$. If it helps, write it as $$f_0(x) = c_0 + c^Tx + x^T D x$$. Hopefully you know the gradient of that. Then figure out what $$c_0$$, $$c$$ and $$D$$ are in terms of $$x_0$$, $$f(x_0)$$, $$\nabla f(x_0)$$ and $$Hf(x_0)$$, substitute and maybe simplify a little.