Define the action
$$S[g]=\displaystyle\frac{1}{2}\int^1_0 Tr(I(g^{-1}\dot g)~g^{-1}\dot g)~dt.$$
$I:SO(N)\to SO(N)$ denotes the endomorphism $\omega \to I(\omega)$ with $I(\omega)_{ij}=\omega_{ij}/F_{ij}$
$g:[0,1]\to SO(N)$
How to use the principle of least action or Euler-Lagrange equation to derive something like this (A differential equation with Lie bracket):
$\dot A=[A,B],~~\dot g =gB,$ where $B_{ij}=F_{ij}A_{ij}$ and $F$ is a symmetric matrix with strictly positive entries. (Actually, this is not the true result.)