I would like to find zeros of $f:R^2\rightarrow R$ applying the Newton-Raphson method but I got stuck in solving the linear approximation equation for $\textbf{x}$.
Let $\textbf{x}\equiv(x,y)$ and $\textbf{a}\equiv(x_0,y_0)$ denote respectively our variable vector and a starting point in the neighborhood of the solution.
Taking a linear approximaton of $f$ around $\textbf{a}$ we get:
$$ f(\textbf{x}) = f(\textbf{a})+\nabla^tf(\textbf{a})(\textbf{x}-\textbf{a}) $$
Doing the algebra and setting $f(\textbf{x})=0$ we get:
$$ \nabla^tf(\textbf{a})\textbf{x}=\nabla^tf(\textbf{a})\textbf{a}-f(\textbf{a}) $$
which don't know how to solve for $\textbf{x}$.
It seems to me that the problem does not arise when $f$ is a vector-valued function, eg. $\textbf{f}:R^n\rightarrow R^n$ because $\nabla \textbf{f}(\textbf{a})=J(\textbf{a})$ is the jacobian matrix in $\textbf{a}$ for which $J^{-1}$ may exists.
Is there something that i'm missing?
The gradient of $f$ at $\mathbf a_0$ points in the direction of greatest increase of $f$, and its length is the slope of $f$ in that direction.
So if $f(\mathbf a_0)$ is positive, we want to go in the opposite of that direction (if $f(\mathbf a_0)$ is negative we want to go in the direction of the gradient). And the distance we want to move is $\frac{f(\mathbf a_0)}{\|\nabla^t f(\mathbf a_0)\|}$. This yields $$ \mathbf a_1=\mathbf a_0-\frac{f(\mathbf a_0)}{\|\nabla^tf(\mathbf a_0)\|}\cdot\frac{\nabla^tf(\mathbf a_0)}{\|\nabla^tf(\mathbf a_0)\|} $$