 \frac{1}{2h}m_i{\ensuremath{\left\| x_{i_{k+1}}-x_{i_{k}} \right\|}}^2+\frac{1}{h}{\mbox{tr}\ensuremath{\negthickspace{\ensuremath{\left[ (I_{3\times 3}-F_{i_{k}})J_{d_i} \right]}}}}\nonumber\\& \quad -\frac{h}{2}U(\mathbf{x}_{_{k}},\mathbf{R}_{_{k}})-\frac{h}{2}U(\mathbf{x}_{_{k+1}},\mathbf{R}_{_{k+1}}),\label{eqn:Ld}\end{aligned}$$ where $\mathbf{x}_{_k}\in(\Rset^3)^n$, $\mathbf{R}_{_k}\in{\ensuremath{\mathrm{SO(3)}}}^n$, and $\mathbf{F}_{_k}\in(\Rset^3)^n$, and $\mathbf{I}\in(\Rset^{3\times 3})^n$ are defined as $\mathbf{x}_{_k}=(x_{1_k},x_{2_k},\cdots,x_{n_k})$, $\mathbf{R}_{_k}=(R_{1_k},R_{2_k},\cdots,R_{n_k})$, $\mathbf{F}_{_k}=(F_{1_k},F_{2_k},\cdots,F_{n_k})$, and $\mathbf{I}=(I_{3\times 3},I_{3\times 3},\cdots,I_{3\times 3})$, respectively.

This discrete Lagrangian is self-adjoint [@bk:hairer], and self-adjoint numerical integration methods have even order, so we are guaranteed that the resulting integration method is at least second-order accurate.

*Variations of discrete variables:* The variations of the discrete variables are chosen to respect the geometry of the configuration space ${\ensuremath{\mathrm{SE(3)}}}$. The variation of $x_{i_{k}}$ is given by $$\begin{aligned}
x_{i_{k}}^\epsilon = x_{i_{k}} + \epsilon\delta x_{i_{k}}
+\mathcal{O}(\epsilon^2),\end{aligned}$$ where $\delta x_{i_{k}}\in\Rset^3$ and vanishes at $k=0$ and $k=N$. The variation of
\frac{1}{2h}m_i{\ensuremath{\left\| x_{i_{k+1}}-x_{i_{k } } \right\|}}^2+\frac{1}{h}{\mbox{tr}\ensuremath{\negthickspace{\ensuremath{\left [ (I_{3\times 3}-F_{i_{k}})J_{d_i } \right]}}}}\nonumber\\ & \quad -\frac{h}{2}U(\mathbf{x}_{_{k}},\mathbf{R}_{_{k}})-\frac{h}{2}U(\mathbf{x}_{_{k+1}},\mathbf{R}_{_{k+1}}),\label{eqn: Ld}\end{aligned}$$ where $ \mathbf{x}_{_k}\in(\Rset^3)^n$, $ \mathbf{R}_{_k}\in{\ensuremath{\mathrm{SO(3)}}}^n$, and $ \mathbf{F}_{_k}\in(\Rset^3)^n$, and $ \mathbf{I}\in(\Rset^{3\times 3})^n$ are defined as $ \mathbf{x}_{_k}=(x_{1_k},x_{2_k},\cdots, x_{n_k})$, $ \mathbf{R}_{_k}=(R_{1_k},R_{2_k},\cdots, R_{n_k})$, $ \mathbf{F}_{_k}=(F_{1_k},F_{2_k},\cdots, F_{n_k})$, and $ \mathbf{I}=(I_{3\times 3},I_{3\times 3},\cdots, I_{3\times 3})$, respectively. 

 This discrete Lagrangian is self - adjoint   [ @bk: hairer ], and self - adjoint numerical integration methods get even decree, so we are guaranteed that the resulting consolidation method is at least second - order accurate. 

 * Variations of discrete variable :* The variations of the discrete variables are choose to respect the geometry of the configuration space $ { \ensuremath{\mathrm{SE(3)}}}$. The pas seul of $ x_{i_{k}}$ is given by $ $ \begin{aligned } 
 x_{i_{k}}^\epsilon = x_{i_{k } } + \epsilon\delta x_{i_{k } } 
 + \mathcal{O}(\epsilon^2),\end{aligned}$$ where $ \delta x_{i_{k}}\in\Rset^3 $ and vanishes at $ k=0 $ and $ k = N$. The magnetic declination of
 \frwc{1}{2h}m_i{\ensuremath{\left\| x_{i_{k+1}}-x_{l_{k}} \right\|}}^2+\frac{1}{h}{\mbor{rr}\ensucemath{\nsgthicksoace{\ensuremath{\left[ (I_{3\times 3}-F_{i_{n}})J_{e_i} \ritht]}}}}\nonumber\\& \quad -\frac{h}{2}J(\mathbf{x}_{_{k}},\lathbf{R}_{_{k}})-\drac{i}{2}U(\mathbf{x}_{_{k+1}},\mathbf{C}_{_{i+1}}),\label{eqn:Ld}\ens{wliguev}$$ where $\mathbf{x}_{_l}\in(\Rset^3)^n$, $\mdthbf{R}_{_k}\in{\ensuramxtk{\mathrm{SO(3)}}}^n$, and $\mathbf{F}_{_k}\in(\Rset^3)^n$, and $\mwthbf{I}\im(\Rdet^{3\times 3})^n$ are defpnqd aa $\mathbf{x}_{_k}=(x_{1_k},x_{2_k},\cdots,x_{n_k})$, $\mathbf{R}_{_k}=(R_{1_k},R_{2_i},\cdots,R_{i_k})$, $\mathbf{F}_{_k}=(F_{1_k},F_{2_k},\vdots,F_{n_k})$, and $\mathbf{I}=(I_{3\times 3},I_{3\tiles 3},\cdots,I_{3\times 3})$, rfspectively.

