Hi All,
I am trying to find the minimum of a cost function defined as the sum of kinetic energy minus potential energy over a period of time for the 3D position of a particle: int(0.5mv^2 - mgh, t_start, t_end). This problem arises in Lagrangian dynamics which says that given a force, the particle must travel a path that requires the least action. By discretizing the time, the final cost function is: sum(0.5*mv^2*dt - mgh*dt).
So, one way to optimize for this cost function is to minimize the kinetic energy and maximize for the potential energy. My problem is how I can maximize a function in ceres. Since ceres automatically square the residual, I cannot do max f(x) = - min f(x). Any suggestions?
Thanks,