Appendix 1: Dynamic model of the multi-DOF robotic system
The dynamic model of the 2-DOF rigid-link robot which is depicted again in Fig. 15 and under the assumption that the masses of the links are concentrated at the links’ end is given by
$$\begin{aligned} D(\theta )\ddot{\theta }+h(\theta ,\dot{\theta })+g(\theta )=\tau \end{aligned}$$
(53)
where \(D(\theta )\) is the inertia matrix
$$\begin{aligned} D(\theta )=\begin{pmatrix} (m_1+m_2){l_1^2}+{m_1}{l_2^2}+2{m_2}{l_1}{l_2}\hbox {cos}(\theta _2) &{}\quad {m_2}{l_2^2}+{m_2}{l_1}{l_2}\hbox {cos}(\theta _2) \\ {m_2}{l_2^2}+{m_2}{l_1}{l_2}\hbox {cos}(\theta _2) &{}\quad {m_2}{l_2}(l_1+l_2)\hbox {cos}(\theta _2) \end{pmatrix} \end{aligned}$$
(54)
\(h(\theta ,\dot{\theta })\) is the Coriolis and centrifugal forces vector
$$\begin{aligned} h(\theta ,\dot{\theta })= \begin{pmatrix} -{m_2}{l_1^2}\hbox {sin}(\theta _2)\dot{\theta }_2^2-2{m_2}{l_1^2}\hbox {sin}(\theta _2){\dot{\theta }_1}{\dot{\theta }_2} \\ {m_2}{l_1^2}\hbox {sin}(\theta _2)\dot{\theta }_1^2 \end{pmatrix} \end{aligned}$$
(55)
\(g(\theta )\) is the gravitational forces vector
$$\begin{aligned} g(\theta )= \begin{pmatrix} (m_1+m_2)g{l_1}\hbox {cos}(\theta _1)+{m_2}g{l_2}\hbox {cos}(\theta _1+\theta _2) \\ {m_2}g{l_2}\hbox {cos}(\theta _1+\theta _2) \end{pmatrix} \end{aligned}$$
(56)
and \(\tau (t)\) is the control inputs vector consisting of the torques that are generated by the motors mounted on the robot’s joints.
It holds that
$$\begin{aligned} D^{-1}(\theta )={1 \over {detD}} \begin{pmatrix} {m_2}{l_2}(l_1+l_2)\hbox {cos}(\theta _2) &{} -{m_2}{l_2^2}+{m_2}{l_1}{l_2}\hbox {cos}(\theta _2) \\ -{m_2}{l_2^2}+{m_2}{l_1}{l_2}\hbox {cos}(\theta _2) &{} \quad (m_1+m_2){l_1^2}+{m_2}{l_2^2}+2{m_2}{l_1}{l_2}\hbox {cos}(\theta _2) \end{pmatrix} \end{aligned}$$
(57)
where the determinant of D is
$$\begin{aligned} detD= & {} [(m_1+m_2){l_1^2}+{m_2}{l_2^2}\nonumber \\&+\,2{m_2}{l_1}{l_2} \hbox {cos}(\theta _2)][{m_2}{l_2}(l_1+l_2)\hbox {cos}(\theta _2)]\nonumber \\&-\,[{m_2}{l_2^2}+{m_2}{l_1}{l_2}\hbox {cos}(\theta _2)]^2\nonumber \\ detD= & {} (m_1+m_2){m_2}{l_1^2}{l_2}(l_1+l_2)\hbox {cos}(\theta _2)\nonumber \\&+\,{m_2^2}{l_2^3}(l_1+l_2)\hbox {cos}(\theta _2)\nonumber \\&+\,2{m_2^2}{l_1}{l_2^2}(l_1+l_2)\hbox {cos}^2(\theta _2)-\nonumber \\&-\,{m_2^2}{l_2^4}-{m_2^2}{l_1^2}{l_2^2}\hbox {cos}^2(\theta _2)\nonumber \\&-\,2{m_2^2}{l_1}{l_2^3}\hbox {cos}(\theta _2) \end{aligned}$$
(58)
Without loss of generality, the following parameters’ values are assumed: \(m_1=1\,{\hbox {kg}}\), \(m_2=1\,{\hbox {kg}}\), \(l_1=1{\hbox {m}}\), \(l_2=1{\hbox {m}}\), and \(g=10m/sec^2\). Thus, the inverse of the inertia matrix \(D(\theta )\) becomes
$$\begin{aligned} D^{-1}(\theta )={1 \over {detD}} \begin{pmatrix} 2\hbox {cos}(\theta _2) &{} -1+\hbox {cos}(\theta _2) \\ -1+\hbox {cos}(\theta _2) &{} 2+2\hbox {cos}(\theta _2) \end{pmatrix} \end{aligned}$$
(59)
with
$$\begin{aligned} detD=4\hbox {cos}(\theta _2)+3\hbox {cos}^2(\theta _2)-1 \end{aligned}$$
(60)
For the previously given values of the parameters in the robot’s model, one has
$$\begin{aligned} h(\theta ,\dot{\theta })= & {} \begin{pmatrix} -\hbox {sin}(\theta _2)\dot{\theta }_2^2-2\hbox {sin}(\theta _2)\dot{\theta _1}\dot{\theta _2} \\ \hbox {sin}(\theta _2)\dot{\theta }_1^2 \end{pmatrix} \end{aligned}$$
(61)
$$\begin{aligned} g(\theta )= & {} \begin{pmatrix} 10\hbox {cos}(\theta _1)+10\hbox {cos}(\theta _1+\theta _2) \\ 10\hbox {cos}(\theta _1+\theta _2) \end{pmatrix} \end{aligned}$$
(62)
Using the above one gets
$$\begin{aligned}&-\,D^{-1}(\theta )h(\theta ,\dot{\theta })\nonumber \\&\quad ={-{1} \over {detD}} \begin{pmatrix} 2\hbox {cos}(\theta _2) &{} -1+\hbox {cos}(\theta _2) \\ &{} \\ -1+\hbox {cos}(\theta _2) &{} 2+2\hbox {cos}(\theta _2) \end{pmatrix}\nonumber \\&\qquad \times \,\begin{pmatrix} -\hbox {sin}(\theta _2)\dot{\theta }_2^2-2\hbox {sin}(\theta _2){\dot{\theta }_1}{\dot{\theta }_2} \\ {\hbox {sin}(\theta )_2}{\dot{\theta }_1^2} \end{pmatrix} \end{aligned}$$
(63)
or equivalently
$$\begin{aligned}&-\,D^{-1}(\theta )h(\theta ,\dot{\theta }) ={-{1} \over {detD}}\nonumber \\&\begin{pmatrix} 2\hbox {cos}(\theta _2)[-\hbox {sin}(\theta _2)\dot{\theta }_2^2-2\hbox {sin}(\theta _2){\dot{\theta }_1}{\dot{\theta }_2}]\\ +\,[-1+\hbox {cos}(\theta _2)]\hbox {sin}(\theta )_2{\dot{\theta }_1^2} \\ [-1+\hbox {cos}(\theta _2)][-\hbox {sin}(\theta _2)\dot{\theta }_2^2-2\hbox {sin}(\theta _2){\dot{\theta }_1}{\dot{\theta }_2}]\\ +\,[2+2\hbox {cos}(\theta _2)]{\hbox {sin}(\theta )_2}{\dot{\theta }_1^2} \end{pmatrix}\nonumber \\ \end{aligned}$$
(64)
and also
$$\begin{aligned}&-\,D^{-1}(\theta )g(\theta )\nonumber \\&\quad =-{{1} \over {detD}} \begin{pmatrix} 2\hbox {cos}(\theta _2) &{} -1+\hbox {cos}(\theta _2) \\ -1+\hbox {cos}(\theta _2) &{} 2+2\hbox {cos}(\theta _2) \end{pmatrix}\nonumber \\&\quad \begin{pmatrix} 10\hbox {cos}(\theta _1)+10\hbox {cos}(\theta _1+theta_2) \\ 10\hbox {cos}(\theta _1+\theta _2) \end{pmatrix} \end{aligned}$$
(65)
or equivalently
$$\begin{aligned}&-\,D^{-1}(\theta )g(\theta ) ={-{1} \over {detD}}\nonumber \\&\begin{pmatrix} 2\hbox {cos}(\theta _2)[10\hbox {cos}(\theta _1)+10\hbox {cos}(\theta _1+\theta _2)]\\ +\,[-1+\hbox {cos}(\theta _2)]10\hbox {cos}(\theta _1+\theta _2) \\ [-1+\hbox {cos}(\theta _2)][10\hbox {cos}(\theta _1)+10\hbox {cos}(\theta _1+\theta _2)]\\ +\,[2+2\hbox {cos}(\theta _2)]10\hbox {cos}(\theta _1+\theta _2) \end{pmatrix}\nonumber \\ \end{aligned}$$
(66)
Next, by defining the state variables \(x_1=\theta _1\), \(x_2=\dot{\theta }_1\), \(x_3=\theta _2\) and \(x_4=\dot{\theta }_2\) one gets
$$\begin{aligned}&D^{-1}(\theta )\nonumber \\&\quad = \begin{pmatrix} {{2\hbox {cos}(x_3)} \over {4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}} &{} {{-1+\hbox {cos}(x_3)} \over {4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}} \\ {{-1+\hbox {cos}(x_3)} \over {4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}} &{} {{2+2\hbox {cos}(x_3)} \over {4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}} \end{pmatrix}\nonumber \\ \end{aligned}$$
(67)
and also
$$\begin{aligned} -D^{-1}(\theta )h(\theta ,\dot{\theta }) = -\begin{pmatrix} {{2\hbox {cos}(x_3)[-\hbox {sin}(x_3){x_4^2}-2\hbox {sin}(x_3){x_2}{x_4}]+[-1+\hbox {cos}(x_3)]\hbox {sin}(x_3){x_2^2}} \over {4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}} \\ \\ {{[1+\hbox {cos}(x_3)][-\hbox {sin}(x_3){x_4^2}-2\hbox {sin}(x_3){x_2}{x_4}]+[2+2\hbox {cos}(x_3)]\hbox {sin}(x_3){x_2^2}} \over {4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}} \end{pmatrix} \end{aligned}$$
(68)
and similarly
$$\begin{aligned} -D^{-1}(\theta )g(\theta )=-\begin{pmatrix} {{2\hbox {cos}(x_3)[10\hbox {cos}(x_1)+10\hbox {cos}(x_1+x_3)]+[-1+\hbox {cos}(x_3)][10\hbox {cos}(x_1+x_3)]} \over {4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}} \\ \\ {{[-1+\hbox {cos}(x_3)][10\hbox {cos}(x_1)+10\hbox {cos}(x_1+x_3)]+[2+2\hbox {cos}(x_3)]10\hbox {cos}(x_1+x_3)} \over {4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}} \end{pmatrix} \end{aligned}$$
(69)
The state-space equations of the robotic model are
$$\begin{aligned} \begin{pmatrix} \ddot{x}_1 \\ \ddot{x}_3 \end{pmatrix}=-{D^{-1}(\theta )}h(\theta ,\dot{\theta })-{D^{-1}(\theta )}g(\theta )-{D^{-1}(\theta )}{\tau } \end{aligned}$$
(70)
and using that the state vector is \(x=[x_1,x_2,x_3,x_4]^T=[\theta _1,\dot{\theta }_1,\theta _2,\dot{\theta }_2]^T\) and the control inputs vector is \(\tau =[\tau _1,\tau _2]^T=[u_1,u_2]^T\) this is also written in the form
$$\begin{aligned} \dot{x}=f(x)+g_a(x){u_1}+g_b(x)u_2 \end{aligned}$$
(71)
or equivalently
$$\begin{aligned} \begin{pmatrix} \dot{x}_1 \\ \dot{x}_2 \\ \dot{x}_3 \\ \dot{x}_4 \end{pmatrix}= \begin{pmatrix} f_1 \\ f_2 \\ f_3 \\ f_4 \end{pmatrix}+ \begin{pmatrix} g_{a_1} \\ g_{a_2} \\ g_{a_3} \\ g_{a_4} \end{pmatrix}{u_1}+ \begin{pmatrix} g_{b_1} \\ g_{b_2} \\ g_{b_3} \\ g_{b_4} \end{pmatrix}{u_2} \end{aligned}$$
(72)
with
$$\begin{aligned}&f_1=x_2 \end{aligned}$$
(73)
$$\begin{aligned}&f_2=-{{2\hbox {cos}(x_3)[-\hbox {sin}(x_3){x_4^2}-2\hbox {sin}(x_3){x_2}{x_4}]+[-1+\hbox {cos}(x_3)]\hbox {sin}(x_3){x_2^2}} \over {4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}}-\nonumber \\&\qquad \quad -\,{{2\hbox {cos}(x_3)[10\hbox {cos}(x_1)+10\hbox {cos}(x_1+x_3)]+[-1+\hbox {cos}(x_3)][10\hbox {cos}(x_1+x_3)]} \over {4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}} \end{aligned}$$
(74)
$$\begin{aligned}&f_3=x_4 \end{aligned}$$
(75)
$$\begin{aligned}&f_4=-{{[1+\hbox {cos}(x_3)][-\hbox {sin}(x_3){x_4^2}-2\hbox {sin}(x_3){x_2}{x_4}]+[2+2\hbox {cos}(x_3)]\hbox {sin}(x_3){x_2^2}} \over {4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}}\nonumber \\&\qquad \quad -\,{{[-1+\hbox {cos}(x_3)][10\hbox {cos}(x_1)+10\hbox {cos}(x_1+x_3)]+[2+2\hbox {cos}(x_3)]10\hbox {cos}(x_1+x_3)} \over {4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}} \end{aligned}$$
(76)
Moreover, one has
Appendix 2: Linearization of the robot’s dynamics
The Jacobian matrices of the model of the 2-DOF robotic manipulator are defined as
$$\begin{aligned} {\nabla _x}f\mid _{(x^{*},u^{*})}= & {} \begin{pmatrix} {{{\partial }{f_1}} \over {{\partial }{x_1}}} &{} {{{\partial }{f_1}} \over {{\partial }{x_2}}} &{} {{{\partial }{f_1}} \over {{\partial }{x_3}}} &{} {{{\partial }{f_1}} \over {{\partial }{x_4}}} \\ {{{\partial }{f_2}} \over {{\partial }{x_1}}} &{} {{{\partial }{f_2}} \over {{\partial }{x_2}}} &{} {{{\partial }{f_2}} \over {{\partial }{x_3}}} &{} {{{\partial }{f_2}} \over {{\partial }{x_4}}} \\ {{{\partial }{f_3}} \over {{\partial }{x_1}}} &{} {{{\partial }{f_3}} \over {{\partial }{x_2}}} &{} {{{\partial }{f_3}} \over {{\partial }{x_3}}} &{} {{{\partial }{f_3}} \over {{\partial }{x_4}}} \\ {{{\partial }{f_4}} \over {{\partial }{x_1}}} &{} {{{\partial }{f_4}} \over {{\partial }{x_2}}} &{} {{{\partial }{f_4}} \over {{\partial }{x_3}}} &{} {{{\partial }{f_4}} \over {{\partial }{x_4}}} \end{pmatrix}_{(x^{*},u^{*})} \end{aligned}$$
(78)
$$\begin{aligned} {\nabla _x}{g_a}\mid _{(x^{*},u^{*})}= & {} \begin{pmatrix} {{{\partial }{{g_a}_1}} \over {{\partial }{x_1}}} &{} {{{\partial }{{g_a}_1}} \over {{\partial }{x_2}}} &{} {{{\partial }{{g_a}_1}} \over {{\partial }{x_3}}} &{} {{{\partial }{{g_a}_1}} \over {{\partial }{x_4}}} \\ {{{\partial }{{g_a}_2}} \over {{\partial }{x_1}}} &{} {{{\partial }{{g_a}_2}} \over {{\partial }{x_2}}} &{} {{{\partial }{{g_a}_2}} \over {{\partial }{x_3}}} &{} {{{\partial }{{g_a}_2}} \over {{\partial }{x_4}}} \\ {{{\partial }{{g_a}_3}} \over {{\partial }{x_1}}} &{} {{{\partial }{{g_a}_3}} \over {{\partial }{x_2}}} &{} {{{\partial }{{g_a}_3}} \over {{\partial }{x_3}}} &{} {{{\partial }{{g_a}_3}} \over {{\partial }{x_4}}} \\ {{{\partial }{{g_a}_4}} \over {{\partial }{x_1}}} &{} {{{\partial }{{g_a}_4}} \over {{\partial }{x_2}}} &{} {{{\partial }{{g_a}_4}} \over {{\partial }{x_3}}} &{} {{{\partial }{{g_a}_4}} \over {{\partial }{x_4}}} \end{pmatrix}_{(x^{*},u^{*})} \end{aligned}$$
(79)
$$\begin{aligned} {\nabla _x}{g_b}\mid _{(x^{*},u^{*})}= & {} \begin{pmatrix} {{{\partial }{{g_b}_1}} \over {{\partial }{x_1}}} &{} {{{\partial }{{g_b}_1}} \over {{\partial }{x_2}}} &{} {{{\partial }{{g_b}_1}} \over {{\partial }{x_3}}} &{} {{{\partial }{{g_b}_1}} \over {{\partial }{x_4}}} \\ {{{\partial }{{g_b}_2}} \over {{\partial }{x_1}}} &{} {{{\partial }{{g_b}_2}} \over {{\partial }{x_2}}} &{} {{{\partial }{{g_b}_2}} \over {{\partial }{x_3}}} &{} {{{\partial }{{g_b}_2}} \over {{\partial }{x_4}}} \\ {{{\partial }{{g_b}_3}} \over {{\partial }{x_1}}} &{} {{{\partial }{{g_b}_3}} \over {{\partial }{x_2}}} &{} {{{\partial }{{g_b}_3}} \over {{\partial }{x_3}}} &{} {{{\partial }{{g_b}_3}} \over {{\partial }{x_4}}} \\ {{{\partial }{{g_b}_4}} \over {{\partial }{x_1}}} &{} {{{\partial }{{g_b}_4}} \over {{\partial }{x_2}}} &{} {{{\partial }{{g_b}_4}} \over {{\partial }{x_3}}} &{} {{{\partial }{{g_b}_4}} \over {{\partial }{x_4}}} \end{pmatrix}_{(x^{*},u^{*})} \end{aligned}$$
(80)
where
$$\begin{aligned}&\begin{array}{cccc} {{{\partial }{f_1}} \over {{\partial }{x_1}}} =0&{{{\partial }{f_1}} \over {{\partial }{x_2}}}=1&{{{\partial }{f_1}} \over {{\partial }{x_3}}} =0&{{{\partial }{f_1}} \over {{\partial }{x_4}}}=0 \end{array} \end{aligned}$$
(81)
$$\begin{aligned}&\begin{array}{c} {{{\partial }{f_2}} \over {{\partial }{x_1}}} =-{{{2\hbox {cos}(x_3)}[10\hbox {cos}(x_1)+10\hbox {cos}(x_1+x_3)] +[-1+\hbox {cos}(x_3)][10\hbox {cos}(x_1+x_3)]} \over {4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}} \end{array} \end{aligned}$$
(82)
$$\begin{aligned}&{{{\partial }{f_2}} \over {{\partial }{x_2}}}=-{{{-2\hbox {cos}(x_3)}{2\hbox {sin}(x_3)}{x_4}+[-1+\hbox {cos}(x_3)]\hbox {sin}(x_3){2{x_2}}} \over {4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}} \nonumber \\&- {{2\hbox {cos}(x_3)10\hbox {sin}(x_1+x_3)} \over {4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}} \end{aligned}$$
(83)
$$\begin{aligned}&{{{\partial }{f_2}} \over {{\partial }{x_3}}}=-\left\{ {{-2\hbox {sin}(x_3)[-\hbox {sin}(x_3){x_4^2}-2\hbox {sin}(x_3){x_2}{x_4}]+2\hbox {cos}(x_3)[\hbox {cos}(x_3){x_4^2}-2\hbox {cos}(x_3){x_2}{x_4}]} \over {[{4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}]^2}}\right. \nonumber \\&\quad \left. + {{[-\hbox {sin}(x_3)]\hbox {sin}(x_3){x_2^2}+[-1+\hbox {cos}(x_3)]\hbox {cos}(x_3){x_2^2}} \over {[{4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}]^2}} \right\} [4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1]\nonumber \\&\quad -\left\{ {{{2\hbox {sin}(x_3)[10\hbox {cos}(x_1)+10\hbox {cos}(x_1+x_3)]-2\hbox {cos}(x_3)10\hbox {sin}(x_1+x_3)}} \over {[{4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}]^2}}\right. \nonumber \\&\quad \left. + {{[-\hbox {sin}(x_3)][10\hbox {cos}(x_1+x_3)]-[-1+\hbox {cos}(x_3)]\hbox {sin}(x_1+x_3)} \over {[{4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}]^2}} \right\} [4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1] \end{aligned}$$
(84)
$$\begin{aligned}&\left\{ +{{2\hbox {cos}(x_3)[-\hbox {sin}(x_3){x_4^2}-2\hbox {sin}(x_3){x_2}{x_4}]+[-1+\hbox {cos}(x_3)]\hbox {sin}(x_3){x_2^2}} \over {[{4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}]^2}}\right. \nonumber \\&\quad \left. + {{2\hbox {cos}(x_3)[10\hbox {cos}(x_1){+}10\hbox {cos}(x_1{+}x_3)]{+}[-1+\hbox {cos}(x_3)][10\hbox {cos}(x_1{+}x_3)]} \over {[{4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}]^2}} \right\} [-4\hbox {sin}(x_3)-6\hbox {cos}(x_3)\hbox {sin}(x_3)]\nonumber \end{aligned}$$
$$\begin{aligned}&{{{\partial }{f_2}} \over {{\partial }{x_4}}}={{2\hbox {cos}(x_3)[-\hbox {sin}(x_3)2{x_4}-2\hbox {sin}(x_3){x_2}]} \over {4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}} \end{aligned}$$
(85)
$$\begin{aligned}&\begin{array}{cccc} {{{\partial }{f_3}} \over {{\partial }{x_1}}}=0&{{{\partial }{f_3}} \over {{\partial }{x_2}}}=0&{{{\partial }{f_3}} \over {{\partial }{x_3}}}=0&{{{\partial }{f_3}} \over {{\partial }{x_4}}}=1 \end{array} \end{aligned}$$
(86)
$$\begin{aligned}&{{{\partial }{f_4}} \over {{\partial }{x_1}}}=-{{[-1+\hbox {cos}(x_3)][-10\hbox {sin}(x_1)-10\hbox {sin}(x_1+x_3)]-[2+2\hbox {cos}(x_3)]10\hbox {sin}(x_1+x_3)} \over {4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}} \end{aligned}$$
(87)
$$\begin{aligned}&{{{\partial }{f_4}} \over {{\partial }{x_2}}}=-{{[1+\hbox {cos}(x_3)][-2\hbox {sin}(x_3){x_4}]+[2+2\hbox {cos}(x_3)]\hbox {sin}(x_3)2{x_2}} \over {4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}} \end{aligned}$$
(88)
$$\begin{aligned}&{{{\partial }{f_4}} \over {{\partial }{x_3}}}=-\{ {{-\hbox {sin}(x_3)[-\hbox {sin}(x_3){x_4^2}-2\hbox {sin}(x_3){x_2}{x_4}]+[1+\hbox {cos}(x_3)][\hbox {cos}(x_3){x_4^2}-2\hbox {cos}(x_3){x_2}{x_4}]} \over {[{4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}]}^2}\nonumber \\&\qquad \qquad + {{-2\hbox {sin}(x_3)\hbox {sin}(x_3){x_2^2}+[2+2\hbox {cos}(x_3)]\hbox {cos}(x_3){x_2^2}} \over {[{4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}]}^2} \} [4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1]\nonumber \\&\qquad \qquad -\left\{ {{-\hbox {sin}(x_3)[10\hbox {cos}(x_1)+10\hbox {cos}(x_1+x_3)]+[-1+\hbox {cos}(x_3)][-10\hbox {sin}(x_3)-10\hbox {sin}(x_1+x_3)]} \over {[{4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}]}^2}\right. \nonumber \\&\qquad \qquad \left. + {{-2\hbox {sin}(x_3)10\hbox {cos}(x_1+x_3)-[2+2\hbox {cos}(x_3)]10\hbox {sin}(x_1+x_3)} \over {[{4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}]}^2}\right\} [4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1]\end{aligned}$$
(89)
$$\begin{aligned}&\left\{ {{[1+\hbox {cos}(x_3)][-\hbox {sin}(x_3){x_4^2}-2\hbox {sin}(x_3){x_2}{x_4}]+[2+2\hbox {cos}(x_3)]\hbox {sin}(x_3){x_2^2}} \over {[{4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}]}^2}\right. \nonumber \\&\quad \left. + {{[-1+\hbox {cos}(x_3)][10\hbox {cos}(x_1)+10\hbox {cos}(x_1+x_3)]+[2+2\hbox {cos}(x_3)]10\hbox {cos}(x_1+x_3)} \over {[{4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}]}^2}\right\} [-4\hbox {sin}(x_3)-6\hbox {cos}(x_3)\hbox {sin}(x_3)]\nonumber \\&{{{\partial }{f_4}} \over {{\partial }{x_4}}}={{[1+\hbox {cos}(cx_3)][-\hbox {sin}(x_3)2{x_4}-2\hbox {sin}(x_3){x_2}]} \over {4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}} \end{aligned}$$
(90)
In a similar manner, one computes
$$\begin{aligned}&\begin{array}{cccc} {{{\partial }{{g_a}_1}} \over {{\partial }{x_1}}}=0&\quad {{{\partial }{{g_a}_1}} \over {{\partial }{x_2}}}=0&\quad {{{\partial }{{g_a}_1}} \over {{\partial }{x_3}}}=0&\quad {{{\partial }{{g_a}_1}} \over {{\partial }{x_4}}}=0 \end{array} \end{aligned}$$
(91)
$$\begin{aligned}&\begin{array}{ccc} {{{\partial }{{g_a}_2}} \over {{\partial }{x_1}}}=0&\quad {{{\partial }{{g_a}_2}} \over {{\partial }{x_2}}}=0&\quad {{{\partial }{{g_a}_2}} \over {{\partial }{x_4}}}=0 \end{array} \end{aligned}$$
(92)
$$\begin{aligned}&{{{\partial }{{g_a}_2}} \over {{\partial }{x_3}}}= {{-2\hbox {sin}(x_3)[4\hbox {cos}(x_3)+4\hbox {cos}^2(x_3)-1]+2\hbox {cos}(x_3) [-4\hbox {sin}(x_3)-6\hbox {sin}(x_3)\hbox {cos}(x_3)]} \over {[{4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}]}^2} \end{aligned}$$
(93)
$$\begin{aligned}&\begin{array}{cccc} {{{\partial }{{g_a}_3}} \over {{\partial }{x_1}}}=0&\quad {{{\partial }{{g_a}_3}} \over {{\partial }{x_2}}}=0&\quad {{{\partial }{{g_a}_3}} \over {{\partial }{x_3}}}=0&\quad {{{\partial }{{g_a}_3}} \over {{\partial }{x_4}}}=0 \end{array} \end{aligned}$$
(94)
$$\begin{aligned}&\begin{array}{ccc} {{{\partial }{{g_a}_2}} \over {{\partial }{x_1}}}=0&\quad {{{\partial }{{g_a}_2}} \over {{\partial }{x_2}}}=0&\quad {{{\partial }{{g_a}_2}} \over {{\partial }{x_4}}}=0 \end{array} \end{aligned}$$
(95)
$$\begin{aligned}&{{{\partial }{{g_a}_2}} \over {{\partial }{x_3}}}= {{-\hbox {sin}(x_3)[4\hbox {cos}(x_3)+4\hbox {cos}^2(x_3)-1]+[-1+\hbox {cos}(x_3)] [4\hbox {sin}(x_3)+6\hbox {sin}(x_3)\hbox {cos}(x_3)]} \over {[{4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}]}^2} \end{aligned}$$
(96)
while one also obtains
$$\begin{aligned}&\begin{array}{cccc} {{{\partial }{{g_b}_1}} \over {{\partial }{x_1}}}=0&\quad {{{\partial }{{g_b}_1}} \over {{\partial }{x_2}}}=0&{{{\partial }{{g_b}_1}} \over {{\partial }{x_3}}}=0&\quad {{{\partial }{{g_b}_1}} \over {{\partial }{x_4}}}=0 \end{array} \end{aligned}$$
(97)
$$\begin{aligned}&\begin{array}{ccc} {{{\partial }{{g_b}_2}} \over {{\partial }{x_1}}}=0&\quad {{{\partial }{{g_b}_2}} \over {{\partial }{x_2}}}=0&\quad {{{\partial }{{g_b}_2}} \over {{\partial }{x_3}}}=0 \end{array} \end{aligned}$$
(98)
$$\begin{aligned}&\begin{array}{c} {{{\partial }{{g_b}_2}} \over {{\partial }{x_3}}}= {{-\hbox {sin}(x_3)[4\hbox {cos}(x_3)+4\hbox {cos}^2(x_3)-1]+[-1+\hbox {cos}(x_3)][4\hbox {sin}(x_3) +6\hbox {sin}(x_3)\hbox {cos}(x_3)]} \over {[{4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}]}^2} \end{array}\end{aligned}$$
(99)
$$\begin{aligned}&\begin{array}{cccc} {{{\partial }{{g_b}_3}} \over {{\partial }{x_1}}}=0&\quad {{{\partial }{{g_b}_3}} \over {{\partial }{x_2}}}=0&\quad {{{\partial }{{g_b}_3}} \over {{\partial }{x_3}}}=0&\quad {{{\partial }{{g_b}_3}} \over {{\partial }{x_4}}}=0 \end{array} \end{aligned}$$
(100)
$$\begin{aligned}&\begin{array}{ccc} {{{\partial }{{g_b}_4}} \over {{\partial }{x_1}}}=0&\quad {{{\partial }{{g_b}_4}} \over {{\partial }{x_2}}}=0&\quad {{{\partial }{{g_b}_4}} \over {{\partial }{x_3}}}=0 \end{array} \end{aligned}$$
(101)
$$\begin{aligned}&\begin{array}{c} {{{\partial }{{g_b}_4}} \over {{\partial }{x_3}}}= {{-2\hbox {sin}(x_3)[4\hbox {cos}(x_3)+4\hbox {cos}^2(x_3)-1]+[2+2\hbox {cos}(x_3)] [4\hbox {sin}(x_3)+6\hbox {sin}(x_3)\hbox {cos}(x_3)]} \over {[{4\hbox {cos}(x_3)+3\hbox {cos}^2(x_3)-1}]}^2} \end{array} \end{aligned}$$
(102)