Solving this system of non-linear equations algorithmically with the Newton-Raphson method

60 Views Asked by At

I'm looking at this answer to a question about a localization problem in 3 dimensions. I believe the details of that problem are more or less irrelevant to this question, however OP concludes by determining the problem is reduces to the solution of the following non-linear system:

Now, we need to minimize $\Phi(X,Y,Z,T)$. Writing the partial derivatives, we have to solve the four equations $$\frac{\partial \Phi(X,Y,Z,T)} {\partial X}= \sum_{i=1}^n f_i \,\frac{\partial f_i} {\partial X}=0$$ $$\frac{\partial \Phi(X,Y,Z,T)} {\partial Y}= \sum_{i=1}^n f_i \,\frac{\partial f_i} {\partial Y}=0$$ $$\frac{\partial \Phi(X,Y,Z,T)} {\partial Z}= \sum_{i=1}^n f_i \,\frac{\partial f_i} {\partial Z}=0$$ $$\frac{\partial \Phi(X,Y,Z,T)} {\partial T}= \sum_{i=1}^n f_i \,\frac{\partial f_i} {\partial T}=0$$ with $$\frac{\partial f_i} {\partial X}=\frac{X-x_i}{\sqrt{(X-x_i)^2+(Y-y_i)^2+(Z-z_i)^2}}$$ $$\frac{\partial f_i} {\partial Y}=\frac{Y-y_i}{\sqrt{(X-x_i)^2+(Y-y_i)^2+(Z-z_i)^2}}$$ $$\frac{\partial f_i} {\partial Z}=\frac{Z-z_i}{\sqrt{(X-x_i)^2+(Y-y_i)^2+(Z-z_i)^2}}$$ $$\frac{\partial f_i} {\partial T}=v$$ This system of equations is quite easy to solve with Newton-Raphson method.

How, precisely, would such a system be solved by Newton-Raphson in practice? I've previously written an algorithm using Newton-Raphson to find the root of a singular non-linear equation, and it isn't obvious to me how this could be applied to a system such as this.

The end goal being to write an algorithmic solution (where simplicity is the utmost priority).

Note that I'm aware other avenues exist. I'm simply interested in NR