  An optimal control problem associated with the dynamics of the orientation of
a bipolar molecule in the plane can be understood by means of tools in
differential geometry. For first time in the literature $k$-symplectic
formalism is used to provide the optimal control problems associated to some
families of partial differential equations with a geometric formulation. A
parallel between the classic formalism of optimal control theory with ordinary
differential equations and the one with particular families of partial
differential equations is established. This description allows us to state and
prove Pontryagin's Maximum Principle on $k$-symplectic formalism. We also
consider the unified Skinner-Rusk formalism for optimal control problems
governed by an implicit partial differential equation.
