Text this: Duality System in Applied Mechanics and Optimal Control