${\mu} = {\frac{R}{{{4}} {{r}}}}$
${{\mu_+}} = {{1} + {\mu}}$
${{\mu_-}} = {{1}{-{\mu}}}$
metric:
${{{ g} _u} _v} = {\overset{u\downarrow v\rightarrow}{\left[\begin{array}{cccc} -{\frac{{{\mu_-}}^{2}}{{{\mu_+}}^{2}}}& 0& 0& 0\\ 0& {{\mu_+}}^{4}& 0& 0\\ 0& 0& {{\mu_+}}^{4}& 0\\ 0& 0& 0& {{\mu_+}}^{4}\end{array}\right]}}$
metric inverse:
${{{ g} ^u} ^v} = {\overset{u\downarrow v\rightarrow}{\left[\begin{array}{cccc} -{\frac{{{\mu_+}}^{2}}{{{\mu_-}}^{2}}}& 0& 0& 0\\ 0& \frac{1}{{{\mu_+}}^{4}}& 0& 0\\ 0& 0& \frac{1}{{{\mu_+}}^{4}}& 0\\ 0& 0& 0& \frac{1}{{{\mu_+}}^{4}}\end{array}\right]}}$
${{{{{ g} _u} _a}} {{{{ g} ^a} ^v}}} = {\overset{u\downarrow v\rightarrow}{\left[\begin{array}{cccc} 1& 0& 0& 0\\ 0& 1& 0& 0\\ 0& 0& 1& 0\\ 0& 0& 0& 1\end{array}\right]}}$
metric partial derivatives:
${{{{ g} _u} _v} _{,w}} = {\overset{w\downarrow[{u\downarrow v\rightarrow}]}{\left[\begin{matrix} \overset{u\downarrow v\rightarrow}{\left[\begin{array}{cccc} 0& 0& 0& 0\\ 0& 0& 0& 0\\ 0& 0& 0& 0\\ 0& 0& 0& 0\end{array}\right]} \\ \overset{u\downarrow v\rightarrow}{\left[\begin{array}{cccc} -{\frac{{{R}} {{{\mu_-}}} \cdot {{x}}}{{{{{\mu_+}}^{3}}} {{{r}^{3}}}}}& 0& 0& 0\\ 0& -{\frac{{{R}} {{x}} {{{{\mu_+}}^{3}}}}{{r}^{3}}}& 0& 0\\ 0& 0& -{\frac{{{R}} {{x}} {{{{\mu_+}}^{3}}}}{{r}^{3}}}& 0\\ 0& 0& 0& -{\frac{{{R}} {{x}} {{{{\mu_+}}^{3}}}}{{r}^{3}}}\end{array}\right]} \\ \overset{u\downarrow v\rightarrow}{\left[\begin{array}{cccc} -{\frac{{{R}} {{{\mu_-}}} \cdot {{y}}}{{{{{\mu_+}}^{3}}} {{{r}^{3}}}}}& 0& 0& 0\\ 0& -{\frac{{{R}} {{y}} {{{{\mu_+}}^{3}}}}{{r}^{3}}}& 0& 0\\ 0& 0& -{\frac{{{R}} {{y}} {{{{\mu_+}}^{3}}}}{{r}^{3}}}& 0\\ 0& 0& 0& -{\frac{{{R}} {{y}} {{{{\mu_+}}^{3}}}}{{r}^{3}}}\end{array}\right]} \\ \overset{u\downarrow v\rightarrow}{\left[\begin{array}{cccc} -{\frac{{{R}} {{{\mu_-}}} \cdot {{z}}}{{{{{\mu_+}}^{3}}} {{{r}^{3}}}}}& 0& 0& 0\\ 0& -{\frac{{{R}} {{z}} {{{{\mu_+}}^{3}}}}{{r}^{3}}}& 0& 0\\ 0& 0& -{\frac{{{R}} {{z}} {{{{\mu_+}}^{3}}}}{{r}^{3}}}& 0\\ 0& 0& 0& -{\frac{{{R}} {{z}} {{{{\mu_+}}^{3}}}}{{r}^{3}}}\end{array}\right]}\end{matrix}\right]}}$
1st kind Christoffel:
${{{{ \Gamma} _u} _v} _w} = {\overset{u\downarrow[{v\downarrow w\rightarrow}]}{\left[\begin{matrix} \overset{a\downarrow b\rightarrow}{\left[\begin{array}{cccc} 0& -{\frac{{{R}} {{{\mu_-}}} \cdot {{x}}}{{{2}} {{{{\mu_+}}^{3}}} {{{r}^{3}}}}}& -{\frac{{{R}} {{{\mu_-}}} \cdot {{y}}}{{{2}} {{{{\mu_+}}^{3}}} {{{r}^{3}}}}}& -{\frac{{{R}} {{{\mu_-}}} \cdot {{z}}}{{{2}} {{{{\mu_+}}^{3}}} {{{r}^{3}}}}}\\ \frac{{{R}} {{{\mu_-}}} \cdot {{x}}}{{{2}} {{{{\mu_+}}^{3}}} {{{r}^{3}}}}& 0& 0& 0\\ \frac{{{R}} {{{\mu_-}}} \cdot {{y}}}{{{2}} {{{{\mu_+}}^{3}}} {{{r}^{3}}}}& 0& 0& 0\\ \frac{{{R}} {{{\mu_-}}} \cdot {{z}}}{{{2}} {{{{\mu_+}}^{3}}} {{{r}^{3}}}}& 0& 0& 0\end{array}\right]} \\ \overset{a\downarrow b\rightarrow}{\left[\begin{array}{cccc} -{\frac{{{R}} {{{\mu_-}}} \cdot {{x}}}{{{2}} {{{{\mu_+}}^{3}}} {{{r}^{3}}}}}& 0& 0& 0\\ 0& -{\frac{{{R}} {{x}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}}& -{\frac{{{R}} {{y}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}}& -{\frac{{{R}} {{z}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}}\\ 0& \frac{{{R}} {{y}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}& -{\frac{{{R}} {{x}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}}& 0\\ 0& \frac{{{R}} {{z}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}& 0& -{\frac{{{R}} {{x}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}}\end{array}\right]} \\ \overset{a\downarrow b\rightarrow}{\left[\begin{array}{cccc} -{\frac{{{R}} {{{\mu_-}}} \cdot {{y}}}{{{2}} {{{{\mu_+}}^{3}}} {{{r}^{3}}}}}& 0& 0& 0\\ 0& -{\frac{{{R}} {{y}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}}& \frac{{{R}} {{x}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}& 0\\ 0& -{\frac{{{R}} {{x}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}}& -{\frac{{{R}} {{y}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}}& -{\frac{{{R}} {{z}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}}\\ 0& 0& \frac{{{R}} {{z}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}& -{\frac{{{R}} {{y}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}}\end{array}\right]} \\ \overset{a\downarrow b\rightarrow}{\left[\begin{array}{cccc} -{\frac{{{R}} {{{\mu_-}}} \cdot {{z}}}{{{2}} {{{{\mu_+}}^{3}}} {{{r}^{3}}}}}& 0& 0& 0\\ 0& -{\frac{{{R}} {{z}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}}& 0& \frac{{{R}} {{x}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}\\ 0& 0& -{\frac{{{R}} {{z}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}}& \frac{{{R}} {{y}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}\\ 0& -{\frac{{{R}} {{x}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}}& -{\frac{{{R}} {{y}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}}& -{\frac{{{R}} {{z}} {{{{\mu_+}}^{3}}}}{{{2}} {{{r}^{3}}}}}\end{array}\right]}\end{matrix}\right]}}$
2nd kind Christoffel:
${{{{ \Gamma} ^u} _v} _w} = {\overset{u\downarrow[{v\downarrow w\rightarrow}]}{\left[\begin{matrix} \left[\begin{array}{cccc} 0& \frac{{{R}} {{x}}}{{{2}} {{{\mu_+}}} \cdot {{{\mu_-}}} \cdot {{{r}^{3}}}}& \frac{{{R}} {{y}}}{{{2}} {{{\mu_+}}} \cdot {{{\mu_-}}} \cdot {{{r}^{3}}}}& \frac{{{R}} {{z}}}{{{2}} {{{\mu_+}}} \cdot {{{\mu_-}}} \cdot {{{r}^{3}}}}\\ -{\frac{{{R}} {{x}}}{{{2}} {{{\mu_+}}} \cdot {{{\mu_-}}} \cdot {{{r}^{3}}}}}& 0& 0& 0\\ -{\frac{{{R}} {{y}}}{{{2}} {{{\mu_+}}} \cdot {{{\mu_-}}} \cdot {{{r}^{3}}}}}& 0& 0& 0\\ -{\frac{{{R}} {{z}}}{{{2}} {{{\mu_+}}} \cdot {{{\mu_-}}} \cdot {{{r}^{3}}}}}& 0& 0& 0\end{array}\right] \\ \left[\begin{array}{cccc} -{\frac{{{R}} {{{\mu_-}}} \cdot {{x}}}{{{2}} {{{{\mu_+}}^{7}}} {{{r}^{3}}}}}& 0& 0& 0\\ 0& -{\frac{{{R}} {{x}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}}& -{\frac{{{R}} {{y}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}}& -{\frac{{{R}} {{z}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}}\\ 0& \frac{{{R}} {{y}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}& -{\frac{{{R}} {{x}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}}& 0\\ 0& \frac{{{R}} {{z}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}& 0& -{\frac{{{R}} {{x}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}}\end{array}\right] \\ \left[\begin{array}{cccc} -{\frac{{{R}} {{{\mu_-}}} \cdot {{y}}}{{{2}} {{{{\mu_+}}^{7}}} {{{r}^{3}}}}}& 0& 0& 0\\ 0& -{\frac{{{R}} {{y}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}}& \frac{{{R}} {{x}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}& 0\\ 0& -{\frac{{{R}} {{x}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}}& -{\frac{{{R}} {{y}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}}& -{\frac{{{R}} {{z}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}}\\ 0& 0& \frac{{{R}} {{z}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}& -{\frac{{{R}} {{y}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}}\end{array}\right] \\ \left[\begin{array}{cccc} -{\frac{{{R}} {{{\mu_-}}} \cdot {{z}}}{{{2}} {{{{\mu_+}}^{7}}} {{{r}^{3}}}}}& 0& 0& 0\\ 0& -{\frac{{{R}} {{z}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}}& 0& \frac{{{R}} {{x}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}\\ 0& 0& -{\frac{{{R}} {{z}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}}& \frac{{{R}} {{y}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}\\ 0& -{\frac{{{R}} {{x}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}}& -{\frac{{{R}} {{y}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}}& -{\frac{{{R}} {{z}}}{{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}}}}\end{array}\right]\end{matrix}\right]}}$
${{ n} _u} = {\overset{u\downarrow}{\left[\begin{matrix} {\frac{1}{{\mu_+}}} {{\mu_-}} \\ 0 \\ 0 \\ 0\end{matrix}\right]}}$
${{{ P} _u} _v} = {\overset{u\downarrow v\rightarrow}{\left[\begin{array}{cccc} 0& 0& 0& 0\\ 0& {{\mu_+}}^{4}& 0& 0\\ 0& 0& {{\mu_+}}^{4}& 0\\ 0& 0& 0& {{\mu_+}}^{4}\end{array}\right]}}$
${dn} = {\overset{u\downarrow v\rightarrow}{\left[\begin{array}{cccc} 0& -{\frac{{{R}} {{x}}}{{{2}} {{{{\mu_+}}^{2}}} {{{r}^{3}}}}}& -{\frac{{{R}} {{y}}}{{{2}} {{{{\mu_+}}^{2}}} {{{r}^{3}}}}}& -{\frac{{{R}} {{z}}}{{{2}} {{{{\mu_+}}^{2}}} {{{r}^{3}}}}}\\ \frac{{{{R}} {{x}}} + {{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}} {{\frac{\partial {\mu_-}}{\partial x}}}}{-{{{2}} {{{\mu_-}}} \cdot {{{r}^{3}}} {{\frac{\partial {\mu_+}}{\partial x}}}}}}{{{2}} {{{{\mu_+}}^{2}}} {{{r}^{3}}}}& 0& 0& 0\\ \frac{{{{R}} {{y}}} + {{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}} {{\frac{\partial {\mu_-}}{\partial y}}}}{-{{{2}} {{{\mu_-}}} \cdot {{{r}^{3}}} {{\frac{\partial {\mu_+}}{\partial y}}}}}}{{{2}} {{{{\mu_+}}^{2}}} {{{r}^{3}}}}& 0& 0& 0\\ \frac{{{{R}} {{z}}} + {{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}} {{\frac{\partial {\mu_-}}{\partial z}}}}{-{{{2}} {{{\mu_-}}} \cdot {{{r}^{3}}} {{\frac{\partial {\mu_+}}{\partial z}}}}}}{{{2}} {{{{\mu_+}}^{2}}} {{{r}^{3}}}}& 0& 0& 0\end{array}\right]}}$
${{{ \nabla n} _u} _v} = {\overset{u\downarrow v\rightarrow}{\left[\begin{array}{cccc} 0& -{\frac{{{R}} {{x}}}{{{2}} {{{{\mu_+}}^{2}}} {{{r}^{3}}}}}& -{\frac{{{R}} {{y}}}{{{2}} {{{{\mu_+}}^{2}}} {{{r}^{3}}}}}& -{\frac{{{R}} {{z}}}{{{2}} {{{{\mu_+}}^{2}}} {{{r}^{3}}}}}\\ \frac{{{{R}} {{x}}} + {{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}} {{\frac{\partial {\mu_-}}{\partial x}}}}{-{{{2}} {{{\mu_-}}} \cdot {{{r}^{3}}} {{\frac{\partial {\mu_+}}{\partial x}}}}}}{{{2}} {{{{\mu_+}}^{2}}} {{{r}^{3}}}}& 0& 0& 0\\ \frac{{{{R}} {{y}}} + {{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}} {{\frac{\partial {\mu_-}}{\partial y}}}}{-{{{2}} {{{\mu_-}}} \cdot {{{r}^{3}}} {{\frac{\partial {\mu_+}}{\partial y}}}}}}{{{2}} {{{{\mu_+}}^{2}}} {{{r}^{3}}}}& 0& 0& 0\\ \frac{{{{R}} {{z}}} + {{{2}} {{{\mu_+}}} \cdot {{{r}^{3}}} {{\frac{\partial {\mu_-}}{\partial z}}}}{-{{{2}} {{{\mu_-}}} \cdot {{{r}^{3}}} {{\frac{\partial {\mu_+}}{\partial z}}}}}}{{{2}} {{{{\mu_+}}^{2}}} {{{r}^{3}}}}& 0& 0& 0\end{array}\right]}}$
${{{ K} _u} _v} = {\overset{u\downarrow v\rightarrow}{\left[\begin{array}{cccc} 0& 0& 0& 0\\ 0& 0& 0& 0\\ 0& 0& 0& 0\\ 0& 0& 0& 0\end{array}\right]}}$
geodesic equation
$\ddot{x}^a = $$\overset{u\downarrow}{\left[\begin{matrix} 0 \\ {{{\frac{1}{2}}} {{R}} {{{\mu_-}}} \cdot {{x}} {{{\dot{t}}^{2}}} {{\frac{1}{{{\mu_+}}^{7}}}} {{\frac{1}{{r}^{3}}}}} + {{{\frac{1}{2}}} {{R}} {{x}} {{{\dot{x}}^{2}}} {{\frac{1}{{\mu_+}}}} {{\frac{1}{{r}^{3}}}}} + {{{\frac{1}{2}}} {{R}} {{x}} {{{\dot{y}}^{2}}} {{\frac{1}{{\mu_+}}}} {{\frac{1}{{r}^{3}}}}} + {{{\frac{1}{2}}} {{R}} {{x}} {{{\dot{z}}^{2}}} {{\frac{1}{{\mu_+}}}} {{\frac{1}{{r}^{3}}}}} \\ {{{\frac{1}{2}}} {{R}} {{{\mu_-}}} \cdot {{y}} {{{\dot{t}}^{2}}} {{\frac{1}{{{\mu_+}}^{7}}}} {{\frac{1}{{r}^{3}}}}} + {{{\frac{1}{2}}} {{R}} {{y}} {{{\dot{x}}^{2}}} {{\frac{1}{{\mu_+}}}} {{\frac{1}{{r}^{3}}}}} + {{{\frac{1}{2}}} {{R}} {{y}} {{{\dot{y}}^{2}}} {{\frac{1}{{\mu_+}}}} {{\frac{1}{{r}^{3}}}}} + {{{\frac{1}{2}}} {{R}} {{y}} {{{\dot{z}}^{2}}} {{\frac{1}{{\mu_+}}}} {{\frac{1}{{r}^{3}}}}} \\ {{{\frac{1}{2}}} {{R}} {{{\mu_-}}} \cdot {{z}} {{{\dot{t}}^{2}}} {{\frac{1}{{{\mu_+}}^{7}}}} {{\frac{1}{{r}^{3}}}}} + {{{\frac{1}{2}}} {{R}} {{z}} {{{\dot{x}}^{2}}} {{\frac{1}{{\mu_+}}}} {{\frac{1}{{r}^{3}}}}} + {{{\frac{1}{2}}} {{R}} {{z}} {{{\dot{y}}^{2}}} {{\frac{1}{{\mu_+}}}} {{\frac{1}{{r}^{3}}}}} + {{{\frac{1}{2}}} {{R}} {{z}} {{{\dot{z}}^{2}}} {{\frac{1}{{\mu_+}}}} {{\frac{1}{{r}^{3}}}}}\end{matrix}\right]}$
double tmp1 = mu_plus * mu_plus;
double tmp2 = mu_plus * tmp1;
double tmp3 = mu_plus * tmp2;
double tmp4 = mu_plus * tmp3;
double tmp5 = mu_plus * tmp4;
double tmp6 = mu_plus * tmp5;
double tmp7 = pos.y * pos.y;
double tmp8 = pos.z * pos.z;
double tmp9 = pos.x * pos.x;
double tmp10 = tmp7 + tmp8;
double tmp11 = tmp9 + tmp10;
double tmp12 = sqrt(tmp11);
double tmp13 = tmp12 * tmp12;
double tmp14 = tmp12 * tmp13;
double tmp15 = 1. / tmp14;
double tmp16 = 1. / tmp6;
double tmp17 = vel.w * vel.w;
double tmp18 = 1. / 2.;
double tmp19 = 1. / mu_plus;
double tmp20 = pos.x * tmp15;
double tmp21 = vel.x * vel.x;
double tmp22 = tmp19 * tmp20;
double tmp23 = vel.y * vel.y;
double tmp24 = vel.z * vel.z;
double tmp25 = pos.y * tmp15;
double tmp26 = tmp19 * tmp25;
double tmp27 = pos.z * tmp15;
double tmp28 = tmp19 * tmp27;
double out1 = 0.;
double out2 = R * pos.x * mu_minus * tmp15 * tmp16 * tmp17 * tmp18 + R * tmp18 * tmp21 * tmp22 + R * tmp18 * tmp22 * tmp24 + R * tmp18 * tmp22 * tmp23;
double out3 = R * pos.y * mu_minus * tmp15 * tmp16 * tmp17 * tmp18 + R * tmp18 * tmp21 * tmp26 + R * tmp18 * tmp24 * tmp26 + R * tmp18 * tmp23 * tmp26;
double out4 = R * pos.z * mu_minus * tmp15 * tmp16 * tmp17 * tmp18 + R * tmp18 * tmp21 * tmp28 + R * tmp18 * tmp24 * tmp28 + R * tmp18 * tmp23 * tmp28;