in the literature, for solving an optimal control problem, most of the times we consider the system (ode equation) as a constraint and solve the optimal control problem, here is the question: if I have the analytical form of the solution of my system (ode), is it possible to directly replace the analytic form of the solution into the cost function and solve an optimization problem to find the optimal control? (I approximate the solution of the ode by a Neural network, so I have an analytic form of the solution)
intuitively it seems that it is possible to do it. is there any article that consider such method?