Let's say I want
$$\begin{array}{ll} \text{maximize} & f (x_1, x_2) := 300 x_1 + 500 x_2\\ \text{subject to} & x_1 + x_2 = 1\\ & x_1 \le 0.8\\ & x_2 \le 0.8\end{array}$$
Let $x_0 = (0.8,0.2)$. The maximum of $f$ should be $x=(0.2,0.8)$. We optimize by $$x^{(k+1)} = x^{(k)}-\alpha \nabla f(x^{(k)})$$ where $\alpha$ is the step size.
$\nabla f(x) = (300,500)$. If $\alpha = 10^{-4}$ then $x^{(1)}= (0.77, 0.15)$. Already we are violating the $x_1 + x_2 = 1$ constraint.
What is the correct way to perform iterations here? Should I be using a matrix equation somehow? It feels like somehow $\alpha \nabla f(0.2, 0.8)$ ought to equal something like $(0.03, -0.03)$
Note: this is a 2-d problem, but I'm going to generalize the results to a much larger dimension and convex optimization