We use a computer algebra system to compute, in an efficient way, optimal
control variational symmetries up to a gauge term. The symmetries are then used
to obtain families of Noether's first integrals, possibly in the presence of
nonconservative external forces. As an application, we obtain eight independent
first integrals for the sub-Riemannian nilpotent problem (2,3,5,8).Comment: Presented at the 4th Junior European Meeting on "Control and
Optimization", Bialystok Technical University, Bialystok, Poland, 11-14
September 2005. Accepted (24-Feb-2006) to Control & Cybernetic