Jgis eiscrete Lagfangian is self-adjoint [@gk:hairer], and self-adjoint numerizal iutegration nerhofv have even ordeg, so we are gmsrantead that the resulting invegrqtion method is at leest second-order accutate.

*Variathous of discrete variaboew:* The varhatiubs uf uhe djscretf veriables ars chosen to respect the geometty if the confighratiog fpace ${\ensuremath{\mathrm{SE(3)}}}$. The variation mf $s_{i_{k}}$ is given by $$\begin{alugned}
x_{i_{k}}^\epsilon = x_{i_{k}} + \epsilon\dqlta x_{i_{k}}
+\mathcal{O}(\epsilon^2),\end{aligned}$$ where $\delta x_{i_{k}}\hn\Rsev^3$ xnd vwvusjes at $k=0$ and $k=N$. The variation of
\frac{1}{2h}m_i{\ensuremath{\left\| x_{i_{k+1}}-x_{i_{k}} \right\|}}^2+\frac{1}{h}{\mbox{tr}\ensuremath{\negthickspace{\ensuremath{\left[ (I_{3\times 3}-F_{i_{k}})J_{d_i} \right]}}}}\nonumber\\& \quad $\mathbf{x}_{_k}\in(\Rset^3)^n$, and $\mathbf{F}_{_k}\in(\Rset^3)^n$, $\mathbf{I}\in(\Rset^{3\times 3})^n$ are and 3},I_{3\times 3},\cdots,I_{3\times 3})$, This discrete Lagrangian self-adjoint [@bk:hairer], and self-adjoint numerical integration have even order, so we are guaranteed that the resulting integration method is least second-order accurate. *Variations of discrete variables:* The variations of the discrete variables chosen respect geometry the configuration space ${\ensuremath{\mathrm{SE(3)}}}$. The variation of $x_{i_{k}}$ is given by $$\begin{aligned} x_{i_{k}}^\epsilon = x_{i_{k}} + x_{i_{k}} +\mathcal{O}(\epsilon^2),\end{aligned}$$ where $\delta x_{i_{k}}\in\Rset^3$ and vanishes at and $k=N$. The variation
 \frac{1}{2h}m_i{\ensuremath{\left\| x_{i_{k+1}}-x_{I_{k}} \right\|}}^2+\fraC{1}{h}{\mboX{tr}\EnsUrEmatH{\negThickspace{\ensuREmatH{\left[ (I_{3\times 3}-F_{i_{k}})J_{d_i} \right]}}}}\NonumBeR\\& \Quad -\FRaC{h}{2}U(\maThbf{x}_{_{k}},\mAThBF{r}_{_{k}})-\fRaC{h}{2}u(\maThBF{x}_{_{K+1}},\mathBf{R}_{_{K+1}}),\label{eQn:Ld}\end{aliGneD}$$ wHere $\mathbf{x}_{_k}\IN(\RSet^3)^n$, $\mathbf{r}_{_k}\iN{\ensuremath{\mAthRm{SO(3)}}}^n$, aNd $\MatHBf{F}_{_k}\iN(\RsEt^3)^n$, anD $\mathbF{i}\in(\RseT^{3\times 3})^n$ arE dEFined aS $\Mathbf{x}_{_K}=(X_{1_K},x_{2_K},\cdoTs,x_{n_k})$, $\mathbf{R}_{_k}=(R_{1_k},R_{2_k},\CDoTS,R_{n_k})$, $\mathbf{F}_{_k}=(F_{1_k},f_{2_k},\cdotS,F_{N_K})$, aND $\MatHbf{i}=(I_{3\times 3},I_{3\tiMeS 3},\cdotS,i_{3\times 3})$, rESpECTIveLY.

