I have the following system of equations and I need to solve this using gradient descent
$$\begin{cases} \cos(y-1)+x=0.5 \\ y-\cos(x)=3 \end{cases} $$
I understand more or less how to solve a singular equation but having troubles understanding how to solve systems.
These are the partial derivatives, but what is the next step?
$\cfrac{df_1}{dx} = 1$,
$\cfrac{df_1}{dy} = \sin(1-y)$,
$\cfrac{df_2}{dx} = \sin(x)$,
$\cfrac{df_2}{dy} = 1$
Here's my Swift code of solving this equation.
I know that this is not the best answer but that's all I have.
I found this code on C recently but I don't understand some of the things like what
calculateMexactly returns and what algorithm it uses. So, if someone can explain this a little bit further that would be really great.