I am trying to solve the following nonlinear system of equations. Could someone kindly give me some tips on how I can solve it ?
$$ \left \{ \begin{array}{c} l^2= (x_3-x_4 )^2+(y_3-y_4 )^2+(z_3-z_4 )^2 (1) \\ (d_1+a_1)^2= (x_3-x_1 )^2+(y_3-y_1 )^2+(z_3-z_1 )^2 (2)\\ (d_2+a_2)^2= (x_3-x_2 )^2+(y_3-y_2 )^2+(z_3-z_2 )^2 (3)\\ (d_3+a_3)^2= (x_4-x_1 )^2+(y_4-y_1 )^2+(z_4-z_1 )^2 (4)\\ (d_4+a_4)^2= (x_4-x_2 )^2+(y_4-y_2 )^2+(z_4-z_2 )^2 (5)\\ z_4= z_3+l\sin(θ) (6)\\ \end{array} \right. $$ There are four points.The coordinates of point$1(x_1,y_1,z_1)$ and point$2(x_2,y_2,z_2)$ are known. I want to calculate the coordinates of point$3(x_3,y_3,z_3)$ and point$4(x_4,y_4,z_4)$.The distance between point$3(x_3,y_3,z_3)$ and point$4(x_4,y_4,z_4)$ is $l$ which has been known. $θ$ has also been known which means the inclination angle between point$3$ and point$4$. $d_1,d_2,d_3,d_4$ means the distances between points. However the distance $d_1,d_2,d_3,d_4$ are estimated value,the estimated errors are $a_1,a_2,a_3,a_4$ .The values of $d_1+a_1,d_2+a_2,d_3+a_3,d_4+a_4$ have been known. Based on the conditions above, how to get the coordinates of point $3(x_3,y_3,z_3)$ and point $4(x_4,y_4,z_4)$.
For Newton's Method,if i don't have the estimated errors a1,a2,a3,a4, exact solution may be obtained.
$$
\left \{
\begin{array}{c}
l^2= (x_3-x_4 )^2+(y_3-y_4 )^2+(z_3-z_4 )^2
(1) \\
(d_1)^2= (x_3-x_1 )^2+(y_3-y_1 )^2+(z_3-z_1 )^2 (2)\\
(d_2)^2= (x_3-x_2 )^2+(y_3-y_2 )^2+(z_3-z_2 )^2 (3)\\
(d_3)^2= (x_4-x_1 )^2+(y_4-y_1 )^2+(z_4-z_1 )^2 (4)\\
(d_4)^2= (x_4-x_2 )^2+(y_4-y_2 )^2+(z_4-z_2 )^2 (5)\\
z_4= z_3+l\sin(θ) (6)\\
\end{array}
\right.
$$
But when i have the estimated errors a1,a2,a3,a4,Will Newton's iteration work?I can't get the value of d1,d2,d3,d4,a1,a2,a3,a4,i can get the value of (d1+a1),(d2+a2),(d3+a3),(d4+a4)
$$
\left \{
\begin{array}{c}
l^2= (x_3-x_4 )^2+(y_3-y_4 )^2+(z_3-z_4 )^2
(1) \\
(d_1+a_1)^2= (x_3-x_1 )^2+(y_3-y_1 )^2+(z_3-z_1 )^2 (2)\\
(d_2+a_2)^2= (x_3-x_2 )^2+(y_3-y_2 )^2+(z_3-z_2 )^2 (3)\\
(d_3+a_3)^2= (x_4-x_1 )^2+(y_4-y_1 )^2+(z_4-z_1 )^2 (4)\\
(d_4+a_4)^2= (x_4-x_2 )^2+(y_4-y_2 )^2+(z_4-z_2 )^2 (5)\\
z_4= z_3+l\sin(θ) (6)\\
\end{array}
\right.
$$
As we konw,by equation(2) minus equation(3),we can obtain a plane P1. The point3 is located on intersection circle between the plane P1 and sphere Point1.Similarly,by equation(4) minus equation(5),the point4 is located on another intersection circle.what i want to ask is that how to use the equation(1) and equation(6) to construct a cost function?If i traversal coordinates on intersection circles,will i get the optimal solution?
You set $\mathbf{x}_0$ to some reasonable starting value, for example to \begin{align} \mathbf{x}_0&=\left[\begin{array}{c}x_1\\y_1\\z_1\\x_2\\y_2\\z_2\end{array}\right] \end{align} and then you iterate $\mathbf{x}_{i}=-\left[\frac{\partial\mathbf{F}}{\partial\mathbf{x}}(\mathbf{x}_{i-1})\right]^{-1}\mathbf{F}(\mathbf{x}_{i-1}),~i=1,2,\dots$ until convergence, where \begin{align} \mathbf{x}&=\left[\begin{array}{c}x_3\\y_3\\z_3\\x_4\\y_4\\z_4\end{array}\right],~ \mathbf{F}(\mathbf{x})=\left[\begin{array}{c} (x_3-x_4)^2+(y_3-y_4)^2+(z_3-z_4)^2-l^2\\ (x_3-x_1)^2+(y_3-y_1)^2+(z_3-z_1)^2-(d_1+a_1)^2\\ (x_3-x_2)^2+(y_3-y_2)^2+(z_3-z_2)^2-(d_2+a_2)^2\\ (x_4-x_1)^2+(y_4-y_1)^2+(z_4-z_1)^2-(d_3+a_3)^2\\ (x_4-x_2)^2+(y_4-y_2)^2+(z_4-z_2)^2-(d_4+a_4)^2\\ z_3-z_4+l\sin\theta \end{array}\right],\\ \frac{\partial\mathbf{F}(\mathbf{x})}{\partial\mathbf{x}}&=\left[\begin{array}{cccccc} 2(x_3-x_4)&2(y_3-y_4)&2(z_3-z_4)& -2(x_3-x_4)&-2(y_3-y_4)&-2(z_3-z_4)\\ 2(x_3-x_1)&2(y_3-y_1)&2(z_3-z_1)&0&0&0\\ 2(x_3-x_2)&2(y_3-y_2)&2(z_3-z_2)&0&0&0\\ 0&0&0&2(x_4-x_1)&2(y_4-y_1)&2(z_4-z_1)\\ 0&0&0&2(x_4-x_2)&2(y_4-y_2)&2(z_4-z_2)\\ 0&0&1&0&0&-1\\ \end{array}\right]. \end{align}