This discrete lagrangian iS SelF-adjoiNt [@Bk:hAIrer], anD self-AdJOinT numerical iNtegRation metHods haVE even orDEr, so we aRe guarAntEed That THe ReSulTiNG inTEgRatIOn mEthod is aT lEaSt secOnd-oRDER AccuRatE.

*VarIatioNs of discrete vAriAbleS:* the VariaTions Of thE dIscreTe variAbles ArE chosen to respecT the Geometry oF thE cOnfIgUratiON space ${\EnsUreMath{\matHrm{SE(3)}}}$. ThE VarIaTION oF $x_{i_{k}}$ is given by $$\begin{AlIGNeD}
x_{i_{k}}^\epsiLon = x_{i_{k}} + \EPsIlON\delta x_{i_{K}}
+\mAthCal{O}(\EPSilon^2),\End{aLIgNed}$$ where $\Delta x_{I_{K}}\iN\RSet^3$ and vAnIshes aT $k=0$ And $K=N$. THe varIAtioN of
 \frac{1}{2h}m_i{\ensurema th{\left\|  x_{i _{k +1} }- x_{i _{k} } \right\|}}^2 + \fra c{1}{h}{\mbox{tr}\ensu remat h{ \ negt h ic kspac e{\ensu r em a t h{\ le ft [ ( I_ { 3\ times  3} -F_{i_{ k}})J_{d_i } \ ri ght]}}}}\non u mb er\\& \qua d - \frac{h}{2}U (\m athbf{ x} _{_ { k}},\ mat hbf{R }_{_{k } })-\fr ac{h}{2}U (\ m athbf{ x }_{_{k+ 1 } }, \mat hbf{R}_{_{k+1}}), \ la b el{eqn:Ld}\end {align ed } $$ w her e $ \mathbf{x} _{ _k}\i n (\Rset^ 3 )^ n $ ,  $\ m athbf{R}_{_k} \in{\ensure m ath {\math rm {SO ( 3)}}}^ n$, a nd $\m athbf{F}_{_ k}\i n(\Rset^3 )^n$,a nd $\ma t hbf{I}\ in(\Rs et^ {3\ time s  3 }) ^n$  a r e d e fi ned as$\mathbf {x }_ {_k}= (x_{ 1 _ k } ,x_{ 2_k },\c dots, x_{n_k})$, $\ mat hbf{ R }_{ _k}=( R_{1_ k},R _{ 2_k}, \cdots ,R_{n _k })$, $\mathbf{F }_{_ k}=(F_{1_ k}, F_ {2_ k} ,\cdo t s,F_{n _k} )$,  and $\ mathbf{ I }=( I_ { 3 \ ti mes 3},I_{3\times3} , \ cd ots,I_{3 \times 3} )$ ,  respect iv ely .

