The dynamical functional particle method (DFPM) is a method for solving equations by using a damped second order dynamical system. The dynamical system is solved by a symplectic method that is especially tailored for conservative systems. In this work we have extended DFPM to convex optimization problems with constraints. The method is tested on linear eigenvalue problems with normalization and orthogonallity constraints as well as some simple nonlinear convex optimization problems.