  The progress of miniaturized technology allows controlling physical systems
at nanoscale with remarkable precision in regimes where thermal fluctuations
are non-negligible. Experimental advancements have sparked interest in control
problems in stochastic thermodynamics, typically concerning a time-dependent
potential applied to a nanoparticle to reach a target stationary state in a
given time with minimal energy cost. We study this problem for a particle
subject to thermal fluctuations in a regime that takes into account the effects
of inertia, and, building on the results of [1], provide a numerical method to
find optimal controls even for non-Gaussian initial and final conditions
corresponding to non-harmonic confinements. We show that the momentum mean
tends to a constant value along the trajectory except at the boundary and the
evolution of the variance is non-trivial. Our results also support that the
lower bound on the optimal entropy production computed from the overdamped case
is tight in the adiabatic limit.