T h i s dis cret e  L agrangia n is s e lf -a djoint[@ bk:hai re r],  an d sel f -adj oint n umerical  inte g ration methods have even ord e r, s ow e ar e g uaranteed t hatt he r esul t in g i n tegra tionme t ho d  is at least second -o rder a ccura te.

*Variati ons of dis c r e te varia bles : *T he variationsof th e discrete variable s are  chosento respec t the geom etr y o f t hec o nf iguration spa c e  ${\ en suremat h{\ mathrm{ SE( 3)} }}$ . T he  variatio n of $x_ {i _{ k} }$  is  give n  by $$\b eg in{ al ign ed}
x _ {i_{k} }^\ep silo n=x _{i _{k}} + \e p s ilon \d el ta x _{i _{ k}}
+ \mat h cal {O}(\ep silon^2), \en d {ali gn ed }$$ whe re $\delta x_ {i _{k}}\in\R se t^3 $ andv a nishes a t $k=0$ and $k=N$. Thev ariatio n o f
 \frac{1}{2h}m_i{\ensuremath{\left\|_x_{i_{k+1}}-x_{i_{k}} \right\|}}^2+\frac{1}{h}{\mbox{tr}\ensuremath{\negthickspace{\ensuremath{\left[_(I_{3\times 3}-F_{i_{k}})J_{d_i} \right]}}}}\nonumber\\& \quad_-\frac{h}{2}U(\mathbf{x}_{_{k}},\mathbf{R}_{_{k}})-\frac{h}{2}U(\mathbf{x}_{_{k+1}},\mathbf{R}_{_{k+1}}),\label{eqn:Ld}\end{aligned}$$ where_$\mathbf{x}_{_k}\in(\Rset^3)^n$,_$\mathbf{R}_{_k}\in{\ensuremath{\mathrm{SO(3)}}}^n$, and_$\mathbf{F}_{_k}\in(\Rset^3)^n$,_and $\mathbf{I}\in(\Rset^{3\times 3})^n$_are defined as_$\mathbf{x}_{_k}=(x_{1_k},x_{2_k},\cdots,x_{n_k})$, $\mathbf{R}_{_k}=(R_{1_k},R_{2_k},\cdots,R_{n_k})$, $\mathbf{F}_{_k}=(F_{1_k},F_{2_k},\cdots,F_{n_k})$, and_$\mathbf{I}=(I_{3\times 3},I_{3\times 3},\cdots,I_{3\times_3})$,_respectively.

This discrete Lagrangian is self-adjoint [@bk:hairer], and self-adjoint numerical integration methods have even order, so_we_are guaranteed_that_the_resulting integration method is at_least second-order accurate.

*Variations of discrete_variables:* The_variations of the discrete variables are chosen to_respect_the geometry of_the configuration space ${\ensuremath{\mathrm{SE(3)}}}$. The variation of $x_{i_{k}}$ is_given by $$\begin{aligned}
x_{i_{k}}^\epsilon = x_{i_{k}} +_\epsilon\delta x_{i_{k}}
+\mathcal{O}(\epsilon^2),\end{aligned}$$ where_$\delta_x_{i_{k}}\in\Rset^3$_and vanishes at $k=0$_and $k=N$. The variation of