I'm struggling to reproduce Ex. 2 from the paper by Lafferriere and Sussmann. In short, we have a nilpotent Lie algebra of vector fields generated by two elements: $X$ and $Y$. Its basis is $B_1=X$, $B_2=Y$, $B_3=[X,Y]$, $B_4=[X,[X,Y]]$, and $B_5=[Y,[X,Y]]$ (all higher order brackets are zero).
The authors write an arbitrary element of the Lie group as $$S(t)=e^{h_5(t)B_5}\circ\dots\circ e^{h_1(t)B_1}$$ and assert that $S(t)$ can be obtaned as a solution to the DE $$\dot{S}(t)=S(t)(v_1(t)B_1 + v_2(t)B_2 + v_3(t)B_3 + v_4(t)B_4)\quad [\mbox{ note } v_5=0!],$$ with $S(0)=Id$ and where $h_i$'s are related to $v_i$'s by the DEs \begin{align*}\dot{h}_1={ }&v_1,\\ \dot{h}_2={ }&v_2,\\ \dot{h}_3={ }&h_1v_2+v_3\\ \dot{h}_4={ }&\frac{1}{2}h^2_1v_2+h_1v_3+v_4\\ \dot{h}_5={ }&h_2v_3+h_1h_2v_2\end{align*} with zero initial conditions. I was trying to differentiate $S(t)$, but failed to obtain the relations between $h_i$'s and $v_i$'s as shown above.
Could somebody give me a hint at how to approach this? I'll also appreciate a reference to the literature where such differential equations on Lie groups are treated.
We have $$ \dot{S} = e^{h_5B_5}(\dot{h}_5B_5)e^{h_4B_4}e^{h_3B_3}e^{h_2B_2}e^{h_1B_1} + \ldots + e^{h_5B_5}e^{h_4B_4}e^{h_3B_3}e^{h_2B_2}(\dot{h}_2B_2)e^{h_1B_1} + e^{h_5B_5}e^{h_4B_4}e^{h_3B_3}e^{h_2B_2}e^{h_1B_1}(\dot{h}_1B_1). $$ The second last term can be written $$ e^{h_5B_5}e^{h_4B_4}e^{h_3B_3}e^{h_2B_2}e^{h_1B_1}e^{-h_1B_1}(\dot{h}_2B_2)e^{h_1B_1} = S(t)\exp(-\mathrm{ad}_{h_1B_1})(\dot{h}_2B_2) = S(t)\left(\dot{h}_2B_2-h_1\dot{h}_2B_3+\frac{1}{2}h_1^2\dot{h}_2B_4\right). $$ Do the same "conjugation" trick for all the terms, and gather them together at the end - this should hopefully give the result (I haven't checked the full calculation).