Derivatives and more

Optimizing the above equation, that is

$$ \nabla f = 0 = \boldsymbol{A}\boldsymbol{x}-\boldsymbol{b}, $$

which leads to a simple matrix-inversion problem

$$ \boldsymbol{x}=\boldsymbol{A}^{-1}\boldsymbol{b}. $$

This problem is easy to solve since we can calculate the inverse. Alternatively, we can solve the two coupled equations with two unknowns

$$ \frac{\partial f}{\partial x_1}=2x_1+x_2-5=0, $$

and

$$ \frac{\partial f}{\partial x_2}=x_1+20x_2-3=0, $$

with solutions \( x_1=97/39 \) and \( x_2=1/39 \).