1 Introduction

In his remarkable paper [1] (English translation in [2]), Schrödinger addresses the problem of statistical reversibility of a physical system in contact with an environment. In doing so, he puts forward the idea of using entropic indicators to quantify deviations from thermodynamic equilibrium and, therefore, dissipation. Schrödinger identifies what is now commonly known as the Kullback–Leibler divergence or relative entropy [3] as a quantifier between the joint probability distribution of the system’s end states and those of a free diffusion.

In the last decades of the 20th century, Schrödinger’s trailblazing idea was reformulated into the language of stochastic optimal control [4,5,6], refining Schrödinger’s original “static bridge problem” [1] into a “dynamic Schrödinger bridge", where the relative entropy is computed between probability measures over the systems’ pathspace [7, 8]. Schrödinger bridges have active research interest because they allow computational optimal transport methods to be applied to dynamical models. This enables efficient computation in fields such as neuroscience [9, 10]; data science and machine learning [11]; and generative modeling, sampling, and dataset imputation [12, 13].

Technological advances in the last two decades have paved the way for the observation and manufacturing of nanomachines. At nanoscale, random fluctuations of thermal and topological origin may swamp out any mechanical behavior [14]. A fundamental question is, therefore, how natural or artificial nanosystems can efficiently harness randomness in order to generate controlled motion or perform thermodynamic work on larger scales. Schrödinger bridges find an optimal control protocol to rectify a system obeying stochastic dynamics, thus making it possible to devise systematic methods characterizing the efficiency of nanomachines [15].

In addition, the discovery of fluctuation relations (see Chapter 4 of [16] for a thorough conceptual and historical account) introduces a substantial development with respect to [1]. For Markov stochastic processes, fluctuation relations stem from considering the relative entropy of probability measures connected by a time reversal [17,18,19]: the corresponding generalized Schrödinger bridges minimize the thermodynamic cost associated with the transition. This means that we can consider thermodynamic cost functionals other than the Kullback–Leibler divergence [20,21,22,23,24,25,26,27]. Because the Kulllback-Leibler divergence is non-negative, the minimum mean entropy production in finite time transitions between assigned probability distributions is strictly larger than zero. Remarkably, the overdamped dynamics minimizer [28, 29] turns out to be the solution of a system of Monge–Ampère–Kantorovich optimal mass transport equations [30]. Two results of [28, 29] stand out. First, minimizers can be determined by efficient numerical algorithms even in the multi-dimensional case [31]. Second, the minimum entropy production is proportional to the squared Wasserstein distance between the probability distributions of the end states divided by the duration of the control horizon. This relation between mean entropy production and squared Wasserstein distance continues to hold as scaling limits for Markov jump processes [32] and underdamped dynamics [33, 34], see also [35, 36].

A detailed description of optimal protocols in the underdamped regime is urgent for several reasons. Optically levitated nanoparticles have become a common tool to study transitions in stochastic thermodynamics. Stable confinement and manipulation of nanoparticles within optical traps requires an account of the momentum dynamics. For instance, particle-environment energy exchanges during isoentropic (isochoric) transition within Brownian Carnot (Stirling) engines occurs through the momentum degrees of freedom [37, 38]. Understanding how to simultaneously control particles’ position and momentum is required to devise robust shortcuts to equilibration protocols [39,40,41,42,43].

A further motivation comes from the design of nanoscale electronic components [44,45,46]. Increasing the efficiency of such operations toward the bound prescribed by Landauer is a non-trivial task, with potentially relevant consequences for the design of information and computation technology [47]. The presence of inertia has been shown to lower the energetic cost needed to perform logic operations on bits [44, 48, 49]. This has sparked interest in the control of underdamped stochastic systems, with particular emphasis on the non-linear case, needed for the description of information bits [12, 50,51,52]. Ad-hoc experimental solutions have been found to realize controlled protocols for stochastic dynamics with inertia, confirming that inertial effects allow for fast and precise bit operations [49, 53,54,55].

With these motivations in mind, we introduce a systematic analytical derivation of optimal protocols for the underdamped dynamics. We consider two paradigmatic cases of running costs:

  • The underdamped version of the Schrödinger dynamic bridge problem, referred to as KL. The cost functional in this case is the Kullback–Leibler divergence between the probability measure of the controlled process and that of an assigned reference process. In [1], Schrödinger motivates this cost functional as a quantifier of the likelihood of non-equilibrium fluctuations, i.e., a large deviation functional in the current literature. Since then, Schrödinger dynamic bridge problems have emerged as relevant efficiency measure for diffusion-mediated transport processes with applications ranging from cybernetics [10] to molecular-scale engines [15]. More recently, it has been realized that when the reference process is a diffusion subject to inertia in the absence of a confining potential, Schrödinger dynamic bridge problems provide a viscous regularization of optimal mass transport [56,57,58]. This regularization has applications in machine learning [11]. Finally, when the reference process describes motion in a confining potential equal to that in the Maxwell-Boltzmann distribution of the final state, we obtain a model of an optimally controlled shortcut to adiabaticity.

  • The minimization of the mean entropy production, referred to as EP. This is the cost functional characterizing the second law of thermodynamics and Landauer’s principle [47]. We study this problem in the most general formulation compatible with detailed balance, and which can be self-consistently derived from Hamiltonian mechanics of a system coupled to an infinite bath described by harmonic oscillators. In this generalized formulation, the underdamped entropy production explicitly depends upon the control via a non-dimensional parameter g. Physically, g describes the intensity of momentum coupling between the system and bath. Interactions of these type have been recently observed in Josephson junctions [59, 60].

Besides the cost functional, the specification of an optimal control problem requires a definition of the functional space over which to carry out the optimization. This functional space is called the class of admissible controls. Our focus is on the class of admissible controls described by functions that are sufficiently regular to be differentiable in space and continuous time. Physically, this corresponds to the requirement that the control be slow with respect to the fastest time scale in the problem set by the Wiener process modeling the interaction to the bath. Under these hypotheses, we derive the stationary equations for the cost functionals by taking variations over the class of admissible controls specified by confining mechanical smooth potentials. In such a case [34], extremals of the cost solve a set of integro-differential equations, with features reminiscent of the Vlasov-Poisson-Fokker-Planck problem [61].

We obtain the following main results:

  1. I

    We show that the cumulants of the probability measure describing transitions between Gaussian states are amenable to the solution of a Lyapunov system of equations [62] in any number of dimensions. This immediately yields a body of rigorous results concerning existence, uniqueness and, when applicable, positivity of solutions (Sect. 4).

  2. II

    For transitions between states described by Maxwell-Boltzmann distributions in phase space, we introduce an infinite dimensional extension of Poincaré–Lindstedt multiscale perturbation theory [63] around the overdamped limit. This method allows us to treat all cumulants of the system probability measure on the same footing in the renormalization group fashion [64]. We hence obtain explicit predictions for the behavior in time of all phase space cumulants within second order accuracy. The method builds on ideas introduced in [65, 66] for dissipative and [67] for conservative dynamics. Although we restrict our analysis to a two-dimensional phase space, the analysis of the Gaussian case shows that extension to higher dimensional phase spaces is possible, albeit cumbersome (Sect. 6).

  3. III

    In the case of mean entropy production by an underdamped dynamics with purely mechanical coupling, our results support tightness of the lower bound provided by the overdamped dynamics [68, 69]. For more general couplings, both the mean entropy production and the cost of the dynamic Schrödinger bridge receive strictly positive corrections in the presence of inertia (Sect. 6.1.4).

  4. IV

    The cost of expansion is higher than that of compression when the initial states are thermodynamically equidistant (Sect. 8.1.1). This result is a manifestation of intrinsic asymmetries in thermal kinematics, recently pointed out in [70, 71].

The structure of the paper is as follows. In Sect. 2, we introduce the model of underdamped dynamics of a nanosystem weakly coupled to an environment by both mechanical and momentum dissipation interaction. When the intensity of the momentum coupling g vanishes, the model recovers the most widely applied underdamped dynamics. Next, we consider two thermodynamic cost functionals, KL and EP, and motivate their broad interest for applications to physics and other applied sciences. Our goal is to minimize these functionals towards the mechanical potential \(U_{t}\) governing the underdamped dynamics conditioned on the system’s initial and final probability distributions. For this reason, we present a brief overview of the mathematical results leading to known bounds for the cost functionals KL and EP in the second half of the section.

In Sect. 3, we introduce the Pontryagin-Bismut functional and derive its stationary equations. The Pontryagin-Bismut functional provides a description of optimal control dual to Bellman’s principle.

Section 4 focuses on the Gaussian case in a phase space of arbitrary dimension, and we derive our first main result here.

In Sect. 5, we set the stage for multiscale perturbation theory presented in Sect. 6. As usual, the idea is to use slow scales to cancel secular terms. Our main goal is to obtain a detailed analytical description of experimentally measurable indicators. We therefore summarize the logic of the derivation and the results before proofs. Readers only interested in our results may thus skip the second part of Sect. 6.

In Sect. 7, we briefly return to the Gaussian case and provide the analytic expression of the solution of the cell problem of the multiscale expansion [72]. The solution of the cell problem allows us to determine all cumulants within second order accuracy in the overdamped expansion.

Section 8 applies the results with some numerical computations. We have emphasized the Gaussian case for two reasons. Firstly, methods for accurate numeric integration of the exact optimal control equations are immediately available, meaning we can compare the perturbative approach with exact numeric predictions in the case of Gaussian boundary conditions. Secondly, transitions between Gaussian states are well adapted to model Brownian engines [70, 71, 73,74,75]. We therefore also study the cost of optimal protocols driving isothermal expansions and compressions of a system to an equilibrium state, which are modelled by a dynamic Schrödinger bridge. Additionally, we solve the cell problem in the case of Landauer’s erasure problem numerically and thus find inertial corrections to the erasure protocol, as well as predictions for the system’s probability measure cumulants.

The final section is devoted to conclusions and outlook. We defer further supplementary material to the Appendices.

2 Underdamped Control Model

We consider the dynamics of a nanosystem with mass m, whose position \(\varvec{\mathcalligra{q}}_{t}\) and momentum \(\varvec{\mathcalligra{p}}_{t}\) obey the Langevin–Kramers stochastic differential equations in \(\mathbb {R}^{2 d}\)

$$\begin{aligned}&\text {d}\varvec{\mathcalligra{q}}_{t}=\left( \dfrac{\varvec{\mathcalligra{p}}_{t}}{m} -\dfrac{g\,\tau }{m}\,(\varvec{\partial }U_{t})(\varvec{\mathcalligra{q}}_{t})\right) \text {d}t +\sqrt{ \dfrac{2\,g\,\tau }{m\,\beta }}\,\text {d}\varvec{\mathcalligra{w}}^{(1)}_{t}\end{aligned}$$
(1a)
$$\begin{aligned}&\text {d}\varvec{\mathcalligra{p}}_{t}=-\left( \dfrac{\varvec{\mathcalligra{p}}_{t}}{\tau } +(\varvec{\partial }U_{t})(\varvec{\mathcalligra{q}}_{t})\right) \text {d}t +\sqrt{ \dfrac{2\,m}{\tau \,\beta }}\,\text {d}\varvec{\mathcalligra{w}}^{(2)}_{t}\,. \end{aligned}$$
(1b)

In Eqs. (1), \(\varvec{\mathcalligra{w}}^{(1)}_{t}\) and \(\varvec{\mathcalligra{w}}^{(2)}_{t}\) denote two d-dimensional independent Wiener processes. The Stokes time \(\tau \) is a constant parameter specifying the characteristic time scale of dissipation.

In (1a), a non-dimensional constant g couples the mechanical force \(\varvec{\partial }U\) and the fluctuating environment modeled by the Wiener process \(\varvec{\mathcalligra{w}}^{(1)}_{t}\) to the nanosystem position dynamics. For any \(g\ge 0\), Eq. (1) guarantees convergence towards a Maxwell-Boltzmann equilibrium whenever the potential U is time independent, confining and sufficiently regular. Setting g to zero recovers the standard Langevin–Klein–Kramers model [76].

We emphasize that the dynamics described by (1) are consistent with the general analysis [77] of the conditions guaranteeing the self-consistency of the harmonic environment hypothesis. In fact, (1) can be obtained from a microscopic Hamiltonian dynamics, in which the system interacts with a “bipartite harmonic” environment [78]. By bipartite harmonic environment, we mean an environment modeled by two kinds of oscillators: one type interacts with the system via the commonly assumed position-coupling [79], and the other via a linear momentum coupling [59, 60]. Linear momentum coupling models momentum dissipation observed e.g. in a single Josephson junction interacting with the blackbody electromagnetic field.

As for the force in (1), we only assume that it is the negative gradient of a confining and sufficiently regular mechanical potential, i.e. a potential depending only on the system position. We suppose that potentials of this type give rise to an open set of controls. Within this set, the controls ensure that at every instant of time t in a given time horizon \([{t}_{\iota },{t}_{\mathfrak {f}}]\) the probability density of the system

$$\begin{aligned} {\text {Pr}}\left( \varvec{x}\,\le \,\begin{bmatrix} \varvec{\mathcalligra{q}}_{t} \\ \varvec{\mathcalligra{p}}_{t} \end{bmatrix}< \varvec{x}+\text {d}^{2\,d}\varvec{x}\right) ={f}_{t}(\varvec{x})\,\text {d}^{2 \,d}\varvec{x} \end{aligned}$$

is well defined and satisfies the Fokker–Planck equation.

At an initial time \(t={t}_{\iota }\), we posit that the state of the nanosystem is statistically described by an assigned Maxwell-Boltzmann distribution at inverse temperature \(\beta \):

$$\begin{aligned} {f}_{{t}_{\iota }}(\varvec{q},\varvec{p})=Z_{\iota }^{-1}\exp \left( -\dfrac{\beta \,\Vert \varvec{p}\Vert ^{2}}{2\,m}-\beta \,U_{\iota }(\varvec{q})\right) \end{aligned}$$
(2)

Furthermore, we require that at the end of the control horizon \(t={t}_{\mathfrak {f}}\) the probability density of the system satisfies the boundary condition

$$\begin{aligned} {f}_{{t}_{\mathfrak {f}}}(\varvec{q},\varvec{p}) =Z_{\mathfrak {f}}^{-1}\exp \left( -\dfrac{\beta \,\Vert \varvec{p}\Vert ^{2}}{2\,m}-\beta \,U_{\mathfrak {f}}(\varvec{q})\right) \,. \end{aligned}$$
(3)

These assumptions on the probability distributions of the system end states are not necessary for the considerations that follow. They have the merit, however, to be both physically admissible and to lead to simplifications in the multiscale analysis of Sect. 6.

Fig. 1
figure 1

Stylized representation of a Schrödinger bridge modeling Landauer’s erasure of one bit of memory at minimum dissipation

The set of confining potentials \(U_{t}\) that give rise to phase space diffusions with probability marginals (2), (3) define the class of admissible controls of (1).

Our aim is to determine the optimal mechanical potentials \(U_{t}\) among the admissible ones that minimizes the thermodynamic cost functionals defined below conditioned on the initial and final probability distributions (2) and (3).

2.1 Thermodynamic Cost Functionals

We focus our attention on two physically relevant cases, hereafter referred to as KL and EP.

KL: Underdamped dynamic Schrödinger bridge [1]. The thermodynamic cost functional to minimize is the Kullback–Leibler divergence of the measure \(\mathcal {P}=\mathcal {P}_{\iota }^{\mathfrak {f}}\) generated by (1) subject to (2) and (3), from the measure \(\mathcal {Q}=\mathcal {Q}_{\iota }\) generated by (1) when the mechanical force is \( \varvec{\partial } U_{\star }\) and only the initial density (2) is assigned. The cost functional reads (see Appendix A)

$$\begin{aligned} \begin{aligned} {\text {K}}(\mathcal {P}\mathrel {\Vert }\mathcal {Q})&:={\text {E}}_{\mathcal {P}}\ln \dfrac{\text {d}\mathcal {P}}{\text {d}\mathcal {Q}} \\&=\dfrac{\beta \,\tau \,(1+g)}{4\,m}{\text {E}}_{\mathcal {P}}\int _{{t}_{\iota }}^{{t}_{\mathfrak {f}}}\hspace{-0.2cm}\text {d}t\, \Vert (\varvec{\partial }U_{t})(\varvec{\mathcalligra{q}}_{t})-(\varvec{\partial }U_{\star })(\varvec{\mathcalligra{q}}_{t})\Vert ^{2}\,. \end{aligned} \end{aligned}$$
(4)

The notation \({\text {E}}_{\mathcal {P}} \) emphasizes that the expectation value over the diffusion path is with respect to the measure \(\mathcal {P}\), and \(\text {d}\mathcal {P}/\text {d}\mathcal {Q}\) denotes the Radon-Nikodym derivative between \(\mathcal {P}\) and \(\mathcal {Q}\).

In the mathematics literature, the minimization of (4) at

$$U_{\star } =0$$

is referred to as entropic interpolation [7] or entropic transportation cost [80]. This terminology is due to the discovery [56] that the minimization of the overdamped counterpart of (4) yields a viscous regularization of the Monge–Ampère–Kantorovich optimal transport problem (see [30]). Finally, [15] supports the use of the cost of a Schrödinger bridge as a natural efficiency measure for nano-engines in highly fluctuating environments; see [10, 81] for a wider class of applications. In Sect. 8.1.1 we show how the optimization of (4) provides a plausible model of shortcut to equilibration.

EP: Mean entropy production. In stochastic thermodynamics, the average entropy production is identified with the Kullback–Leibler divergence of the forward measure \(\mathcal {P}\) from a measure \(\mathcal {P}_{\mathcal {R}} \) obtained by a combined time-reversal and path-reversal operation (see e.g. [18, 19, 29] and Appendix A for further details):

$$\begin{aligned} \mathcal {E}&={\text {E}}_{\mathcal {P}}\ln \dfrac{\text {d}\mathcal {P}}{\text {d}\mathcal {P}_{\mathcal {R}}}\nonumber \\&={\text {E}}_{\mathcal {P}}\ln \dfrac{{p}_{{t}_{\iota }}(\varvec{\mathcalligra{q}}_{{t}_{\iota }},\varvec{\mathcalligra{p}}_{{t}_{\iota }})}{{p}_{{t}_{\mathfrak {f}}}(\varvec{\mathcalligra{q}}_{{t}_{\mathfrak {f}}},\varvec{\mathcalligra{p}}_{{t}_{\mathfrak {f}}})}+{\text {E}}_{\mathcal {P}}\int _{{t}_{\iota }}^{{t}_{\mathfrak {f}}}\text {d}t\, \left( \dfrac{\beta \,\Vert \varvec{\mathcalligra{p}}_{t}\Vert ^{2}}{m\,\tau }-\dfrac{d}{\tau }\right) \nonumber \\&\qquad +\dfrac{\beta \,g\,\tau }{m}{\text {E}}_{\mathcal {P}}\int _{{t}_{\iota }}^{{t}_{\mathfrak {f}}}\text {d}t\,\left( \left\| (\varvec{\partial } U)(\varvec{\mathcalligra{q}}_{t})\right\| ^{2}-\dfrac{(\varvec{\partial }^{2} U)(\varvec{\mathcalligra{q}}_{t})}{\beta }\right) \,. \end{aligned}$$
(5)

Some observations are in order. To start with, the identification of (5) as mean entropy production of during a thermodynamic transition is legitimate in consequence of its relation with the heat release by the system evolving according to (1). This is a consequence of the general theory expounded in [19]. In Appendix B for reader convenience, we reproduce the calculation that justifies the identification.

For any g, the entropy production vanishes for a system in a Maxwell-Boltzmann equilibrium. For a bridge process, equilibrium means that the boundary conditions (2), (3) are specified by the same Maxwell-Boltzmann distribution. The corresponding optimal control problem becomes trivial. In any non-trivial case, the Gibbs-Shannon entropy difference appearing in the first row of (5) does not play a role in the optimization as it is fully specified by the boundary conditions.

Finally, the entropy production is non-coercive, i.e it is not a convex functional of the control at g equal zero. As a practical consequence, none of the infinitely many time-dependent protocols that connect the selected end states can be said to minimize the entropy production. Precise treatments of the optimal control problem in such a case are possible either by regularizing the problem [34], or in special cases [75], by considering non-purely mechanical controls [33]. Studying, as we propose here, the mean entropy production at finite g has the advantage of making the cost functional coercive with respect to the mechanical force.

At this point, it is worth commenting on our working hypotheses. The cost functionals in both case KL and EP are readily convex in the mechanical potential. We surmise the existence of an open set of admissible potentials that allows us to look for a minimum in the form of a regular extremal of a variational problem [82]. To justify this assumption we recall that Hörmander’s theorem (see e.g [83]) ensures that any potential \(U_{t}\) (1) that is sufficiently regular, bounded from below, and growing sufficiently fast at infinity results in a smooth density.

2.2 Bounds of the Thermodynamic Cost Functionals

In practice, the cost functionals (4) and (5) are the limit of Riemann sums on ratios of transition probability densities evaluated over increasingly small time increments. This construction is recalled in Appendix A. The construction immediately implies that (4) is bounded from below by the Kullback–Leibler divergence of the joint probability distribution of the system state at the end-times of the control horizon.

The measure theoretic analysis in Sect. 3 of [6] permits drawing more precise qualitative conclusions without making direct reference to the details of the dynamics. To summarize them, let us denote by \(\mathbb {S}\) the state space of dimension \(d_{S}\), where the stochastic process \(\big \{\varvec{\mathcalligra{x}}_{t},t\in [{t}_{\iota },{t}_{\mathfrak {f}}]\big \}\) with probability measure \(\mathcal {P}\) takes values. We also denote by \(\mathcal {P}_{\varvec{y}}^{\varvec{x}}\) (\(\mathcal {Q}_{\varvec{y}}^{\varvec{x}}\)) the probability measures subject to the bridge conditions

$$ \begin{aligned}&\varvec{\mathcalligra{x}}_{{t}_{\iota }}=\varvec{y}\quad \& \quad \varvec{\mathcalligra{x}}_{{t}_{\mathfrak {f}}}=\varvec{x} \,. \end{aligned}$$

Under technical hypotheses guaranteeing that the optimization problem is well-posed, the main takeaways of [6] are the following. First, the Kullback–Leibler divergence is always amenable to the decomposition [4]

$$\begin{aligned} {\text {K}}(\mathcal {P}\mathrel {\Vert }\mathcal {Q})={\text {K}}(\wp \mathrel {\Vert }\wp _{\star }) + \int _{\mathbb {S}^{2}} \text {d}^{d_{S}}\varvec{x}\,\text {d}^{d_{S}}\varvec{y}\,\wp (\varvec{x},\varvec{y})\, {\text {K}}(\mathcal {P}_{\varvec{y}}^{\varvec{x}}\mathrel {\Vert }\mathcal {Q}_{\varvec{y}}^{\varvec{x}})\,. \end{aligned}$$
(6)

The first addend is the quantity originally considered by Schrödinger in [1], namely the static Kullback-Leibler divergence

$$\begin{aligned} {\text {K}}(\wp \mathrel {\Vert }\wp _{\star })= \int _{\mathbb {S}^{2}} \text {d}^{d_{S}}\varvec{x}\,\text {d}^{d_{S}}\varvec{y}\,\wp (\varvec{x},\varvec{y}) \ln \dfrac{\wp (\varvec{x},\varvec{y})}{\wp _{\star }(\varvec{x},\varvec{y})} \end{aligned}$$
(7)

of the joint probability density \(\wp \) of \(\varvec{\mathcalligra{x}}_{{t}_{\iota }}\) and \(\varvec{\mathcalligra{x}}_{{t}_{\mathfrak {f}}}\) from the two point probability

$$\begin{aligned} \wp _{\star }(\varvec{x},\varvec{y})={T}_{{t}_{\mathfrak {f}},{t}_{\iota }}^{(\mathcal {Q})}(\varvec{x}\mid \varvec{y}){f}_{{t}_{\iota }}(\varvec{y})\,, \end{aligned}$$

which is uniquely defined by the transition probability density \({T}_{{t}_{\mathfrak {f}},{t}_{\iota }}^{(\mathcal {Q})}(\cdot \mid \cdot )\) of the reference process and the probability distribution of \(\varvec{\mathcalligra{x}}_{{t}_{\iota }}\).

Both addends in (6) are positive. Furthermore, the static divergence (7) vanishes if and only if

$$\begin{aligned} \wp (\varvec{x},\varvec{y})=\wp _{\star }(\varvec{x},\varvec{y}). \end{aligned}$$

Many possible \(\mathcal {P}\) are compatible with the same \(\wp \). Once \(\wp \) is fixed, \({\text {K}}(\mathcal {P}\mathrel {\Vert }\mathcal {Q})\) attains an infimum, in fact a minimum, for the \(\mathcal {P}\) that makes the second term of (6) vanish. A necessary condition [4, 6] enforcing this requirement is that for any \({t}_{\iota }\,\le \,s\,\le \,t\,\le \,{t}_{\mathfrak {f}}\)

$$\begin{aligned} \mathcal {P}(\varvec{\mathcalligra{x}}_{t}=\varvec{x}\mid \varvec{\mathcalligra{x}}_{s}=\varvec{y},\varvec{\mathcalligra{x}}_{{t}_{\iota }}=\varvec{z}) =\dfrac{h_{t,{t}_{\iota }}(\varvec{x},\varvec{z})\,{T}_{t,s}^{(\mathcal {Q})}(\varvec{x}\mid \varvec{y})}{h_{s,{t}_{\iota }}(\varvec{y},\varvec{z})} \end{aligned}$$
(8)

where the function h is defined by

$$\begin{aligned} h_{t,{t}_{\iota }}(\varvec{x},\varvec{y})= \int _{\mathbb {S}}\text {d}^{d_{S}}\varvec{z}\, h_{{t}_{\mathfrak {f}},{t}_{\iota }}(\varvec{z},\varvec{y})\,{T}_{{t}_{\mathfrak {f}},t}^{(\mathcal {Q})}(\varvec{x}\mid \varvec{z})\,. \end{aligned}$$

Once (8) holds true, the control of the abstract optimization problem is \( h_{{t}_{\mathfrak {f}},{t}_{\iota }}\). Correspondingly, (6) reduces to (7), which in turn we can couch into the form

$$\begin{aligned} {\text {K}}_{\text {opt}}(\mathcal {P}\mathrel {\Vert }\mathcal {Q}) =&{\text {K}}_{\text {opt}}(\wp \mathrel {\Vert }\wp _{\star }) = \int _{\mathbb {S}^{2}} \text {d}^{d_{S}}\varvec{x}\,\text {d}^{d_{S}}\varvec{y}\, h_{t,{t}_{\iota }}(\varvec{x},\varvec{y}) \,{T}_{{t}_{\mathfrak {f}},{t}_{\iota }}^{(\mathcal {Q})}(\varvec{x}\mid \varvec{y})\,{f}_{{t}_{\iota }}(\varvec{y})\,\ln h_{{t}_{\mathfrak {f}},{t}_{\iota }}(\varvec{x},\varvec{y})\,. \end{aligned}$$

The general form (8) of the necessary condition for the reduction to a static problem does not require the optimal process to enjoy the Markov property; the transition probability (8) may carry memory of the value taken by \(\varvec{\mathcalligra{x}}_{{t}_{\iota }}\). The results of [6] ensure that (8), under further regularity assumptions, reduces for any \(s\,\le \,t \in \left[ {t}_{\iota },{t}_{\mathfrak {f}}\right] \) to a Markov transition probability density

$$\begin{aligned} {T}_{t,s}^{(\mathcal {P}_{\iota }^{\mathfrak {f}})}(\varvec{x}\mid \varvec{y}) =\dfrac{h_{t}(\varvec{x})\,{T}_{t,s}^{(\mathcal {Q})}(\varvec{x}\mid \varvec{y})}{h_{s}(\varvec{y})}\,. \end{aligned}$$

From the physics point of view, the assumptions leading to Markov transition probability densities immediately include an overdamped dynamics [5] or an underdamped dynamics driven by force field depending on both the position and momentum of the system [68, 84], and thus distinct from (1).

Our discussion so far refers to case KL. The connection to case EP stems from the Talagrand-Otto-Villani inequalities [85, 86]. These inequalities show that the static Kullback–Leibler divergence between probability densities is bounded from below by the squared Wasserstein distance between the densities multiplied by a proportionality factor. For the overdamped dynamics considered in [5], Mikami [56] (see also [57, 80, 87]) later proved that the bound becomes tight in a suitable scaling limit and the proportionality factor reduces to the inverse of the duration of the control horizon. More explicitly, the entropic transport cost (\(U_{\star }=0\)) multiplied by the viscosity becomes equal to the cost of a Monge–Ampère–Kantorovich optimal mass transport problem [30] in the limit of vanishing viscosity.

The connection to problem EP consists in the proof [28, 29] and [58] that the minimization of the mean entropy production by bridge processes obeying the overdamped dynamics can be exactly mapped into a Monge–Ampère–Kantorovich optimal mass transport. The reason is that the optimal control problem admits an equivalent reformulation, in which the current velocity of the admissible processes [88] play the role of control instead of the drift.

In the underdamped case, the presence of inertial effects complicates the picture. The mean entropy production cannot be written as the square of the current velocity. This prevents a direct application of the Benamou–Brenier inequality [89] (see also Appendix C). The Benamou–Brenier inequality allows one to couch the minimum mean overdamped entropy production into the squared Wasserstein distance between the densities at the end of the control horizon. It is, however, possible to show [33, 34] that the underdamped mean entropy production admits its overdamped counterpart as a lower bound. In particular, for (5), the following inequality

$$\begin{aligned} \mathcal {E}_{{t}_{\iota }}^{{t}_{\mathfrak {f}}}\,\ge \,\dfrac{m\,\beta }{(1+g)\,\tau } \dfrac{{\text {E}}_{\mathcal {P}}\left\| \varvec{\mathcalligra{q}}_{{t}_{\mathfrak {f}}}-\varvec{\mathcalligra{q}}_{{t}_{\iota }}\right\| ^{2}}{{t}_{\mathfrak {f}}-{t}_{\iota }} \end{aligned}$$
(9)

holds true. Bounds of the type (9) for the mean entropy production appeared in [33, 34] and later in [90]. The proof of (9) presented in [69] is motivated by [91]. For reader convenience, we reproduce the proof in Appendix C.

The above considerations suggest that for both the over- and underdamped dynamics (1), the inequality

$$\begin{aligned} {\text {K}}(\mathcal {P}\mathrel {\Vert }\mathcal {Q}) \,\ge \,\dfrac{\mathcal {C}_{\text {TOV}}\,m\,\beta }{(1+g)\,\tau } \dfrac{{\text {E}}_{\mathcal {P}}\left\| \varvec{\mathcalligra{q}}_{{t}_{\mathfrak {f}}}-\varvec{\mathcalligra{q}}_{{t}_{\iota }}\right\| ^{2}}{{t}_{\mathfrak {f}}-{t}_{\iota }} \end{aligned}$$
(10)

should also hold true with \(\mathcal {C}_{\text {TOV}}\) a positive constant in agreement with the Talagrand-Otto-Villani theory [85, 86]. We refer to [68] for a mathematical proof of the bound for the underdamped dynamics, and for the overdamped dynamics [92] (see also [58, 80, 93]), including an explicit prediction of the constant \(\mathcal {C}_{\text {TOV}}\).

3 Optimal Control Formulation

Optimal control problems can be turned into variational problems by coupling the dynamics to the cost functional through Lagrange multipliers. In hydrodynamics, such an approach is referred to as the adjoint equation method, and has a long history going back to [94, 95]. By themselves alone, solutions of the variational equations only provide a necessary condition for the existence of regular extremals of an optimal control problem: extremals continuously satisfying (partial) differential equations. Optimality follows from convexity of the cost, as in our case, or from the study of the second variation. A mathematical formulation of the adjoint method in the context of stochastic optimal control is due to Bismut see e.g. [96]. Bismut theory may be regarded as extending the Pontryagin principle of deterministic optimal control [97] see also [82, 98]. Based on these considerations, we construct from KL and EP variational functionals by imposing that the mean forward derivative [88] of a Lagrange multiplier is an exact differential when the density \({f}_{t}(\varvec{x})\) with respect to the Lebesgue measure satisfies a Fokker–Planck equation associated with probability preserving boundary conditions. As in [33, 34] we refer to these functionals as Pontryagin-Bismut. In such a setup, we look for variational extremals of

$$\begin{aligned} \hspace{-0.3cm} \mathcal {A}[{f},U,V]&=\int _{\mathbb {R}^{2d}}\text {d}^{2d}\varvec{x} \Big (V_{{t}_{\iota }}(\varvec{x}){f}_{\iota }(\varvec{x}) -V_{{t}_{\mathfrak {f}}}(\varvec{x}){f}_{\mathfrak {f}}(\varvec{x})\Big ) \nonumber \\&\qquad +\int _{{t}_{\iota }}^{{t}_{\mathfrak {f}}}\text {d}t\,\int _{\mathbb {R}^{2d}}\text {d}^{2\,d}\varvec{x} \,{f}_{t}(\varvec{x})\Big (C_{t}^{(U_{t})}(\varvec{x})+(\partial _{t}+\mathfrak {L}_{\varvec{x}})V_{t}(\varvec{x})\Big )\,. \end{aligned}$$
(11)

Here we collectively denote phase space coordinates as

$$\varvec{x}=(\varvec{q},\varvec{p})$$

and define the running cost functional as

$$\begin{aligned} C_{t}^{(U_{t})}(\varvec{x})={\left\{ \begin{array}{ll} \dfrac{\beta \,\tau \,(1+g)}{4\,m} \Vert (\varvec{\partial }U_{t})(\varvec{q})-(\varvec{\partial }U_{\star })(\varvec{q})\Vert ^{2} & {\textbf {[KL]}} \\ \dfrac{\beta \,\Vert \varvec{p}\Vert ^{2}}{m\,\tau }-\dfrac{\,d\,}{\tau }+\dfrac{\beta \,g\,\tau }{m}\left( \left\| (\varvec{\partial } U_{t})(\varvec{q})\right\| ^{2}-\dfrac{(\varvec{\partial }^{2} U_{t})(\varvec{q})}{\beta }\right) \,. & {\textbf {[EP]}} \end{array}\right. } \end{aligned}$$

In writing (11) we conceptualize the fields \({f}\), V, and U as unknown variational fields. The existence of the functional requires integrability with respect to \({f}_{t}\) which we assume to be a probability density taking the values \({f}_{\iota }\) and \({f}_{\mathfrak {f}} \) at the start and end of the control horizon respectively, fixed by (2), (3). The field V becomes the value function of Bellman’s formulation of optimal control theory [97]. In (11), it plays the role of a Lagrange multiplier enforcing the dynamics.

Accordingly, we denote by \(\mathfrak {L}_{\varvec{x}}\) the differential generator of the dynamics determined by (1):

$$\begin{aligned} \begin{aligned} \mathfrak {L}_{\varvec{x}}= \dfrac{\varvec{p}-\tau \,g\,(\varvec{\partial }U_{t})(\varvec{q})}{m}\cdot \partial _{\varvec{q}} -\left( \dfrac{\,\varvec{p}\,}{\tau }+(\varvec{\partial }U_{t})(\varvec{q})\right) \cdot \partial _{\varvec{p}}+\dfrac{g\,\tau }{m\,\beta }\,\partial _{\varvec{q}}^{2} +\dfrac{m}{\tau \,\beta }\,\partial _{\varvec{p}}^{2}\,. \end{aligned} \end{aligned}$$
(12)

Thus, if \({f}_{t}\) is the instantaneous density of (1), then

$$\begin{aligned} ({\text {D}}V)_{t}(\varvec{x})=(\partial _{t}+\mathfrak {L}_{\varvec{x}})V_{t}(\varvec{x}) \end{aligned}$$

is the mean forward derivative of V along the paths of (1) and by definition

$$\begin{aligned} {\text {E}}_{\mathcal {P}}\left( V_{{t}_{\mathfrak {f}}}(\varvec{\mathcalligra{x}}_{{t}_{\mathfrak {f}}})-V_{t_{\iota }}(\varvec{\mathcalligra{x}}_{{t}_{\iota }})\right) =\int _{{t}_{\iota }}^{{t}_{\mathfrak {f}}}\text {d}t {\text {E}}_{\mathcal {P}}({\text {D}}V)_{t}(\varvec{\mathcalligra{x}}_{t})\,. \end{aligned}$$

This observation justifies the introduction of the value function as a Lagrange multiplier.

Our definition of the value function in EP omits the contribution from the variation of the Gibbs-Shannon entropy to the mean entropy production from the Pontryagin-Bismut functional. This is because the Gibbs-Shannon entropy in (5) is fully specified by the assigned boundary conditions and therefore does not enter the determination of the optimal control.

3.1 Variational Equations

We determine the optimal control equations by a stationary variation of (11). As expected, the variation with respect to the value function yields the Fokker–Planck equation for the probability density

$$\begin{aligned} (\partial _{t}-\mathfrak {L}_{\varvec{x}}^{\dagger })\,{f}_{t}(\varvec{x})=0\,. \end{aligned}$$
(13)

The variation with respect to the probability density yields the dynamic programming equation [97]

$$\begin{aligned} (\partial _{t}+\mathfrak {L}_{\varvec{x}})V_{t}(\varvec{x})+C_{t}^{(U_{t})}(\varvec{x})=0\,. \end{aligned}$$
(14)

In the overdamped case [5, 28, 58], and in the case when the control is a function of both position and momentum [68, 84, 99], the variation with respect to the potential yields a local, exactly integrable condition for the optimal control. In stark contrast, we find that the optimal control potential in the underdamped case must solve an integral equation coupled to the Fokker–Planck and dynamic programming equations [34]:

$$\begin{aligned}&\varvec{\partial }_{\varvec{q}}\cdot \int _{\mathbb {R}^{d}} \text {d}^{d}\varvec{p}\,{f}_{t}(\varvec{q},\varvec{p})\left( \dfrac{g\,\tau }{m}\partial _{\varvec{q}} V_{t}(\varvec{q},\varvec{p})+\partial _{\varvec{p}} V_{t}(\varvec{q},\varvec{p})\right) =\varvec{\partial }_{\varvec{q}}\cdot \Big ({\tilde{f}}_{t}(\varvec{q})\,\varvec{b}_{t}(\varvec{q}) \Big ) \end{aligned}$$
(15)

with \(\tilde{{f}}_{t}(\varvec{q})\) as the position marginal of \({f}_{t}(\varvec{q},\varvec{p}) \) (see Eq. (126) ) and

$$\begin{aligned} \varvec{b}_{t}(\varvec{q})= {\left\{ \begin{array}{ll} \dfrac{\beta \,\tau \,(1+g)}{2\,m} \big ((\varvec{\partial }U_{t})(\varvec{q})-(\varvec{\partial }U_{\star })(\varvec{q})\big ) & {\textbf {[KL]}} \\ \dfrac{\beta \,g\,\tau }{m}\left( 2\,(\varvec{\partial } U_{t})(\varvec{q})+\dfrac{(\varvec{\partial } \ln {\tilde{f}}_{t} )(\varvec{q})}{\beta }\right) \,. & {\textbf {[EP]}} \end{array}\right. } \end{aligned}$$

Finding regular extremals amounts to finding the simultaneous solutions of Eqs. (13), (14) and (15). The integro-differential stationary condition (15) is hard to approach due to its non-local nature (in momentum space). These issues are to some extent reminiscent of the Vlasov–Poisson–Fokker–Planck (see e.g. [61]) and the McKean–Vlasov (see e.g. [100]) equations. The condition somewhat simplifies when the configuration space is one dimensional. We can write

$$\begin{aligned}&\int _{\mathbb {R}} \text {d} p\,\dfrac{{f}_{t}(q,p)}{{\tilde{f}}_{t}(q)}\left( \dfrac{g\,\tau }{m}\partial _{q} V_{t}(q,p)+\partial _{p} V_{t}(q,p)\right) \nonumber \\&\qquad ={\left\{ \begin{array}{ll} \dfrac{\beta \,\tau \,(1+g)}{2\,m} \Big ((\partial U_{t})(q)-(\partial U_{\star })(q)\Big ) & {\textbf {[KL]}} \\ \dfrac{\beta \,g\,\tau }{m}\left( 2\,(\partial U_{t})(q)+\dfrac{(\partial \ln {\tilde{f}}_{t} )(q)}{\beta }\right) \,. & {\textbf {[EP]}} \end{array}\right. } \end{aligned}$$
(16)

3.2 Dual Expression of the Optimal Cost

When the dynamic programming equation (14) holds, the Pontryagin-Bismut functional (11) reduces to

$$\begin{aligned} {\mathcal {A}}[{f},U,V]\Big |_{\mathcalligra {d}.\mathcalligra {p.}}= \int _{\mathbb {R}^{2d}}\text { d }^{2d}\varvec{x} \Big (V_{{t}_{\iota }}(\varvec{x}){f}_{\iota }(\varvec{x})-V_{{t}_{\mathfrak {f}}}(\varvec{x}){f}_{\mathfrak {f}}(\varvec{x})\Big )\,. \end{aligned}$$
(17)

The optimum value of the cost hence coincides with the minimum, or at least infimum of (17), taken over all value functions satisfying the dynamic programming equation. This observation is the basis for the aforementioned duality relation used in [92], and later in [58, 68, 80, 93]. In what follows, we use (17) to compute the expression of minimum costs predicted by multiscale perturbation theory.

4 Gaussian Case

In view of the complexity of the optimal control condition (15), it is instructive to analyze the case of Gaussian boundary conditions. A similar analysis was performed in [34] for a case closely related to EP, but only in one dimensional configuration space.

Gaussian boundary conditions lead to major simplifications. The structure of the Fokker–Planck and dynamic programming equations preserve the space of Gaussian probability densities and second order polynomials in phase space for any at most quadratic control

$$\begin{aligned} U_{t}(\varvec{q})=\mathcalligra{u}_{t}+\varvec{u}_{t}\cdot \varvec{q} +\dfrac{1}{2}\varvec{q}^{\top }\mathscr {U}_{t}\varvec{q} \end{aligned}$$

and reference

$$\begin{aligned} U_{\star }(\varvec{q})=\mathcalligra{u}_{\star }+\varvec{u}_{\star }\cdot \varvec{q} +\dfrac{1}{2}\varvec{q}^{\top }\mathscr {U}_{\star }\varvec{q} \end{aligned}$$

potentials. In the above expressions \(\varvec{u}_{t} \), \( \varvec{u}_{\star }\) are vectors in \(\mathbb {R}^{d}\) and \( \mathscr {U}_{t}\), \( \mathscr {U}_{\star }\) are \(d\,\times \,d\) real symmetric matrices. Thus, the probability density is fully specified by the set of first and second order cumulants

$$\begin{aligned}&\mathscr {Q}_{t}={\text {E}}_{\mathcal {P}}(\varvec{\mathcalligra{q}}_{t}\,\otimes \, \varvec{\mathcalligra{q}}_{t})-{\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{q}}_{t}\,\otimes \, {\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{q}}_{t}\\&\mathscr {C}_{t}={\text {E}}_{\mathcal {P}}(\varvec{\mathcalligra{q}}_{t}\,\otimes \, \varvec{\mathcalligra{p}}_{t})-{\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{q}}_{t}\,\otimes \, {\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{p}}_{t}\\&\mathscr {P}_{t}={\text {E}}_{\mathcal {P}}(\varvec{\mathcalligra{p}}_{t}\,\otimes \, \varvec{\mathcalligra{p}}_{t})-{\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{p}}_{t}\,\otimes \, {\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{p}}_{t}\,. \end{aligned}$$

Here and below, we use \(\otimes \) to denote the outer product of vectors in \(\mathbb {R}^{d}\). Correspondingly, a value function of the form

$$\begin{aligned}&V_{t}(\varvec{q},\varvec{p})=\mathcalligra{v}_{t}+\varvec{v}_{t}^{(q)}\cdot \varvec{q}+\varvec{v}_{t}^{(p)}\cdot \varvec{p} +\dfrac{\varvec{q}^{\top }\mathscr {V}_{t}^{(q,q)}\varvec{q}+\varvec{p}^{\top }\mathscr {V}_{t}^{(p,p)}\varvec{p} +\varvec{p}^{\top }\mathscr {V}_{t}^{(p,q)}\varvec{q}+\varvec{q}^{\top }\mathscr {V}_{t}^{(q,p)}\varvec{p} }{2} \end{aligned}$$
(18)

satisfies the dynamic programming equation (14). In (18), \(\mathscr {V}_{t}^{(q,q)}\) and \( \mathscr {V}_{t}^{(p,p)}\) are \(d\,\times \,d\) symmetric matrices, and

$$\begin{aligned} \mathscr {V}_{t}^{(q,p)}={\mathscr {V}_{t}^{(p,q)}}^{\top }\,. \end{aligned}$$

The Fokker–Planck equation (13) reduces to a closed system of differential equations of first order for the second order cumulants of the Gaussian statistics

$$\begin{aligned} \begin{aligned}&\dfrac{\text {d}}{\text {d}t}\mathscr {Q}_{t}=\dfrac{\mathscr {C}_{t}+\mathscr {C}_{t}^{\top }}{m} -\dfrac{g\,\tau }{m}\left( \mathscr {U}_{t}\mathscr {Q}_{t} +\mathscr {Q}_{t}\mathscr {U}_{t}\right) +\dfrac{2\,g\,\tau }{m\,\beta }\mathbbm {1}\\&\dfrac{\text {d}}{\text {d}t}\mathscr {C}_{t}=-\dfrac{1}{\tau }\mathscr {C}_{t}-\dfrac{g\,\tau }{m} \mathscr {U}_{t}\mathscr {C}_{t}-\mathscr {U}_{t}\mathscr {Q}_{t}+\dfrac{1}{m}\mathscr {P}_{t}\\&\dfrac{\text {d}}{\text {d}t}\mathscr {P}_{t}=-\dfrac{2}{\tau }\mathscr {P}_{t}-\mathscr {U}_{t} \mathscr {C}_{t}-\mathscr {C}_{t}^{\top }\mathscr {U}_{t}+\dfrac{2\,m}{\beta \,\tau }\mathbbm {1} \end{aligned} \end{aligned}$$
(19)

and to a system of differential equations of first order for the first order cumulants sustained by the solution of second order ones:

$$\begin{aligned} \begin{aligned}&\dfrac{\text {d}}{\text {d}t }{\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{q}}_{t}=\dfrac{{\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{p}}_{t}}{m} -\dfrac{g\,\tau }{m}\left( \varvec{u}_{t}+\mathscr {U}_{t}{\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{q}}_{t}\right) \\&\dfrac{\text {d}}{\text {d t} }{\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{p}}_{t}=-\left( \dfrac{{\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{p}}_{t}}{\tau } + \varvec{u}_{t}+\mathscr {U}_{t}{\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{q}}_{t}\right) \,. \end{aligned} \end{aligned}$$
(20)

The full system of cumulant equations (19)-(20) is complemented by boundary conditions at both ends of the control horizon:

$$ \begin{aligned}&\mathscr {Q}_{0}=\mathscr {Q}_{\iota }\quad \& \quad \mathscr {Q}_{{t}_{\mathfrak {f}}}=\mathscr {Q}_{\mathfrak {f}} \\&\mathscr {C}_{0}=\mathscr {C}_{{t}_{\mathfrak {f}}}=0 \\&\mathscr {P}_{0}=\mathscr {P}_{{t}_{\mathfrak {f}}}=\dfrac{m}{\beta }\,\mathbbm {1}_{d} \end{aligned}$$

and

$$ \begin{aligned}&{\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{q}}_{{t}_{\iota }} = \varvec{q}_{\iota } \quad \& \quad {\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{q}}_{{t}_{\mathfrak {f}}} = \varvec{q}_{\mathfrak {f}} \\&{\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{p}}_{{t}_{\iota }} ={\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{p}}_{{t}_{\mathfrak {f}}} =0\,. \end{aligned}$$

The boundary conditions can be satisfied because the potential couples the cumulant equations to a first-order differential system of equal size for the coefficients of the value function in (18).

4.1 Analysis of Case KL

For case KL, we get

$$\begin{aligned} \dfrac{\text {d}}{\text {d} t}\mathscr {V}_{t}^{(q,q)}&=\big (\mathscr {U}_{t}\mathscr {V}_{t}^{(p,q)}+\mathscr {V}_{t}^{(q,p)} \mathscr {U}_{t}\big )+\dfrac{g\,\tau }{m}\left( \mathscr {U}_{t}\mathscr {V}_{t}^{(q,q)}+\mathscr {V}_{t}^{(q,q)}\mathscr {U}_{t}\right) \nonumber \\ &\qquad -\dfrac{\beta \,\tau \,(1+g)}{2\,m}\left( \mathscr {U}_{t}-\mathscr {U}_{\star }\right) \left( \mathscr {U}_{t}-\mathscr {U}_{\star }\right) \end{aligned}$$
(21a)
$$\begin{aligned} \dfrac{\text {d}}{\text {d} t}\mathscr {V}_{t}^{(q,p)}&=\dfrac{\mathscr {V}_{t}^{(q,p)}}{\tau } +\mathscr {U}_{t}\mathscr {V}_{t}^{(p,p)}+\dfrac{g\,\tau }{m}\mathscr {U}_{t}\mathscr {V}_{t}^{(q,p)}-\dfrac{\mathscr {V}_{t}^{(q,q)}}{m} \end{aligned}$$
(21b)
$$\begin{aligned} \dfrac{\text {d}}{\text {d} t}\mathscr {V}_{t}^{(p,p)}&=\dfrac{2}{\tau }\mathscr {V}_{t}^{(p,p)} -\dfrac{\mathscr {V}_{t}^{(p,q)}+\mathscr {V}_{t}^{(p,q)\top }}{m} \end{aligned}$$
(21c)

and

$$\begin{aligned} \dfrac{\text {d}}{\text {d} t}\varvec{v}_{t}^{(q)}&=\mathscr {V}_{t}^{(p,q)\top }\varvec{u}_{t} +\mathscr {U}_{t}\varvec{v}_{t}^{(p)} +\dfrac{g\,\tau }{m}\left( \mathscr {U}_{t}\varvec{v}_{t}^{(q)} +\mathscr {V}_{t}^{(q,q)}\varvec{u}\right) \nonumber \\ &\qquad -\dfrac{\beta \,\tau \,(1+g)}{2\,m}\left( \mathscr {U}_{t}-\mathscr {U}_{\star }\right) \left( \varvec{u}_{t}-\varvec{u}_{\star }\right) \end{aligned}$$
(22a)
$$\begin{aligned} \dfrac{\text {d}}{\text {d} t}\varvec{v}_{t}^{(p)}&=\dfrac{\varvec{v}_{t}^{(p)}}{\,\tau \,} -\dfrac{\varvec{v}_{t}^{(q)}}{m}+\mathscr {V}_{t}^{(pp)}\varvec{u}_{t}+\dfrac{g\,\tau }{m}\mathscr {V}_{t}^{(p q)}\varvec{u}\,. \end{aligned}$$
(22b)

Finally, we find

$$\begin{aligned} \dfrac{\text {d}}{\text {d} t}\mathcalligra{v}_{t}&=\varvec{v}_{t}^{(p)}\cdot \varvec{u}_{t} +\dfrac{g\,\tau }{m}\varvec{v}_{t}^{(q)}\cdot \varvec{u}_{t}-{\text {Tr}}\left( \dfrac{m}{\beta \,\tau }\mathscr {V}^{(p,p)}+\dfrac{g\,\tau }{m\,\beta }\mathscr {V}^{(q,q)}\right) \nonumber \\&\qquad -\dfrac{(1+g)\,\beta \,\tau }{4\,m}\left\| \varvec{u}_{t}-\varvec{u}_{\star }\right\| ^{2}\,. \end{aligned}$$
(23)

The structure of (21)–(22) is analogous to that of the cumulant equations. The coefficients of second degree monomials in (18) satisfy a closed system whose solution sustains the equation for the coefficients of first order monomial.

We now turn to the solution of (15). A straightforward exercize in Gaussian integration yields the explicit expression of the “osmotic force” [88] or “score function” [11] of the position marginal

$$\begin{aligned} (\varvec{\partial }\ln \widetilde{{f}}_{t})(\varvec{q})=- \mathscr {Q}_{t}^{-1}(\varvec{q}-{\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{q}}_{t}) \end{aligned}$$
(24)

as well as an explicit expression for the conditional expectation

$$\begin{aligned} {\text {E}}_{\mathcal {P}}(\varvec{\mathcalligra{p}}_{t}\mid \varvec{\mathcalligra{q}}_{t}=\varvec{q}) ={\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{p}}_{t}+\mathscr {C}_{t}\mathscr {Q}_{t}^{-1}(\varvec{q} -{\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{q}}_{t})\,. \end{aligned}$$
(25)

Upon inserting (24), (25) into (15) and matching the coefficients of monomials of same degree in \(\varvec{q}\), we arrive at the equations

$$\begin{aligned} \mathscr {Q}_{t}^{-1}\mathscr {U}_{t}+\mathscr {U}_{t}\mathscr {Q}_{t}^{-1}&=\mathscr {Q}_{t}^{-1} \mathscr {M}_{t}+\mathscr {M}_{t}^{\top }\mathscr {Q}_{t}^{-1} \end{aligned}$$
(26a)
$$\begin{aligned} {\text {Tr}}\left( \mathscr {M}_{t}-\mathscr {U}_{t}\right)&=0 \end{aligned}$$
(26b)

with

$$\begin{aligned} \mathscr {M}_{t}&=\mathscr {U}_{\star }+\dfrac{2\,m}{(1+g)\,\tau \,\beta }\left( \mathscr {V}_{t}^{(p,p)} \mathscr {C}_{t}\mathscr {Q}_{t}^{-1}+\mathscr {V}_{t}^{(p,q)}\right) +\dfrac{2\,g\,\tau }{(1+g)\,\beta }\left( \mathscr {V}_{t}^{(q,p)}\mathscr {C}_{t}\mathscr {Q}_{t}^{-1}+\mathscr {V}_{t}^{(q,q)}\right) \end{aligned}$$

and the dependent conditions

$$\begin{aligned} \varvec{u}_{t}&=\varvec{u}_{\star }+(\mathscr {U}_{\star }-\mathscr {U}_{t}){\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{q}}_{t} +\dfrac{2\,m}{(1+g)\,\beta \,\tau } \left( \varvec{v}_{t}^{(p)}+\mathscr {V}_{t}^{(p,q)}{\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{q}}_{t} +\mathscr {V}_{t}^{(p,p)}{\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{p}}_{t}\right) \nonumber \\&\qquad +\dfrac{2\,g}{(1+g)\,\beta } \left( \varvec{v}_{t}^{(q)}+\mathscr {V}_{t}^{(q,q)}{\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{q}}_{t} +\mathscr {V}_{t}^{(q,p)}{\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{p}}_{t}\right) \,. \end{aligned}$$
(27)

Clearly, the conditions (27) are always satisfied if (26) is solvable. In fact we recognize that equation (26a) is in fact a Lyapunov equation. Uniqueness, symmetry and positivity of the solution are very well understood [62]. In particular, for every \(t\in [{t}_{\iota },{t}_{\mathfrak {f}}]\) we can write the solution of (26a) as

$$\begin{aligned} \mathscr {U}_{t}=\int _{0}^{\infty }\text {d}s\, e^{-\mathscr {Q}_{t}^{-1}\,s}\left( \mathscr {Q}_{t}^{-1} \mathscr {M}_{t}+\mathscr {M}_{t}^{\top }\mathscr {Q}_{t}^{-1}\right) e^{-\mathscr {Q}_{t}^{-1}\,s}\,. \end{aligned}$$
(28)

The solution is well defined because by definition \( \mathscr {Q}_{t}\) is a positive matrix. Finally, taking the trace of both sides of (28) readily recovers (26b) thus completing the proof that the Gaussian case is solvable.

4.2 Analysis of Case EP

The equations that change are (21a)

$$\begin{aligned} \dfrac{\text {d}}{\text {d} t}\mathscr {V}_{t}^{(q,q)}&=\Big (\mathscr {U}_{t}\mathscr {V}_{t}^{(p,q)} +\mathscr {V}_{t}^{(q,p)}\mathscr {U}_{t}\Big )+\dfrac{g\,\tau }{m}\left( \mathscr {U}_{t}\mathscr {V}_{t}^{(q,q)} +\mathscr {V}_{t}^{(q,q)}\mathscr {U}_{t}\right) -\dfrac{2\,\beta \,\tau \,g}{m}\mathscr {U}_{t}\mathscr {U}_{t}\,, \end{aligned}$$

Eq. (22a) which is replaced by

$$\begin{aligned} \dfrac{\text {d}}{\text {d} t}\varvec{v}_{t}^{(q)}&=\mathscr {V}_{t}^{(p,q)\top }\varvec{u}_{t}+\mathscr {U}_{t}\varvec{v}_{t}^{(p)} +\dfrac{g\,\tau }{m}\left( \mathscr {U}_{t}\varvec{v}_{t}^{(q)}+\mathscr {V}_{t}^{(q,q)}\varvec{u}\right) -\dfrac{2\,g\,\tau \,\beta }{m}\mathscr {U}_{t}\varvec{u}_{t} \end{aligned}$$

and, finally, Eq. (23) which for the mean entropy production reads

$$\begin{aligned} \dfrac{\text {d}}{\text {d} t}\mathcalligra{v}_{t}&=\dfrac{d}{\tau }+\varvec{v}_{t}^{(p)}\cdot \varvec{u}_{t} +\dfrac{g\,\tau }{m}\varvec{v}_{t}^{(q)}\cdot \varvec{u}_{t} \\&\qquad -{\text {Tr}}\left( \dfrac{m}{\beta \,\tau }\mathscr {V}^{(p,p)}+\dfrac{g\,\tau }{m\,\beta }\mathscr {V}^{(q,q)}\right) -\dfrac{g\,\beta \,\tau }{m}\left( \left\| \varvec{u}_{t}\right\| ^{2}-\dfrac{1}{\beta }{\text {Tr}}\mathscr {U}_{t}\right) \,. \end{aligned}$$

A qualitative difference with case KL occurs for vanishing g when the mean entropy production does not explicitly depend upon the control potential. This is most evident when inspecting (15). We get

$$\begin{aligned} g\,\mathscr {Q}_{t}^{-1}\mathscr {U}_{t}+ g\,\mathscr {U}_{t}\mathscr {Q}_{t}^{-1}&=\mathscr {Q}_{t}^{-1}\tilde{\mathscr {M}}_{t}+\tilde{\mathscr {M}}_{t}^{\top }\mathscr {Q}_{t}^{-1} \end{aligned}$$
(29a)
$$\begin{aligned} {\text {Tr}}\left( \tilde{\mathscr {M}}_{t}-g\mathscr {U}_{t}\right)&=0 \end{aligned}$$
(29b)

where now

$$\begin{aligned} \tilde{\mathscr {M}}_{t}&=\dfrac{g}{2}\mathscr {Q}_{t}^{-1}+\dfrac{m}{2\,\tau \,\beta } \left( \mathscr {V}_{t}^{(p,p)}\mathscr {C}_{t}\mathscr {Q}_{t}^{-1}+\mathscr {V}_{t}^{(p,q)}\right) +\dfrac{g\,\tau }{2\,\beta }\left( \mathscr {V}_{t}^{(q.p)}\mathscr {C}_{t}\mathscr {Q}_{t}^{-1}+\mathscr {V}_{t}^{(q,q)}\right) \end{aligned}$$

and

$$\begin{aligned} g\,\varvec{u}_{t}&=-g\,\mathscr {U}_{t}\mathscr {Q}_{t}^{-1}{\text {E}}_{\mathcal {P}} \varvec{\mathcalligra{q}}_{t}+\dfrac{m}{2\,\beta \,\tau } \left( \varvec{v}_{t}^{(p)}+\mathscr {V}_{t}^{(p,q)}{\text {E}}_{\mathcal {P}} \varvec{\mathcalligra{q}}_{t}+\mathscr {V}_{t}^{(p,p)}{\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{p}}_{t}\right) \nonumber \\&\qquad +\dfrac{g}{2\,\beta } \left( \varvec{v}_{t}^{(q)}+\mathscr {V}_{t}^{(q,q)}{\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{q}}_{t}+\mathscr {V}_{t}^{(q,p)}{\text {E}}_{\mathcal {P}}\varvec{\mathcalligra{p}}_{t}\right) \,. \end{aligned}$$
(30)

Whereas for \(g\,>\,0\) the optimal potential is uniquely determined by the solution of the Lyapunov equation (29a), the limit \(g\downarrow 0\) is singular. The Lyapunov equation becomes a constraint imposed on the coefficients of the value function. The upshot is that for vanishing g it is not possible to satisfy boundary conditions imposed on all phase space cumulants. In other words, the problem is not generically solvable for a generic assignment of Gaussian probability densities (2), (3). The problem admits, however, a solution if boundary data are just the position marginals. A detailed slow manifold analysis performed in the one-dimensional case in the supplementary material of [34] shows that the equation for g equal zero coincides with the slow manifold equations (see e.g. [101]) of the limit \(g \downarrow 0\) optimal control equations. This gives a precise mathematical meaning to the idea of \(\delta \)-Dirac optimal control upheld in [21]. It also shows that even if the optimal control does not exist for g equal zero, the strictly positive lower bound on the mean entropy production is always in agreement with (9).

5 General Case in One Dimension

A distinctive trait of the underdamped extremal equations (13), (14) and (15) is the integral term in Eq. (15), which introduces a non-local condition in the momentum variable. This is in stark contrast with the overdamped counterpart of (15). Indeed the latter is exactly integrable and thus reduces the extremal conditions to a pair of local hydrodynamics equations [5, 28]. In this section we construct a systematic multiscale expansion of (13) - (15) around the overdamped limit. By proceeding in this way we manage to reabsorb the non-locality in phase space into effective parameters of local equations—the cell problem—in configuration space. We perform our analysis in two-dimensional phase space. Extension to higher dimensional phase space is possible at the price of dealing with far more cumbersome algebra.

The approach we follow is inspired by [65, 66]. The first step is to project the momentum dependence in Eqs. (13)–(15) onto the basis of Hermite polynomials orthonormal with respect to the Maxwell thermal equilibrium distribution. We obtain an kinetic-theory-type hierarchy of coupled equations that do not depend on the momentum. Despite the additional complication of dealing with an infinite number of equations, this description turns out to be the ideal starting point for a multiscale expansion approach (in time).

5.1 Non-dimensional Variables

In order to neaten our notation, it is expedient to preliminary introduce non-dimensional variables:

$$\begin{aligned} \begin{aligned} {\text {t}}=\dfrac{\,t\,}{\tau },\quad {\text {q}}=\dfrac{\,q\,}{\ell },\quad {\text {p}}=\sqrt{\dfrac{ \beta }{ m}}\,p \end{aligned} \end{aligned}$$

where \(\ell \) is the typical length-scale set by the mechanical potentials in the boundary conditions.

Next, we introduce the non-dimensional counterparts of the phase space density, value function and mechanical control potential:

$$\begin{aligned} {\text {f}}_{{\text {t}}}({\text {q}},{\text {p}})&=\ell \,\sqrt{\dfrac{m}{\beta } }\, {f}_{t}(q,p) \\ {\text {V}}_{{\text {t}}}({\text {q}},{\text {p}})&=V_{t}(q,p) \\ {\text {U}}_{{\text {t}}}({\text {q}})&=\beta \,U_{t}(q)\,. \end{aligned}$$

In non-dimensional variables, the generator of the phase space process  (12) becomes

$$\begin{aligned} \begin{aligned} {\text {L}}_{\varvec{{\text {x}}}}&=-({\text {p}}-\partial _{{\text {p}}})\,\partial _{{\text {p}}}+\varepsilon \, {\text {p}}\,\partial _{{\text {q}}}-\varepsilon \,(\partial _{{\text {q}}}{\text {U}}_{{\text {t}}})\,\partial _{{\text {p}}}\\&\qquad -\varepsilon ^2 g \left( \big (\partial _{{\text {q}}}{\text {U}}_{{\text {t}}}\big )-\partial _{{\text {q}}}\right) \partial _{{\text {q}}} \\&=\tau \,\mathfrak {L}_{\varvec{x}} \end{aligned} \end{aligned}$$
(31)

where now the order parameter of the overdamped expansion

$$\begin{aligned} \varepsilon =\sqrt{\dfrac{\tau ^2}{\beta \, \ell ^2 \, m}}\, \end{aligned}$$
(32)

explicitly appears. Equipped with these definitions, we rewrite the Fokker–Planck

$$\begin{aligned} \left( \partial _{{\text {t}}} - {\text {L}}_{\varvec{{\text {x}}}}^{\dagger }\right) {\text {f}}_{{\text {t}}}=0\,, \end{aligned}$$
(33a)

the dynamic programming

$$\begin{aligned} \begin{aligned}&\left( \partial _{{\text {t}}} + {\text {L}}_{\varvec{{\text {x}}}}\right) {\text {V}}_{{\text {t}}}={\left\{ \begin{array}{ll} -\varepsilon ^2\,(1+g)\dfrac{\left( \partial _{{\text {q}}}{\text {U}}_{{\text {t}}}-\partial _{{\text {q}}}{\text {U}}_{\star }\right) ^{2}}{4} \quad & {\textbf {[KL]}} \\ 1-{\text {p}}^{2}\,\varepsilon ^2\,g \,\big ((\partial _{{\text {q}}} {\text {U}}_{{\text {t}}})^2 -\partial _{{\text {q}}} ^{2} {\text {U}}_{{\text {t}}}\big )\quad & {\textbf {[EP]}} \,,\\ \end{array}\right. } \end{aligned} \end{aligned}$$
(33b)

and the stationary condition equations

$$\begin{aligned} \begin{aligned}&\int _{\mathbb {R}} \text {d}{\text {p}}\, \dfrac{{\text {f}}_{{\text {t}}}({\text {q}},{\text {p}})}{{\text {f}}_{{\text {t}}}^{(0)}({\text {q}})}\left( \partial _{{\text {p}}}+\varepsilon \, g \,\partial _{{\text {q}}}\right) {\text {V}}_{{\text {t}}}({\text {q}},{\text {p}}) ={\left\{ \begin{array}{ll} \dfrac{\varepsilon \,(1+g) }{2}\,\big (\partial _{{\text {q}}} {\text {U}}_{{\text {t}}}({\text {q}})-\partial _{{\text {q}}}{\text {U}}_{\star }({\text {q}})\big ) \quad & {\textbf {[KL]}} \\ \varepsilon \, g \,\partial _{{\text {q}}} \big (2\,{\text {U}}_{{\text {t}}}({\text {q}})+\ln {\text {f}}_{{\text {t}}}^{(0)}({\text {q}})\big )\quad & {\textbf {[EP]}} \,, \end{array}\right. } \end{aligned} \end{aligned}$$
(33c)

where

$$ {\text {f}}_{{\text {t}}}^{(0)}({\text {q}})=\int _{\mathbb {R}}\text {d}{\text {p}}\,{\text {f}}_{{\text {t}}}({\text {q}},{\text {p}})\, $$

denotes the position marginal of the probability density function.

5.2 Expansion in Hermite Polynomials

Calling \(H_n\) the n-th Hermite polynomial (see Appendix D for details), we expand the probability density and the value function as

$$\begin{aligned} {\text {f}}_{{\text {t}}}({\text {q}},{\text {p}}) =\dfrac{e^{-\frac{{\text {p}}^{2}}{2}}}{\sqrt{ 2\,\pi }}\sum _{n=0}^{\infty }{\text {f}}_{{\text {t}}}^{(n)}({\text {q}}) \,H_{n}({\text {p}}) \end{aligned}$$
(34)

and

$$\begin{aligned} {\text {V}}_{{\text {t}}}({\text {q}},{\text {p}})=\sum _{n=0}^{\infty } v_{{\text {t}}}^{(n)}({\text {q}})\, H_n({\text {p}})\, . \end{aligned}$$
(35)

The expansion coefficients \({\text {f}}_{{\text {t}}}^{(n)}\) and \({\text {V}}_{{\text {t}}}^{(n)}\) are scalar functions of the position and time. At equilibrium, the expansion for the probability density consists of the term \(n=0\) only. The remaining contributions are non-zero only in out-of-equilibrium conditions. In particular, all \({\text {f}}_{{\text {t}}}^{(n)}\) and \({\text {V}}_{{\text {t}}}^{(n)}\) for \(n\,>\,0\) vanish at the beginning and at the end of the control horizon because of the boundary conditions (2) and (3). The expansion in Hermite polynomials turns the extremal equations (33) into an infinite hierarchy of equations whose n-th elements are:

$$\begin{aligned} \left( \partial _{t}+n\right)&\,{\text {f}}_{{\text {t}}}^{(n)}+\varepsilon \,\big (\partial _{{\text {q}}}-\left( \partial _{{\text {q}}} {\text {U}}_{{\text {t}}}\right) \big )\,{\text {f}}_{{\text {t}}}^{(n-1)} +\varepsilon \,(n+1)\,\partial _{{\text {q}}}{\text {f}}_{{\text {t}}}^{(n+1)}\nonumber \\&=\varepsilon ^2\, g \,\left( \partial _{{\text {q}}} \big (\left( \partial _{{\text {q}}} {\text {U}}_{{\text {t}}}\right) {\text {f}}_{{\text {t}}}^{(n)}\big )+\partial _{{\text {q}}}^{2} {\text {f}}_{{\text {t}}}^{(n)}\right) \end{aligned}$$
(36a)
$$\begin{aligned} \left( \partial _{t} - n \right)&v_{{\text {t}}}^{(n)} +\varepsilon (n+1)\big ( \partial _{{\text {q}}} - (\partial _{{\text {q}}} {\text {U}}_{{\text {t}}})\big )v_{{\text {t}}}^{(n+1)}+\varepsilon \partial _{{\text {q}}} v_{{\text {t}}}^{(n-1)}\nonumber \\&={\left\{ \begin{array}{ll} -\delta _{n,0}\, \dfrac{\varepsilon ^{2}\,(1+g)}{4}\,{\left( \partial _{{\text {q}}}{\text {U}}_{{\text {t}}}-\partial _{{\text {q}}}{\text {U}}_{\star }\right) ^{2}}\quad & {\textbf {[KL]}} \\ -\delta _{n,0}\, g \,\varepsilon ^2 \,\left( (\partial _{{\text {q}}} {\text {U}}_{{\text {t}}})^2-\partial _{{\text {q}}}^2{\text {U}}_{{\text {t}}}\right) -\delta _{n,2}\quad & {\textbf {[EP]}} \end{array}\right. } \end{aligned}$$
(36b)
$$\begin{aligned} \sum _{n=0}^{\infty }n!&\left( (n+1)\,{\text {f}}_{{\text {t}}}^{(n)}\, v_{{\text {t}}}^{(n+1)}+\varepsilon \, g\, \partial _{{\text {q}}} v_{{\text {t}}}^{(n)}\right) ={\left\{ \begin{array}{ll} \dfrac{\varepsilon \,(1+g)}{2}\, {\text {f}}_{{\text {t}}}^{(0)} \left( {\partial _{{\text {q}}}{\text {U}}_{{\text {t}}}-\partial _{{\text {q}}}{\text {U}}_{\star }}\right) \quad & {\textbf {[KL]}} \\ \varepsilon \,g \, {\text {f}}_{{\text {t}}}^{(0)} \,\partial _{{\text {q}}} \big (2\,{\text {U}}_{{\text {t}}}+\ln {\text {f}}_{{\text {t}}}^{(0)}\big )\,. \quad & {\textbf {[EP]}} \end{array}\right. } \end{aligned}$$
(36c)

More detail on the derivation of the above equations is given in Appendix D. The hierarchy is complemented by equilibrium boundary conditions on the probability density, that, in the non-dimensional variables, read:

$$\begin{aligned} {\text {f}}_{{\text {t}}_{\iota }}^{(0)}({\text {q}})= & \dfrac{\exp (-{\text {U}}_{\iota }({\text {q}}))}{\int _{\mathbb {R}}\text {d}y \,\exp (-{\text {U}}_{\iota }(y)) }\end{aligned}$$
(37a)
$$\begin{aligned} {\text {f}}_{{\text {t}}_{\mathfrak {f}}}^{(0)}({\text {q}})= & \dfrac{\exp (-{\text {U}}_\mathfrak {f}({\text {q}}))}{\int _{\mathbb {R}}\text {d}y \,\exp (-{\text {U}}_\mathfrak {f}(y)) }\end{aligned}$$
(37b)
$$\begin{aligned} {\text {f}}_{{\text {t}}_{\iota }}^{(n)}({\text {q}})= & {\text {f}}_{{\text {t}}_{\mathfrak {f}}}^{(n)}({\text {q}})=0\quad \quad n\ge 1. \end{aligned}$$
(37c)

6 Multiscale Perturbation Theory

The hierachy (36) is equivalent to the original extremal equations (33), and holds for any value of \(\varepsilon \). We are interested in cases where \(\varepsilon \ll 1\) in order to solve (36) with a perturbative strategy. The limit of vanishing \(\varepsilon \) is, however, singular and cannot be handled by regular perturbation theory. We therefore resort to multiscale perturbation theory. In doing so, we need to take into account an essential difference with respect to the multiscale treatment of the overdamped limit of the underdamped dynamics [65, 66]. The difference is that the mechanical potential is not assigned but must be determined by solving the stationary conditions (36c). In addition, we are dealing with a time-boundary value problem rather than with an initial data problem. To overcome these difficulties, we formulate the multiscale expansion drawing from the Poincaré–Lindstedt technique [63] and renormalization group ideas that in recent years have been successfully applied to the resummation of perturbative series arising from Hamiltonian and dissipative dynamical systems [67]. Our strategy is based on the following considerations.

  • We suppose that the time variation of all functions in the hierarchy (36) occurs through effective time variables

    $$\begin{aligned}&{\text {t}}_{j}=\varepsilon ^{j} \,{\text {t}}, & j \,\ge \, 0\,. \end{aligned}$$
    (38)

    occasioned by the overdamped order parameter \(\varepsilon \). As a consequence, the partial derivative with respect to \({\text {t}}\) breaks down into a differential operator

    $$\begin{aligned} \partial _{{\text {t}}}=\partial _{{\text {t}}_{0}}+\varepsilon \,\partial _{{\text {t}}_{1}} +\varepsilon ^{2}\,\partial _{{\text {t}}_{2}}+\dots \end{aligned}$$
    (39)

    thus introducing a new dynamical variable at each order of the overdamped expansion.

  • We assume that the mechanical potential has a finite limit when \(\varepsilon \) tends to zero. This assumption [33, 34] is central in order to recover the overdamped dynamics [5, 28]. The a priori justification of the assumption is that momentum marginals of the boundary conditions already describe a Maxwell thermal equilibrium. The need for a controlled dynamics only arises in consequence of the boundary conditions imposed on the position process. In the generator (31), the mechanical potential is coupled to the dynamics by the overdamped expansion order parameter \(\varepsilon \). This fact leads to the inference that the control potential should admit a regular expansion in \(\varepsilon \) as a function of the position variable, varying in time on scales set by \(\varepsilon \).

  • The Poincaré–Lindstedt method is usually formulated for initial value problems. In such a context, the dynamics of the slow times \({\text {t}}_{j}\) with \(j\,>\,0\) is fixed by canceling secular terms (equivalently: resonances), i.e. polynomial terms in the time variable which as times increases would lead to a breakdown of perturbation theory. Such a secular term subtraction scheme is equivalent to a renormalization group type partial resummation of the perturbative expansion [67]. We need to adapt the subtraction scheme to a boundary problem. At \(\varepsilon \) equal zero the Fokker–Planck hierarchy (36a) is decoupled from the dynamic programming one (36b). As a consequence, the boundary conditions (37) cannot be satisfied at zero order of the regular perturbative expansion. We therefore use the boundary conditions to determine the slow time dependence of the \({\text {f}}^{(n)}\).

  • The value function expansion coefficients \({\text {f}}^{(n)} \) are not subject to anything other than satisfying the dynamics (36a). The logical basis for the resonance subtraction scheme is the duality relation (17). We reason that a cost can only be generated on the same time scales over which the mechanical control potential varies. We thus require that the dependence of \({\text {f}}^{(0)} \) must be constant with respect to the fastest time \( {\text {t}}_{0}\). We also observe that, although physically motivated, a non-uniqueness is intrinsic in any secular term cancellation or finite renormalization scheme exactly because these techniques involve a partial and not a complete resummation of the perturbative expansion [64]. Consistent alternative schemes may differ by higher order terms in the regular perturbative expansion.

  • The introduction of the slow time variables (38) is justified under a sufficiently wide scale separation. In principle, the perturbative expansion only holds for \(\varepsilon \ll 1\) and \({\text {t}}_{\mathfrak {f}}\gg 1\) (i.e. \({t}_{\mathfrak {f}}\gg \tau \)). Yet, we hope that extrapolating the results for finite control horizons will give sufficiently accurate results if the resummation scheme correctly captures the “turnpike behavior” of the exact solution of the optimal control. Turnpike behavior means the tendency of optimal controls to approximate the solution of the adiabatic limit, corresponding to a vanishing cost, as much as possible. We refer to [68] for further discussion and references on this point.

In summary, our aim is to look for a solution of (36) in the form of multiscale power series

$$\begin{aligned} {\text {f}}_{{\text {t}}}^{(n)}({\text {q}})&=\sum _{i=0}^{\infty }\varepsilon ^{i}\,{\text {f}}_{{{\text {t}}}_{0}}^{(n:i)}({\text {q}})\end{aligned}$$
(40a)
$$\begin{aligned} v_{{\text {t}}}^{(n)}({\text {q}})&=\sum _{i=0}^{\infty }\varepsilon ^{i}\,v_{{{\text {t}}}_{0}}^{(n:i)}({\text {q}})\,\end{aligned}$$
(40b)
$$\begin{aligned} {\text {U}}_{{\text {t}}}({\text {q}})&=\sum _{i=0}^{\infty }\varepsilon ^{i}\,{\text {U}}_{{{\text {t}}}_{0}}^{(i)}({\text {q}})\,, \end{aligned}$$
(40c)

where each addend of the above series depends, a priori, on all time scales

$$\begin{aligned} {{\text {t}}}_{{j}}=({\text {t}}_{{j}},\,{\text {t}}_{{j}+1},\,{\text {t}}_{j+2},\,...)\,. \end{aligned}$$
(41)

6.1 Results

We report the main results of the overdamped multiscale expansion, while deferring their derivation to Sect. 6.2. Without loss of generality, we set

$${t}_{\iota }=0$$

to neaten the notation. Within second order in \(\varepsilon \) in the multiscale expansion, the solution of the Fokker–Planck equation takes the form

$$\begin{aligned} \begin{aligned}&{\text {f}}_{{\text {t}}}({\text {q}},{\text {p}})=\left( {\text {f}}_{{\text {t}}_{0},{\text {t}}_{2}}^{(0:0)}({\text {q}})+\varepsilon \, {\text {p}}\, {\text {f}}_{{\text {t}}_{0},{\text {t}}_{2}}^{(1:1)}({\text {q}})\right) \dfrac{e^{-\frac{{\text {p}}^{2}}{2}}}{\sqrt{2\,\pi }}\\&+\varepsilon ^2\left( {\text {f}}_{{\text {t}}_{0},{\text {t}}_{2}}^{(0:2)}({\text {q}})+{\text {p}}\,{\text {f}}_{{\text {t}}_{0},{\text {t}}_{2}}^{(1:2)}({\text {q}}) +({\text {p}}^{2}-1)\,{\text {f}}_{{\text {t}}_{0},{\text {t}}_{2}}^{(2:2)}({\text {q}})\right) \dfrac{e^{-\frac{{\text {p}}^{2}}{2}}}{\sqrt{2\,\pi }} +\dfrac{e^{-\frac{{\text {p}}^{2}}{2}}}{\sqrt{2\,\pi }}\,O(\varepsilon ^{3})\,. \end{aligned} \end{aligned}$$
(42)

We emphasize that \({\text {t}}_{0}={\text {t}}\) and \({\text {t}}_{2}=\varepsilon ^2 \,{\text {t}}\) and that Eq. (42) is independent of \({\text {t}}_{1}=\varepsilon \,{\text {t}}\). We also neglect slower time scales \({\text {t}}_{j}\), \({j}\,>\,2\), as they only provide higher order corrections. Hence, for all the results presented in this Subsection, we drop the explicit dependence on \({\text {t}}_{1}\) and \({{\text {t}}}_{3}\).

6.1.1 Cell Problem Equations

As customary [72], we refer to the secular term subtraction conditions emerging at order \(O(\varepsilon ^{2})\) in regular perturbation theory as the cell problem. Secular term subtraction fixes the functional dependence upon the slow time \({\text {t}}_{2}\). As a consequence, we find it expedient to denote the unknown quantities of the cell problem as

$$\begin{aligned} \rho _{{\text {t}}_{2}}({\text {q}})={\text {f}}_{{\text {t}}_{0},{\text {t}}_{2}}^{(0:0)}({\text {q}}) \end{aligned}$$
(43)

and as an auxiliary field \(\sigma _{{\text {t}}_{2}}({\text {q}})\) related to \( v_{{\text {t}}_{\mathfrak {f}},{\text {t}}_{2}}^{(0:0)}({\text {q}})\) and \({\text {f}}_{{\text {t}}_{0},{\text {t}}_{2}}^{(0:0)}({\text {q}})\) by equation (101) in Sect. 6.2 below. The formulation of the cell problem in terms of the pair \(\rho _{{\text {t}}_{2}}\), \(\sigma _{{\text {t}}_{2}}\) exactly recovers the optimal control equations governing the overdamped limit in KL and EP:

$$\begin{aligned} \partial _{{\text {t}}_{2}}\rho _{{\text {t}}_{2}}&=\partial _{{\text {q}}}\big (\rho _{{\text {t}}_{2}}\partial _{{\text {q}}} \sigma _{{\text {t}}_{2}}+\alpha \, \partial _{{\text {q}}}\rho _{{\text {t}}_{2}}\big )\end{aligned}$$
(44a)
$$\begin{aligned} \partial _{{\text {t}}_{2}}\sigma _{{\text {t}}_{2}}&=\frac{1}{2}(\partial _{{\text {q}}} \sigma _{{\text {t}}_{2}})^2-\alpha \,\partial _{{\text {q}}}^2 \sigma _{{\text {t}}_{2}} +\alpha ^2\,\left( \partial _{{\text {q}}}^{2} {\text {U}}_{\star } -\dfrac{\big (\partial _{{\text {q}}} {\text {U}}_{\star }\big )^2}{2}\right) -\alpha ^{2} \,\chi _{{\text {t}}_{2}} {\text {q}}\end{aligned}$$
(44b)
$$\begin{aligned} \chi _{{\text {t}}_{2}}&=\frac{B}{A}\,\int _{\mathbb {R}}\text {d}{\text {q}}\,\rho _{{\text {t}}_{2}}({\text {q}})\,\partial _{{\text {q}}} \left( \partial _{{\text {q}}}^2 {\text {U}}_\star ({\text {q}}) - \dfrac{\big (\partial _{{\text {q}}}{\text {U}}_{\star }({\text {q}})\big )^2}{2}\right) \,. \end{aligned}$$
(44c)

We fully specify the cell problem by complementing (44) with the exact boundary conditions imposed by the position marginals of (2), (3) and written in non-dimensional variables as in (37)

$$\begin{aligned} \begin{aligned} \rho _{{\text {t}}_{2}}({\text {q}})\Big |_{{\text {t}}_{2}=0}&=\frac{e^{-{\text {U}}_{\iota }({\text {q}})}}{\int _{\mathbb {R}}\text {d}y\, e^{-{\text {U}}_{\iota }(y)}}\\ \rho _{{\text {t}}_{2}}({\text {q}})\Big |_{{\text {t}}_{2}=\varepsilon ^2 {\text {t}}_{\mathfrak {f}}}&=\frac{e^{-{\text {U}}_{\mathfrak {f}}({\text {q}})}}{\int _{\mathbb {R}}\text {d}y\, e^{-{\text {U}}_{\mathfrak {f}}(y)}}\,. \end{aligned} \end{aligned}$$
(45)

In (44) we imply

$$\begin{aligned} {\text {U}}_{\star }({\text {q}})=0 \end{aligned}$$

for EP. Depending upon the problem under consideration, the constant \(\alpha \) takes the values

$$\begin{aligned} \alpha ={\left\{ \begin{array}{ll} \sqrt{(1+g)\,A}\quad & {\textbf {[KL]}} \,\\[0.3cm] 0\quad & {\textbf {[EP]}} \,, \end{array}\right. } \end{aligned}$$
(46)

while the constants A and B are given by (see Eq. (98) below)

$$\begin{aligned} \begin{aligned}&\frac{A}{1+g}=1-\frac{(\omega ^{2}-4)\tanh \frac{\omega \,{\text {t}}_{\mathfrak {f}}}{2} \tanh {\text {t}}_{\mathfrak {f}}}{\omega \,{\text {t}}_{\mathfrak {f}}\left( \omega \,\tanh \frac{\omega \,{\text {t}}_{\mathfrak {f}}}{2}-2 \tanh {\text {t}}_{\mathfrak {f}}\right) }\\&\frac{B}{1+g}=-\,\frac{\tanh \frac{\omega \,{\text {t}}_{\mathfrak {f}}}{2}}{{\text {t}}_{\mathfrak {f}}} \frac{\omega \,\tanh {\text {t}}_{\mathfrak {f}}-2\tanh \frac{\omega \,{\text {t}}_{\mathfrak {f}}}{2}}{ \omega \,\tanh \frac{\omega \,{\text {t}}_{\mathfrak {f}}}{2}-2 \tanh {\text {t}}_{\mathfrak {f}}} \end{aligned} \end{aligned}$$
(47)

with

$$\begin{aligned} \omega ={\left\{ \begin{array}{ll} 1 \quad & {\textbf {[KL]}} \\ \sqrt{\dfrac{1+g}{g}}\,.\quad & {\textbf {[EP]}} \end{array}\right. } \end{aligned}$$
(48)

A and B always admit a finite limit as g tends to zero: by (48) the limit of vanishing g entails \(\omega \) tending to infinity in case EP. Furthermore, they depend upon the size of the control horizon \({\text {t}}_{\mathfrak {f}}\) so that

$$\begin{aligned} \lim _{{\text {t}}_{\mathfrak {f}}\nearrow \infty }\left( A-1-g\right) =\lim _{{\text {t}}_{\mathfrak {f}}\nearrow \infty }B=0\,. \end{aligned}$$
(49)

When \(U_{\star }=0\), the cell problem reduces to a coupled system of a Fokker–Planck and Burgers’ equation

$$\begin{aligned} \partial _{{\text {t}}_{2}}\rho _{{\text {t}}_{2}}&=\partial _{{\text {q}}}\big (\rho _{{\text {t}}_{2}}\partial _{{\text {q}}} \sigma _{{\text {t}}_{2}}+\alpha \, \partial _{{\text {q}}}\rho _{{\text {t}}_{2}}\big )\end{aligned}$$
(50a)
$$\begin{aligned} \partial _{{\text {t}}_{2}}\sigma _{{\text {t}}_{2}}&=\frac{1}{2}(\partial _{{\text {q}}} \sigma _{{\text {t}}_{2}})^2-\alpha \,\partial _{{\text {q}}}^2 \sigma _{{\text {t}}_{2}}\,. \end{aligned}$$
(50b)

By (49) and (46) in the limit of infinite control horizon (\({\text {t}}_{\mathfrak {f}}\nearrow \infty \)), we recover the result of [57] that in the overdamped limit optimal entropic transport is a viscous regularization of the minimization of the mean entropy production. As the optimal control of the latter problem [28] is equivalent to optimal mass transport, we also recover Mikami’s result [56]. In fact, for \({\text {t}}_{\mathfrak {f}}\) finite but sufficiently large to justify the scale separation required by the multiscale approach, the cell problem (50) allows us to extract information about corrections to the overdamped limit.

6.1.2 Cumulants and Marginal Distribution

Solving the cell problem allows us to evaluate the leading order corrections to the overdamped limit of all phase space cumulants within order \(O(\varepsilon ^{2})\). Namely, all cumulants turn out to be linear combinations of functionals of the pair \(\rho _{{\text {t}}_{2}}\) and \(\sigma _{{\text {t}}_{2}}\), weighed by pure functions of the fast time \({\text {t}}_{0}\).

We denote the non-dimensional counterparts of the position and momentum processes with a tilde

$$\begin{aligned}&\tilde{\mathcalligra{q}}_{{\text {t}}}=\frac{\mathcalligra{q}_{\tau \,{\text {t}}}}{\ell },\quad \tilde{\mathcalligra{p}}_{{\text {t}}}=\sqrt{\frac{\beta }{m}}\,\mathcalligra{p}_{\tau \,{\text {t}}}\,. \end{aligned}$$

Unlike the cell problem, the cumulants are functions of both the fast \({\text {t}}_{0}\) and slow \({\text {t}}_{2}\) time variables. To neaten the expressions, we denote the moments of the position process with respect to the probability density specified by the cell problem as

$$\begin{aligned}&\mu _{{\text {t}}_{2}}^{({n})}=\int _{\mathbb {R}}\text {d}{\text {q}}\, \rho _{{\text {t}}_{2}}({\text {q}})\,{\text {q}}^{{n}},\quad {n}=1,2\,. \end{aligned}$$
(51)

Correspondingly, we also write

$$\begin{aligned} \dot{\mu }_{{\text {t}}_{2}}^{({n})}=\partial _{{\text {t}}_{2}}\int _{\mathbb {R}}\text {d}{\text {q}}\,\rho _{{\text {t}}_{2}}({\text {q}})\,{\text {q}}^{{n}}\,. \end{aligned}$$

In particular,

$$\begin{aligned} \dot{\mu }_{{\text {t}}_{2}}^{({1})} =-\int _{\mathbb {R}}\text {d}{\text {q}}\,\rho _{{\text {t}}_{2}}({\text {q}})\,(\partial \sigma _{{\text {t}}_{2}})({\text {q}})\, \end{aligned}$$

is a constant, i.e.

$$\begin{aligned} \ddot{\mu }_{{\text {t}}_{2}}^{({1})}=0\,, \end{aligned}$$

for both the optimal entropic transport (KL with zero reference potential) and minimum mean entropy production EP problems. We justify this claim in Appendix F.

Momentum mean. Recalling (42), the expectation value of the momentum process conditioned on the position process is

$$\begin{aligned} {\text {E}}_{\mathcal {P}}\left( \tilde{\mathcalligra{p}}_{{\text {t}}}\,\big |\,\tilde{\mathcalligra{q}}_{{\text {t}}} ={\text {q}}\right) \rho _{{\text {t}}}({\text {q}})=\int _{\mathbb {R}}\text {d}{\text {p}}\, {\text {p}}\,{\text {f}}_{\text {t}}({\text {q}},{\text {p}}) = \varepsilon \,{\text {f}}_{{\text {t}}_{0},{\text {t}}_{2}}^{(1:1)}({\text {q}})+O(\varepsilon ^2)\,. \end{aligned}$$
(52)

In section 6.2, we show how to compute \({\text {f}}_{{\text {t}}_{0},{\text {t}}_{2}}^{(1:1)}\) from the solution of the cell problem. We obtain

$$\begin{aligned} \begin{aligned} {\text {f}}_{{\text {t}}_{0},{\text {t}}_{2}}^{(1:1)}&=-a_{{\text {t}}_{0}}\,\rho _{{\text {t}}_{2}}\,\frac{\partial ( \sigma _{{\text {t}}_{2}}+\alpha \,\ln \rho _{{\text {t}}_{2}})}{A} +\rho _{{\text {t}}_{2}}\frac{B\,a_{{\text {t}}_{0}}-A \,b_{{\text {t}}_{0}}}{A\,(A-B)}\,\dot{\mu }_{{\text {t}}_{2}}^{({1})} \,. \end{aligned} \end{aligned}$$
(53)

Here \( a_{{\text {t}}_{0}}\) and \( b_{{\text {t}}_{0}}\) are pure functions of the fast time \({\text {t}}_{0}\):

$$\begin{aligned}&a_{{\text {t}}_{0}}=1+\sinh (\omega {\text {t}}_{0}) \tanh \frac{ \omega {\text {t}}_{\mathfrak {f}}}{2}-\cosh ( \omega {\text {t}}_{0})+b_{{\text {t}}_{0}}\end{aligned}$$
(54a)
$$\begin{aligned}&b_{{\text {t}}_{0}}=\frac{\omega \,e^{-{\text {t}}_{\mathfrak {f}}}\, \left( \cosh (\omega {\text {t}}_{0})-e^{2 {\text {t}}_{0}}\right) }{\omega \cosh {\text {t}}_{\mathfrak {f}}-2 \sinh {\text {t}}_{\mathfrak {f}}\coth \frac{ \omega {\text {t}}_{\mathfrak {f}}}{2}} + \frac{\omega \,e^{-{\text {t}}_{\mathfrak {f}}} \left( e^{2 {\text {t}}_{\mathfrak {f}}}-\cosh (\omega {\text {t}}_{\mathfrak {f}})\right) \, \sinh ( \omega {\text {t}}_{0} ) }{\left( \omega \cosh {\text {t}}_{\mathfrak {f}}-2 \sinh {\text {t}}_{\mathfrak {f}}\coth \frac{ \omega {\text {t}}_{\mathfrak {f}}}{2}\right) \sinh ( \omega {\text {t}}_{\mathfrak {f}})} \,. \end{aligned}$$
(54b)

It is straightforward to verify that

$$\begin{aligned} a_{0}=a_{{\text {t}}_{\mathfrak {f}}}=b_{0}=b_{{\text {t}}_{\mathfrak {f}}}=0 \end{aligned}$$

hence enforcing the boundary conditions imposed on (53). The derivation of an explicit expression of this quantity requires the solution of the \(O(\varepsilon ^{4})\) cell problem in the same way as (44a) specifies \({\text {f}}^{(1:1)}\).

Equipped with the above definitions, by integrating (52) in \({\text {q}}\) we arrive at

$$\begin{aligned} {\text {E}}_{\mathcal {P}}\tilde{\mathcalligra{p}}_{\text {t}}=\varepsilon \, \frac{a_{{\text {t}}_{0}}-b_{{\text {t}}_{0}}}{A-B}\,\dot{\mu }_{{\text {t}}_{2}}^{({1})}+O(\varepsilon ^{2})\,. \end{aligned}$$
(55)

In order to interpret this result, we recall a standard result of multiscale analysis (see e.g. § 2.5.1 of [72]) ensuring that

$$\begin{aligned} \int _{0}^{{\text {t}}_{\mathfrak {f}}}\text {d}{\text {t}}\,{\text {E}}_{\mathcal {P}}\tilde{\mathcalligra{p}}_{\text {t}}\approx \varepsilon \int _{0}^{{\text {t}}_{\mathfrak {f}}}\text {d}{\text {t}}_{0}\,\frac{a_{{\text {t}}_{0}}-b_{{\text {t}}_{0}}}{A-B} \int _{0}^{\varepsilon ^{2}\,{\text {t}}_{\mathfrak {f}}}\text {d}{\text {t}}_{2}\,\dot{\mu }_{{\text {t}}_{2}}^{({1})} \end{aligned}$$

when the separation of scales is sufficiently large: \({\text {t}}_{\mathfrak {f}}\gg O(1)\) with \( \varepsilon ^{2}\,{\text {t}}_{\mathfrak {f}}=O(1)\). The relation (98) between the integral over the functions (54) and the constants A and B (47) implies that as the duration of the control horizon grows, the momentum expectation tends to

$$\begin{aligned} \int _{0}^{{\text {t}}_{\mathfrak {f}}}\text {d}{\text {t}}\,{\text {E}}_{\mathcal {P}}\tilde{\mathcalligra{p}}_{\text {t}} \overset{{\text {t}}_{\mathfrak {f}}\gg 1}{\approx }\varepsilon \,{\text {t}}_{\mathfrak {f}}\,\frac{\mu _{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}^{({1})}-\mu _{0}^{({1})}}{1+g}\,. \end{aligned}$$

Once recast into dimensional quantities, the identity reads

$$\begin{aligned} \int _{0}^{{t}_{\mathfrak {f}}}\text {d}t\,{\text {E}}_{\mathcal {P}}\mathcalligra{p}_{t} \overset{{t}_{\mathfrak {f}}\gg \tau }{\approx }\frac{\tau \,{t}_{\mathfrak {f}}}{\beta }\,\frac{\mu _{\varepsilon ^{2}t_{\mathfrak {f}}}^{({1})}-\mu _{0}^{({1})}}{\ell \,(1+g)}\,. \end{aligned}$$
(56)

Correction to the position marginal distribution. Upon integrating out the momentum variable in (42), we get

$$\begin{aligned} \int _{\mathbb {R}}\text {d}{\text {p}}\,{\text {f}}_{{\text {t}}}({\text {q}},{\text {p}})=\rho _{{\text {t}}_{2}}({\text {q}})+\varepsilon ^{2}\,{\text {f}}^{(0:2)}_{{\text {t}}_{0},{\text {t}}_{2}}({\text {q}})+O(\varepsilon ^{3})\,. \end{aligned}$$
(57)

In Sect. 6.2 we show that

$$\begin{aligned} \begin{aligned} {\text {f}}^{(0:2)}_{{\text {t}}_{0},{\text {t}}_{2}}=-g \,\partial _{{\text {q}}} {\text {f}}_{{\text {t}}_{0},{\text {t}}_{2}}^{(1:1)} +(1+g) \left( \dfrac{{\text {t}}_{0}}{{\text {t}}_{\mathfrak {f}}}\int _{0}^{{\text {t}}_{\mathfrak {f}}}\text {d}{\text {s}}-\int _{0}^{{\text {t}}_{0}}\text {d}{\text {s}}\right) \partial _{{\text {q}}}{\text {f}}_{{\text {s}},{\text {t}}_{2}}^{(1:1)}\,. \end{aligned} \end{aligned}$$
(58)

Inspection of (58) reveals that the marginal (57) exactly satisfies the non-perturbative boundary conditions (45) and preserves normalization within accuracy. We avail ourselves of (57) to evaluate the remaining linear and second order cumulants.

Position mean. We readily obtain

$$\begin{aligned} {\text {E}}_{\mathcal {P}}\tilde{\mathcalligra{q}}_{\text {t}}=\mu _{{\text {t}}_{2}}^{({1})} + \varepsilon ^{2}\,g\, \frac{a_{{\text {t}}_{0}}-b_{{\text {t}}_{0}}}{A-B}\,\dot{\mu }_{{\text {t}}_{2}}^{(1)} \nonumber \\&\qquad -\frac{\varepsilon ^{2}\,(1+g)\,\dot{\mu }_{{\text {t}}_{2}}^{(1)}}{A-B} \left( \frac{{\text {t}}_{0}}{{\text {t}}_{\mathfrak {f}}} \int _{0}^{{\text {t}}_{\mathfrak {f}}}\text {d}{\text {s}}\, -\int _{0}^{{\text {t}}_{0}}\text {d}{\text {s}}\, \right) (a_{{\text {s}}}-b_{{\text {s}}}) +O(\varepsilon ^{3}) \end{aligned}$$
(59)

As expected, at the boundaries of the control horizon the cumulant are fully specified by the boundary conditions and so are independent of \(\varepsilon \).

Position-momentum cross correlation. After straightforward algebra we find

$$\begin{aligned} {\text {E}}_{\mathcal {P}}\left( \tilde{\mathcalligra{q}}_{\text {t}}\tilde{\mathcalligra{p}}_{\text {t}}\right) -{\text {E}}_{\mathcal {P}}\left( \tilde{\mathcalligra{q}}_{\text {t}}\right) {\text {E}}_{\mathcal {P}} \left( \tilde{\mathcalligra{p}}_{\text {t}}\right) = \varepsilon \, \frac{a_{{\text {t}}_{0}}\,\dot{\varsigma }_{{\text {t}}_{2}}}{2\,A} +O(\varepsilon ^{2}) \end{aligned}$$
(60)

where

$$\begin{aligned} \varsigma _{{\text {t}}_{2}}=\mu _{{\text {t}}_{2}}^{({2})}-(\mu _{{\text {t}}_{2}}^{({1})})^{2} \end{aligned}$$

and

$$\begin{aligned} \dot{\varsigma }_{{\text {t}}_{2}}&=-2\,\int _{\mathbb {R}}\text {d}{\text {q}}\,\rho _{{\text {t}}_{2}} \,{\text {q}}\, \partial _{{\text {q}}}\left( \sigma _{{\text {t}}_{2}}+\alpha \ln \rho _{{\text {t}}_{2}}\right) -2\,\dot{\mu }_{{\text {t}}_{2}}^{({1})}\,\mu _{{\text {t}}_{2}}^{({1})} \nonumber \\&=\partial _{{\text {t}}_{2}}\left( \mu _{{\text {t}}_{2}}^{({2})}-(\mu _{{\text {t}}_{2}}^{({1})})^{2}\right) \, \equiv \,\partial _{{\text {t}}_{2}}\varsigma _{{\text {t}}_{2}}\,. \end{aligned}$$
(61)

Position variance. We obtain its expression by evaluating the difference between

$$\begin{aligned}&{\text {E}}_{\mathcal {P}}\tilde{\mathcalligra{q}}_{{\text {t}}}^{2}=\mu _{{\text {t}}_{2}}^{({2})} +2\,\varepsilon ^{2}\,g\,\int _{\mathbb {R}}\text {d}{\text {q}}\,{\text {q}}\,{\text {f}}_{{\text {t}}_{0},{\text {t}}_{2}}^{(1:1)} ({\text {q}}) -2\, \varepsilon ^{2}\,(1+g) \int _{\mathbb {R}}\text {d}{\text {q}}\,{\text {q}}\,\left( \dfrac{{\text {t}}_{0}}{t_{\mathfrak {f}}}\int _0^{t_{\mathfrak {f}}}\text {d}{\text {s}}\, -\int _0^{{\text {t}}_{0}}\text {d}{\text {s}}\, \right) {\text {f}}_{{\text {s}},{\text {t}}_{2}}^{(1:1)}({\text {q}}) \end{aligned}$$

and the squared mean value

$$\begin{aligned} \left( {\text {E}}_{\mathcal {P}}\tilde{\mathcalligra{q}}_{{\text {t}}}\right) ^{2}&=(\mu _{{\text {t}}_{2}}^{({1})})^{2} + 2\,\varepsilon ^{2}\,g\, \frac{a_{{\text {t}}_{0}}-b_{{\text {t}}_{0}}}{A-B}\,\mu _{{\text {t}}_{2}}^{({1})} \dot{\mu }_{{\text {t}}_{2}}^{(1)} \\&\quad -2\,\frac{\varepsilon ^{2}\,(1+g)\,\mu _{{\text {t}}_{2}}^{({1})}\, \dot{\mu }_{{\text {t}}_{2}}^{(1)}}{A-B} \left( \frac{{\text {t}}_{0}}{{\text {t}}_{\mathfrak {f}}}\int _{0}^{t_{\mathfrak {f}}}\text {d}{\text {s}}\, -\int _{0}^{{\text {t}}_{0}}\text {d}{\text {s}}\, \right) (a_{{\text {s}}}-b_{{\text {s}}}) +O(\varepsilon ^{3})\,. \end{aligned}$$

After some algebra, we find that the expression of the variance reduces to

$$\begin{aligned}&{\text {E}}_{\mathcal {P}}\tilde{\mathcalligra{q}}_{{\text {t}}}^{2}-\left( {\text {E}}_{\mathcal {P}} \tilde{\mathcalligra{q}}_{{\text {t}}}\right) ^{2}= \varsigma _{{\text {t}}_{2}} +\varepsilon ^{2}\,g\,\frac{a_{{\text {t}}_{0}}}{A}\,\dot{\varsigma }_{{\text {t}}_{2}} - \varepsilon ^{2}\,\frac{1+g}{A}\dot{\varsigma }_{{\text {t}}_{2}} \left( \frac{{\text {t}}_{0}}{{\text {t}}_{\mathfrak {f}}}\int _0^{{\text {t}}_{\mathfrak {f}}}\text {d}{\text {s}}-\int _0^{{\text {t}}_{0}}\text {d}{\text {s}}\right) a_{{\text {s}}}+O(\varepsilon ^{3}) \end{aligned}$$
(62)

with \(\varsigma _{{\text {t}}_{2}} \) and \(\dot{\varsigma }_{{\text {t}}_{2}} \) defined by (61).

Momentum variance. The expectation value of the squared momentum conditioned on the position process is

$$\begin{aligned} {\text {E}}\left( \tilde{\mathcalligra{p}}_{{\text {t}}}^{2}\,\big |\, \tilde{\mathcalligra{q}}_{{\text {t}}}={\text {q}}\right) \rho _{{\text {t}}_{2}}({\text {q}}) =\int _{\mathbb {R}}\text {d}{\text {p}}\, {\text {p}}^2 \,{\text {f}}_{{\text {t}}}({\text {q}},{\text {p}}) = \rho _{{\text {t}}_{2}}({\text {q}}) + \varepsilon ^2 \,\left( {\text {f}}_{{\text {t}}_{0},{\text {t}}_{2}}^{(0:2)}({\text {q}})+2\,{\text {f}}_{{\text {t}}_{0},{\text {t}}_{2}}^{(2:2)}({\text {q}}) \right) +O(\varepsilon ^3)\,. \end{aligned}$$

with

$$\begin{aligned} {\text {f}}_{{\text {t}}_{0},{\text {t}}_{2}}^{(2:2)}=\frac{\left( {\text {f}}_{{\text {t}}_{0},{\text {t}}_{2}}^{(1:1)}\right) ^2}{2\,\rho _{{\text {t}}_{2}}}-\rho _{{\text {t}}_{2}} \int _0^{{\text {t}}_{0}}\text {d}{\text {s}}\, e^{-2({\text {t}}_{0}-{\text {s}})} \partial _{{\text {q}}} \left( \frac{{\text {f}}_{{\text {t}}_{0},{\text {t}}_{2}}^{(1:1)}}{\rho _{{\text {t}}_{2}}}\right) \,. \end{aligned}$$
(63)

After some tedious algebra we arrive at

$$\begin{aligned} {\text {E}}\left( \tilde{\mathcalligra{p}}_{{\text {t}}}^{2}\right) -({\text {E}}\left( \tilde{\mathcalligra{p}}_{{\text {t}}}\right) )^{2}= 1&-\varepsilon ^{2}\, \frac{a_{{\text {t}}_{0}}^{2}}{A^{2}}\,(\dot{\mu }_{{\text {t}}_{2}}^{({1})})^{2}+2 \,\varepsilon ^{2}\int _0^{{\text {t}}_{0}}\text {d}{\text {s}}\, e^{-2({\text {t}}_{0}-{\text {s}})} \frac{a_{{\text {s}}}}{A}\int _{\mathbb {R}}\text {d}{\text {q}}\,\rho _{{\text {t}}_{2}} \,\partial _{{\text {q}}}^{2}( \sigma _{{\text {t}}_{2}}+\alpha \ln \rho _{{\text {t}}_{2}}) \nonumber \\&+\varepsilon ^{2}\,\frac{a_{{\text {t}}_{0}}^{2}}{A^{2}}\int _{\mathbb {R}}\text {d}{\text {q}}\, \rho _{{\text {t}}_{2}}\big (\partial _{{\text {q}}}( \sigma _{{\text {t}}_{2}}+\alpha \ln \rho _{{\text {t}}_{2}})\big )^{2} +O(\varepsilon ^{3})\,. \end{aligned}$$
(64)

We notice that the variance satisfies the boundary conditions in consequence of the identity

$$\begin{aligned} \int _0^{{\text {t}}_{\mathfrak {f}}}\text {d}{\text {s}}\, e^{-2({\text {t}}_{0}-{\text {s}})} a_{{\text {s}}}=0 \end{aligned}$$

which follows from (92).

6.1.3 Optimal Control Potential

Similarly, the cell problem yields the leading order expression for the gradient of the optimal control potential

$$\begin{aligned} \begin{aligned} \partial _{{\text {q}}} {\text {U}}_{{\text {t}}} ({\text {q}})&=-\partial _{{\text {q}}}\ln \rho _{{\text {t}}_{2}}({\text {q}}) -\frac{\dot{a}_{{\text {t}}_{0}}+a_{{\text {t}}_{0}}}{A}\,\partial _{{\text {q}}}\mathcalligra{c}_{{\text {t}}_{2}}({\text {q}})\\&\qquad -\frac{(B\,\dot{a}_{{\text {t}}_{0}}-A \,\dot{b}_{{\text {t}}_{0}})+(B\,a_{{\text {t}}_{0}}-A \,b_{{\text {t}}_{0}})}{A\,(A-B)}\,\dot{\mu }_{{\text {t}}_{2}}^{({1})} +O(\varepsilon ) \end{aligned} \end{aligned}$$
(65)

with

$$\dot{a}_{{\text {t}}_{0}}=\partial _{{\text {t}}_{0}}\,a_{{\text {t}}_{0}}$$

and

$$\begin{aligned} \mathcalligra{c}_{{\text {t}}_{2}}({\text {q}})=-\sigma _{{\text {t}}_{2}}({\text {q}})-\alpha \ln \rho _{{\text {t}}_{2}}({\text {q}}) \end{aligned}$$
(66)

the current potential of the cell problem. In other words, the gradient of (66) is the current velocity [88] which allows us to represent (44a) as a mass conservation equation for any strictly positive \(\alpha \).

By definition, the current velocity vanishes when the system is in a Maxwell-Boltzmann equilibrium state. Hence, finite time transitions at minimum cost are not between Maxwell-Boltzmann equilibrium states, as we see from the explicit expression of the drift at the end times

$$\begin{aligned}&\partial _{{\text {q}}} {\text {U}}_{0} ({\text {q}})=-\partial _{{\text {q}}}\ln \rho _{0}({\text {q}})-\frac{\dot{a}_{0}}{A}\,\partial _{{\text {q}}} \mathcalligra{c}_{0}({\text {q}})-\frac{B\,\dot{a}_{0}-A \,\dot{b}_{0}}{A\,(A-B)}\,\dot{\mu }_{0}^{({1})} +O(\varepsilon ) \end{aligned}$$

and

$$\begin{aligned}&\partial _{{\text {q}}} {\text {U}}_{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}} ({\text {q}})=-\partial _{{\text {q}}}\ln \rho _{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}({\text {q}})-\frac{\dot{a}_{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}}{A}\,\partial _{{\text {q}}} \mathcalligra{c}_{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}({\text {q}}) -\frac{B\,\dot{a}_{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}-A \,\dot{b}_{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}}{A\,(A-B)}\,\dot{\mu }_{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}^{({1})} +O(\varepsilon )\,. \end{aligned}$$

From the physics point of view, this means transitions minimizing thermodynamic cost functionals have non-vanishing current velocity at the start and end of the protocol. Mathematically, this is unsurprising because the boundary conditions associated to the optimal control problem do not impose any conditions on the terminal values of the control potentials.

For all practical purposes, the shape of potential corresponding to the boundary equilibrium states can be matched at zero cost, through an instantaneous change of the control.

6.1.4 Minimum Cost

We evaluate the expression for the minimum cost using the duality relation (17).

  1. KL

    : The projection onto Hermite polynomials couches (17) into the form

    $$\begin{aligned} {\text {K}}(\mathcal {P}\mathrel {\Vert }\mathcal {Q})=\int _{\mathbb {R}}\text {d}{\text {q}}\,\left( {\text {f}}_{0}^{(0)} v_{0}^{(0)}-{\text {f}}_{{\text {t}}_{\mathfrak {f}}}^{(0)} v_{{\text {t}}_{\mathfrak {f}}}^{(0)}\right) \,. \end{aligned}$$

    At leading order, multiscale perturbation theory yields the approximation

    $$\begin{aligned} {\text {K}}(\mathcal {P}\mathrel {\Vert }\mathcal {Q})=\int _{\mathbb {R}}\text {d}{\text {q}}\,\left( {\text {f}}_{0,0}^{(0:0)} v_{{\text {t}}_{\mathfrak {f}},0}^{(0:0)}-{\text {f}}_{0,\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}^{(0:0)} v_{{\text {t}}_{\mathfrak {f}},\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}^{(0:0)}\right) +O(\varepsilon ^{2})\,. \end{aligned}$$

    This is because the non-perturbative boundary conditions only allow contributions that are proportional to \( {\text {f}}_{0,0}^{(0:n)}\). In addition, we subtract secular terms in the value function expansion by requiring

    $$\begin{aligned} v_{{\text {t}}_{\mathfrak {f}},{\text {t}}_{2}}^{(0:2)}=v_{0,{\text {t}}_{2}}^{(0:2)}\,. \end{aligned}$$

    Thus, in our multiscale framework, the value of \(v_{{\text {t}}_{\mathfrak {f}},\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}^{(0:2)}\) can be only determined by higher order cell problems. To gain insight into the predicted features of the minimum, we couch the optimum value of the divergence into the form

    $$\begin{aligned} {\text {K}}(\mathcal {P}\mathrel {\Vert }\mathcal {Q})=-\int _{0}^{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\text {d} {\text {t}}_{2}\int _{\mathbb {R}}\text {d}{\text {q}}\, \partial _{{\text {t}}_{2}} \left( {\text {f}}_{0,{\text {t}}_{2}}^{(0:0)} \,v_{{\text {t}}_{\mathfrak {f}},{\text {t}}_{2}}^{(0:0)}\right) +O(\varepsilon ^{2})\,. \end{aligned}$$

    The above representation allows us to express the divergence in terms of the cell problem density (43) and the identity

    $$\begin{aligned}&v_{{\text {t}}_{\mathfrak {f}},{\text {t}}_{2}}^{(0:0)}=\frac{\sigma _{{\text {t}}_{2}}+(\alpha -A) \ln \rho _{{\text {t}}_{2}} }{2\,A}-\frac{{\text {U}}_{\star }}{2} -\frac{B\,{\text {q}}\,\dot{\mu }_{{\text {t}}_{2}}^{({1})}}{2\,A\,(A-B)} -\frac{B}{4\,A\,(A-B)}\int _{0}^{{\text {t}}_{2}}\text {d}{\text {s}}\, (\dot{\mu }_{{\text {s}}}^{({1})})^{2} \end{aligned}$$

    stemming from (89) and (101) in Sect. 6.2. Indeed, straightforward algebra yields

    $$\begin{aligned} \begin{aligned} {\text {K}}(\mathcal {P}\mathrel {\Vert }\mathcal {Q})&=\int _{0}^{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\text {d}{\text {s}}\int _{\mathbb {R}}\text {d}{\text {q}}\,\rho _{{\text {s}}}\,\dfrac{\big (\partial _{{\text {q}}} (\sigma _{\text {t}_2}-\alpha {\text {U}}_{\star })\big )^2 }{4\,A}\\&\qquad +\frac{A-\alpha }{2\,A}\int _{\mathbb {R}}\text {d}{\text {q}}\,\left( \rho _{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\,\ln \frac{\rho _{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}}{\rho _{\star }}-\rho _{0}\,\ln \frac{\rho _{0}}{\rho _{\star }}\right) \\&\qquad +\frac{B}{4\,A\,(A-B)}\int _{0}^{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\text {d}{\text {s}}\, (\dot{\mu }_{{\text {s}}}^{({1})})^{2}+O(\varepsilon ^{2}) \end{aligned} \end{aligned}$$
    (67)

    where

    $$\begin{aligned}&\ln \rho _{\star }=-{\text {U}}_{\star }-\ln \int _{\mathbb {R}}\text {d}{\text {q}}\,e^{-{\text {U}}_{\star }} \end{aligned}$$

    and

    $$\begin{aligned} A-B=(1+g)\left( 1-\frac{2 \tanh \frac{{\text {t}}_{\mathfrak {f}}}{2}}{{\text {t}}_{\mathfrak {f}}}\right) \end{aligned}$$

    which is positive definite when \({\text {t}}_{\mathfrak {f}}\,>\,2\). In (67), all terms but the first vanish in the limit of infinite scale separation \({\text {t}}_{\mathfrak {f}}\) tending to infinity. Further elementary considerations shed more light on the sign of the corrections. Recalling (66) and the properties of the current velocity, we obtain the identity

    $$\begin{aligned} \begin{aligned} \int _{\mathbb {R}}\text {d}{\text {q}}\,\rho _{{\text {t}}_{2}} \big (\partial _{{\text {q}}} (\sigma _{t_2}-\alpha {\text {U}}_{\star })\big )^2&=\int _{\mathbb {R}}\text {d}{\text {q}}\,\rho _{{\text {t}}_{2}}\,(\partial _{{\text {q}}}\mathcalligra{c}_{{\text {t}}_2})^{2}+\alpha ^{2}\int _{\mathbb {R}}\text {d}{\text {q}}\,\rho _{{\text {t}}_{2}}\left( \partial _{{\text {q}}} \ln \frac{\rho _{{\text {t}}_{2}}}{\rho _{\star }}\right) ^{2}\\&\quad +2\,\alpha \,\partial _{{\text {t}}}\int _{\mathbb {R}}\text {d}q\,\rho _{{\text {t}}_{2}}\ln \frac{\rho _{{\text {t}}_{2}}}{\rho _{\star }}\,. \end{aligned} \end{aligned}$$
    (68)

    We then re-write (67) as

    $$\begin{aligned} \begin{aligned} {\text {K}}(\mathcal {P}\mathrel {\Vert }\mathcal {Q})&= \frac{1}{4\, \alpha }\int _{0}^{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\text {d}{\text {t}}_{2}\,\int _{\mathbb {R}}\text {d}{\text {q}}\,\rho _{{\text {t}}_{2}} \big (\partial _{{\text {q}}} (\sigma _{{\text {t}}_{2}}-\alpha {\text {U}}_{\star })\big )^2\\&\quad -\frac{B}{4\,A\,(A-B)}\int _{0}^{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\text {d}{\text {t}}_{2}\,\left( \int _{\mathbb {R}} \text {d}{\text {q}}\,\rho _{{\text {t}}_{2}}(\partial _{{\text {q}}}\mathcalligra{c}_{{\text {t}}_{2}})^{2}-(\dot{\mu }_{{\text {t}}_{2}}^{({1})})^{2}\right) \\&\quad +\frac{\alpha -(A-B)}{4\,\alpha \,(A-B)} \int _{0}^{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\text {d}{\text {t}}_{2}\,\int _{\mathbb {R}}\text {d}{\text {q}}\,\rho _{{\text {t}}_{2}} (\partial _{{\text {q}}}\mathcalligra{c}_{{\text {t}}_{2}})^{2}\\&\quad +\alpha \,\frac{\alpha -A}{4\,A}\int _{0}^{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\text {d}{\text {t}}_{2}\,\int _{\mathbb {R}} \text {d}{\text {q}}\,\rho _{{\text {t}}_{2}}\left( \partial _{{\text {q}}} \ln \frac{\rho _{{\text {t}}_{2}}}{\rho _{\star }}\right) ^{2}+O(\varepsilon ^{2})\,. \end{aligned} \end{aligned}$$

    The identity

    $$\begin{aligned} \dot{\mu }^{({1})}=\int _{\mathbb {R}}\text {d}{\text {q}}\,\rho _{{\text {t}}_{2}}(\partial _{{\text {q}}}\mathcalligra{c}_{{\text {t}}_{2}}) \end{aligned}$$

    and the Cauchy–Schwarz inequality then ensure that all corrections are positive for \({\text {t}}_{\mathfrak {f}}\,>\,2\). Thus for any \({\text {t}}_{\mathfrak {f}}\) sufficiently large to ensure a separation of time scales, we arrive at the inequality

    $$\begin{aligned} {\text {K}}(\mathcal {P}\mathrel {\Vert }\mathcal {Q})\,\ge \,\frac{1}{4\,\alpha } \int _{0}^{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\text {d}{\text {t}}_{2}\,\int _{\mathbb {R}}\text {d}{\text {q}}\,\rho _{{\text {t}}_{2}}\big (\partial _{{\text {q}}} (\sigma _{{\text {t}}_{2}}-\alpha {\text {U}}_{\star })\big )^2 \end{aligned}$$

    whence we read the multiscale perturbation theory prediction of the Talagrand-Otto-Villani constant \(\mathcal {C}_{\text {TOV}}\) in (10). To do so, we focus on entropic transport and set \({\text {U}}_{\star } \) to zero. Next, we recall that any solution of the cell problem (50a)–(50b) enjoys the lower bound [102]

    $$\begin{aligned} \int _{0}^{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\text {d}{\text {t}}_{2}\int _{\mathbb {R}}\text {d}{\text {q}}\, \rho _{{\text {t}}_{2}}\big (\partial _{{\text {q}}} \sigma _{{\text {t}}_{2}}\big )^2\,\ge \,\frac{{\text {E}}_{\widetilde{\mathcal {P}}} \left| \tilde{\mathcalligra{q}}_{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}-\tilde{\mathcalligra{q}}_{0}\right| ^{2}}{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}} \end{aligned}$$
    (69)

    where \( \widetilde{\mathcal {P}}\) is the measure generated by the overdamped Schrödinger bridge in \([0,\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}]\) associated to the stochastic differential equation

    $$\begin{aligned} \text {d}\tilde{\mathcalligra{q}}_{{\text {t}}_{2}}=-(\partial \sigma _{{\text {t}}_{2}})(\tilde{\mathcalligra{q}}_{{\text {t}}_{2}})\, \text {d}{\text {t}}_{2}+\sqrt{2\,\alpha }\,\text {d}\mathcalligra{w}_{{\text {t}}_{2}}\,. \end{aligned}$$
    (70)

    The inequality (69) is a consequence of the law of iterated expectation (see e.g. [76] pag. 310). Indeed, it ensures that

    $$\begin{aligned} \int _{0}^{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\text {d}{\text {t}}_{2}\int _{\mathbb {R}}\text {d}{\text {q}}\,\rho _{{\text {t}}_{2}}\big (\partial _{{\text {q}}} \sigma _{{\text {t}}_{2}}\big )^2&\,\equiv \,\int _{0}^{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\text {d}{\text {t}}_{2}{\text {E}}_{\widetilde{\mathcal {P}}}\big ((\partial \sigma _{{\text {t}}_{2}})(\tilde{\mathcalligra{q}}_{{\text {t}}_{2}})\big )^{2}\\&=\int _{0}^{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\text {d}{\text {t}}_{2}{\text {E}}_{\widetilde{\mathcal {P}}}\left( {\text {E}}_{\widetilde{\mathcal {P}}}\left( \big ((\partial \sigma _{{\text {t}}_{2}})(\tilde{\mathcalligra{q}}_{{\text {t}}_{2}})\big )^{2}\,\big |\,\tilde{\mathcalligra{q}}_{0}\right) \right) \\&\,\ge \,\int _{0}^{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\text {d}{\text {t}}_{2}{\text {E}}_{\widetilde{\mathcal {P}}}\left( \Big ({\text {E}}_{\widetilde{\mathcal {P}}}\left( (\partial \sigma _{{\text {t}}_{2}})(\tilde{\mathcalligra{q}}_{{\text {t}}_{2}})\,\big |\,\tilde{\mathcalligra{q}}_{0}\right) \Big )^{2}\right) \,. \end{aligned}$$

    We now invert the order of integration and apply the Benamou–Brenier argument [89] to the stochastic paths generated by (70) and find

    $$\begin{aligned}&\int _{0}^{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\text {d}{\text {t}}_{2}\int _{\mathbb {R}}\text {d}{\text {q}}\,\rho _{{\text {t}}_{2}}\big (\partial _{{\text {q}}} \sigma _{{\text {t}}_{2}}\big )^2\,\ge \,\frac{ {\text {E}}_{\widetilde{\mathcal {P}}}\left( \Big ({\text {E}}_{\widetilde{\mathcal {P}}}\left( \tilde{\mathcalligra{q}}_{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}-\tilde{\mathcalligra{q}}_{0} -\sqrt{2\,\alpha }\,\tilde{\mathcalligra{w}}_{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}} \big |\tilde{\mathcalligra{q}}_{0}\right) \Big )^{2}\right) }{\varepsilon ^{2}\,{\text {t}}_{\mathfrak {f}}}\,. \end{aligned}$$

    The inequality now follows because \( \tilde{\mathcalligra{w}}\) is the Wiener process with respect to the measure \(\widetilde{\mathcal {P}} \) and as such has zero conditional expectation with respect to \(\tilde{\mathcalligra{q}}_{0} \). In Appendix E we present a path integral derivation of the same result. The upshot is that for entropic transport we get a Talagrand-Otto-Villani type inequality

    $$\begin{aligned} {\text {K}}(\mathcal {P}\mathrel {\Vert }\mathcal {Q})\,\ge \,\frac{1}{4\,\alpha }\frac{{\text {E}}_{\widetilde{\mathcal {P}}}\left| \tilde{\mathcalligra{q}}_{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}-\tilde{\mathcalligra{q}}_{0}\right| ^{2}}{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\,. \end{aligned}$$

    In dimensional units, the same result reads

    $$\begin{aligned} {\text {K}}(\mathcal {P}\mathrel {\Vert }\mathcal {Q})\,\ge \,\frac{1}{4\,\alpha }\frac{\beta \,m{\text {E}}_{\widetilde{\mathcal {P}}}\left| \mathcalligra{q}_{{t}_{\mathfrak {f}}}-\mathcalligra{q}_{0}\right| ^{2}}{\tau \,{t}_{\mathfrak {f}}}\,. \end{aligned}$$
  2. EP

    : Upon contrasting (5) with (11), the exact expression of the minimum mean entropy production reads

    $$\begin{aligned} \mathcal {E}=\int _{\mathbb {R}}\text {d}{\text {q}}\, \left( {\text {f}}_{0}^{(0)} \big (v_{0}^{(0)}+\ln {\text {f}}_{0}^{(0)}\big )-{\text {f}}_{{t}_{\mathfrak {f}}}^{(0)} \big (v_{{t}_{\mathfrak {f}}}^{(0)}+\ln {\text {f}}_{{t}_{\mathfrak {f}}}^{(0)}\big )\right) \,. \end{aligned}$$

    The multiscale approximation then is

    $$\begin{aligned} \mathcal {E}=-\int _{0}^{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\hspace{-0.4cm}\text {d}{\text {t}}_{2}\int _{\mathbb {R}}\text {d}{\text {q}}\, \partial _{{\text {t}}_{2}} \left( {\text {f}}_{0,{\text {t}}_{2}}^{(0:0)} (v_{{\text {t}}_{\mathfrak {f}},{\text {t}}_{2}}^{(0:0)}+\ln {\text {f}}_{0,{\text {t}}_{2}}^{(0:0)})\right) +O(\varepsilon ^{2}) \end{aligned}$$

    where, by (89) and (101), the identity

    $$\begin{aligned}&v_{{\text {t}}_{\mathfrak {f}},{\text {t}}_{2}}^{(0:0)}+\ln {\text {f}}_{0,{\text {t}}_{2}}^{(0:0)}=\frac{2\,\sigma _{{\text {t}}_{2}}}{A}+\frac{2\,B\,{\text {q}}\,\dot{\mu }^{({1})}}{A(A-B)} +\frac{B\,(\dot{\mu }^{({1})})^{2}\,{\text {t}}_{2}}{A\,(A-B)} \end{aligned}$$

    with

    $$\begin{aligned} \dot{\mu }^{({1})}=\frac{\mu _{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}^{({1})}-\mu _{0}^{({1})}}{\varepsilon ^{2}\,{\text {t}}_{\mathfrak {f}}} \end{aligned}$$

    holds true. After some algebra, we arrive at

    $$\begin{aligned} \begin{aligned} \mathcal {E}&=\dfrac{1}{1+g}\int _{0}^{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\text {d}{\text {t}}_{2}\,\int _{\mathbb {R}}\text {d}{\text {q}}\,\rho _{{\text {t}}_{2}} (\partial _{{\text {q}}}\sigma _{{\text {t}}_{2}})^{2} +\dfrac{1+g-A}{(1+g)\,A}\int _{0}^{\varepsilon ^{2}{t}_{\mathfrak {f}}}\hspace{-0.4cm}\text {d}{\text {t}}_{2}\,\left( \int _{\mathbb {R}}\text {d}{\text {q}}\,\rho _{{\text {t}}_{2}} (\partial _{{\text {q}}}\sigma _{{\text {t}}_{2}})^{2}-(\dot{\mu }^{({1})})^{2}\right) \\&\quad + \dfrac{1+g-(A-B)}{4\,(1+g)\,(A-B)}\,(\dot{\mu }^{({1})})^{2}\,\varepsilon ^{2}\,{\text {t}}_{\mathfrak {f}}+O(\varepsilon ^{2}) \end{aligned} \end{aligned}$$
    (71)

    with

    $$\begin{aligned} A-B=(1+g)\left( 1-\frac{2 \tanh \frac{\omega \,{\text {t}}_{\mathfrak {f}}}{2}}{\omega \,{\text {t}}_{\mathfrak {f}}}\right) \,. \end{aligned}$$

    All addends in (71) are positive. Furthermore, the last two vanish both in the limit of infinite scale separation and upon recalling the definition (48) of \(\omega \) when the coupling constant g is vanishing

    $$\begin{aligned} \lim _{g\searrow 0}\mathcal {E}=\int _{0}^{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\text {d}{\text {t}}_{2}\,\int _{\mathbb {R}}\text {d}{\text {q}}\,\rho _{{\text {t}}_{2}} \,(\partial _{{\text {q}}}\sigma _{{\text {t}}_{2}})^{2}\,. \end{aligned}$$

    We also emphasize for case EP, the field \(\sigma \) satisfies the compressible Euler equation. As a consequence, we can directly apply the Benamou-Brenier inequality [89] to (71) and straightforwardly recover the bound (9).

6.1.5 Accuracy of the Multiscale Approximation

Infinite hierarchies of equations such as (36) appear in the study of Liouville’s and Boltzmann equations [65, 103]. Many numerical methods resort to a phenomenological truncation of the hierarchy. The multiscale method provides a controlled truncation at the level of second order equations. In fact, all cumulants up to second order can be reconstructed from an effective first order system embodied by the cell problem.

In Fig. 2, we summarize how the secular term cancellation (or, equivalently, solvability) conditions allow us to re-order contributions of the regular perturbative expansion within the hierachy. The upshot is that the predictions for cumulants and total cost obtained from the solution of the cell problem have different accuracies in \(\varepsilon \).

6.2 Order-by-Order Solution

In this Section, we solve the hierarchy of equations (36) in a multiscale perturbative series in powers of \(\varepsilon \). To this goal, we insert Eqs. (40a)–(40c) into Eq. (36), and identify equations of distinct order in the power expansion, taking into account the time differentiation, which acts on the multiscale dependence of the probability density and value function according to (39). The derivation of the results is briefly outlined in words below.

At order zero in \(\varepsilon \), the equations for the density and value function give rise to two decoupled infinite systems of first order differential equations in the fast time \({\text {t}}_{0}\). These systems are trivially integrable with respect to the fast time \({\text {t}}_{0}\), implicitly keeping all information about the boundary condition in the unresolved dependence of the integration constants upon the slow times.

Remarkably, at order \(\varepsilon ^{1}\) the boundary (37) and stationary conditions reduce the non-trivial contribution of the two infinite hierarchies of equations to a system of two first order differential equations in the fast time for \( {\text {f}}^{(1:1)}\) and \(v^{(1:1)}\). Dependence upon higher order coefficients of the expansion in Hermite polynomials enters these equations in the form of functions of the slow time \({\text {t}}_{2}\) that must be determined at order \(\varepsilon ^{2}\) in the regular perturbative expansion. As no secular term appears at this order we can assume within accuracy independence of the solution of the extremal equations from \({\text {t}}_{1}\).

At order \(\varepsilon ^{2}\), we can determine all unknown quantities inherited from lower orders in the regular perturbative expansion by imposing the cancellation of secular terms. This fixes the dynamical dependence upon the slow time \({\text {t}}_{2}\) in the form of a cell problem. We enforce the correct boundary conditions in terms of \( {\text {f}}^{(0:2)}\), \( {\text {f}}^{(2:2)}\) and \(v^{(0:2)}\), \(v^{(2:2)}\). Finally, if we set all the \( {\text {f}}^{(n:0)}\), \({\text {f}}^{(n:1)}\) that are not sustained by the drift and all the \( v^{(n:0)}\), \( v^{(n:1)}\) that are not needed to control the non-vanishing contributions to the density to zero, it is self-consistent to set

$$\begin{aligned} {\text {f}}^{(1:2)}= v^{(1:2)}=0\,. \end{aligned}$$

Figure 2 is a stylized summary of the procedure. Additional details are provided in Appendix F.

In principle, it is possible to extend the analysis to orders higher than \(\varepsilon ^{2}\), as done in [65]. The appearance of spatial derivatives of higher order than the second may, however, call for the introduction of appropriate variables to perform partial resummations [103]. We return to this point in Sect. 9

Fig. 2
figure 2

Scheme of the multiscale approach presented in the text. The logical order of the calculation is represented by the black solid arrows, going through the sequence of solutions of the differential systems at the different orders. The quantities computed with this strategy are reported in the coloured boxes, where different colours correspond to different steps of the order-by-order multiscale calculation. Dashed arrows show the functional dependencies of the computed quantities. \(^\star\)The calculation actually shows that there is no dependence on the \({\text {t}}_{1}\)-time scale

6.2.1 Boundary Conditions

The boundary conditions (2), (3) are by hypothesis independent of the Stokes time and therefore remain the same once expressed in non-dimensional units. Consequently, all \({\text {f}}_{{{\text {t}}}_{0}}^{(n:i)}\)’s with \(n\,\ge \, 1\) vanish at the boundaries, so that

$$\begin{aligned} {\text {f}}_{0,{{\text {t}}}_{1}}^{(n:i)}({\text {q}})= & {\text {f}}_{0}^{(0)}({\text {q}})\,\delta _{n,0}\,\delta _{i,0}\,\end{aligned}$$
(72a)
$$\begin{aligned} {\text {f}}_{{\text {t}}_{\mathfrak {f}},{{\text {t}}}_{1}}^{(n:i)}({\text {q}})= & {\text {f}}_{{\text {t}}_{\mathfrak {f}}}^{(0)}({\text {q}})\,\delta _{n,0}\,\delta _{i,0}, \end{aligned}$$
(72b)

where \(\delta _{i,j}\) is a Kronecker delta. Without loss of generality, we set \({t}_{\iota }=0\).

The non-perturbative boundary behavior is not assigned a priori but is determined by that of the probability density. However, in multiscale perturbation theory, we have the freedom to choose how partial resummations to cancel secular terms are performed [63]. We have reasoned that contributions to the cost can only come from the same time scale as those where the control varies, which gives the following resonance subtraction condition

$$\begin{aligned} v_{{\text {t}}_{\mathfrak {f}}, {{\text {t}}}_{1}}^{(0:i)}({\text {q}})-v_{0, {{\text {t}}}_{1}}^{(0:i)}({\text {q}})=\left( v_{{\text {t}}_{\mathfrak {f}}}^{(0)}({\text {q}})-v_{0}^{(0)}({\text {q}})\right) \delta _{i,0}\,. \end{aligned}$$
(73)

6.2.2 Solution of the Problem at Order Zero

The calculation starts at order zero of the \(\varepsilon \)-expansion. Equation (36a) can be written at order zero in \(\varepsilon \) as:

$$ \left( \partial _{{\text {t}}_{0}}+n\right) \,{\text {f}}_{{\text {t}}_{0},{{\text {t}}}_{1}}^{(n:0)}=0\,, $$

which implies

$$\begin{aligned} {\text {f}}_{{{\text {t}}}_{0}}^{(n:0)}=c_{{{\text {t}}}_{1}}e^{-n {\text {t}}_{0}}\,. \end{aligned}$$
(74)

Here \(c_{{{\text {t}}}_{1}}\) is fixed by imposing the initial condition at time \({\text {t}}_{0}=0\):

$$ {\text {f}}_{{{\text {t}}}_{0}}^{(n:0)}\Big |_{{\text {t}}_{0}=0}=\delta _{n,0}\,{\text {f}}_{0,{{\text {t}}}_{1}}^{(0:0)}\,, $$

following from Eq. (72). This observation leads to

$$\begin{aligned} {\text {f}}_{{{\text {t}}}_{0}}^{(n:0)}=\delta _{n,0}\,{\text {f}}_{0,{{\text {t}}}_{1}}^{(0:0)} \,. \end{aligned}$$
(75)

Solving the value function equation (36b) at order zero in \(\varepsilon \) gives

$$\begin{aligned} v_{{{\text {t}}}_{0}}^{(n:0)}-\,v_{{\text {t}}_{\mathfrak {f}},{{\text {t}}}_{1}}^{(n:0)}e^{{\text {t}}_{0}-{\text {t}}_{\mathfrak {f}}} ={\left\{ \begin{array}{ll} 0\quad & {\textbf {[KL]}} \\ \delta _{n,2}\,(1-e^{2({\text {t}}_{0}-{\text {t}}_{\mathfrak {f}})})/2\,.\quad & {\textbf {[EP]}} \end{array}\right. } \end{aligned}$$
(76)

This time we have no boundary conditions to impose. However, it follows from Eq. (36c) that

$$\begin{aligned} v_{{{\text {t}}}_{0}}^{(1:0)}=0\,, \end{aligned}$$
(77)

hence

$$\begin{aligned} \begin{aligned} v_{{{\text {t}}}_{0}}^{(n:0)}&-(1-\delta _{n,1})\,v_{{\text {t}}_{\mathfrak {f}},{{\text {t}}}_{1}}^{(n:0)}\,e^{{\text {t}}_{0}-{\text {t}}_{\mathfrak {f}}}={\left\{ \begin{array}{ll} 0\quad & {\textbf {[KL]}} \\ \delta _{n,2}(1-e^{2({\text {t}}_{0}-{\text {t}}_{\mathfrak {f}})})/2\,.\quad & {\textbf {[EP]}} \end{array}\right. } \end{aligned} \end{aligned}$$
(78)

The \({\text {t}}_{0}\)-dependence of the probability density and the value function is completely determined at order zero. We have no way to enforce the boundary condition at \(t={\text {t}}_{\mathfrak {f}}\) for \({\text {f}}_{{{\text {t}}}_{0}}^{(n:0)}\) at this stage: we will need to impose it on a slower time scale, in this way exploiting the additional freedom provided by the multiscale approach.

6.2.3 Solution of the Problem at Order One

By expanding Eq. (36a) at order one in \(\varepsilon \), one gets

$$ \begin{aligned} \partial _{{\text {t}}_{0}} {\text {f}}_{{{\text {t}}}_{0}} ^{(n:1)}&+\partial _{{\text {t}}_{1}}{\text {f}}_{{{\text {t}}}_{0}}^{(n:0)} +n \,{\text {f}}_{{{\text {t}}}_{0}}^{(n:1)} + \left( n+1\right) \partial _{{\text {q}}} {\text {f}}_{{{\text {t}}}_{0}}^{(n+1:0)}+\left( \partial _{{\text {q}}} +\left( \partial _{{\text {q}}} {\text {U}}_{{{\text {t}}}_{0}}^{(0)}\right) \right) {\text {f}}_{{{\text {t}}}_{0}}^{(n-1:0)}=0\,. \end{aligned} $$

The boundary conditions for the probability density force all terms of order higher than zero in \(\varepsilon \) vanish at \(t=0\) and \(t={\text {t}}_{\mathfrak {f}}\). This is a consequence of our assumption that the protocol starts and ends in equilibrium states, which cannot depend on the relaxation time scale \(\varepsilon \). They must coincide with the stationary states of the overdamped limit \(\varepsilon \rightarrow 0\). The \(n=0\) case of Eq. (6.2.3), by recalling Eq. (75), implies therefore that \({\text {f}}_{{{\text {t}}}_{0}} ^{(0:0)}\) is independent of \({\text {t}}_{1}\), hence

$$\begin{aligned} {\text {f}}^{(0:0)}_{{{\text {t}}}_{0}}={\text {f}}_{0,{{\text {t}}}_{1}}^{(0:0)}={\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}\,, \end{aligned}$$
(79)

where we have introduced the notation

$$\begin{aligned} {\text {f}}_{{\text {t}}_{0};{{\text {t}}}_{2}}\equiv {\text {f}}_{{\text {t}}_{0},0,{{\text {t}}}_{2}}\,. \end{aligned}$$
(80)

Similarly, the equations with \(n \ge 2\) lead to

$$\begin{aligned} {\text {f}}^{(n:1)}_{{{\text {t}}}_{0}}=0\,,\quad \quad n\ge 2\,. \end{aligned}$$
(81)

The case \(n=1\) is less trivial and brings about the relation

$$\begin{aligned} \partial _{{\text {t}}_{0}} {\text {f}}_{{{\text {t}}}_{0}}^{(1:1)}+{\text {f}}_{{{\text {t}}}_{0}}^{(1:1)}+\partial _{{\text {q}}} {\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)} +{\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}\partial _{{\text {q}}} {\text {U}}^{(0)}_{{{\text {t}}}_{0}}=0\,. \end{aligned}$$
(82)

Similarly, the value function equation (36b) at order one, for the case \(n=1\), gives

$$\begin{aligned} \begin{aligned}&\left( \partial _{{\text {t}}_{0}}-1\right) v^{(1:1)}_{{{\text {t}}}_{0}}=-\partial _{{\text {q}}} v^{(0:0)}_{{{\text {t}}}_{0}}-2\left( \partial _{{\text {q}}} +\big (\partial _{{\text {q}}} {\text {U}}_{{{\text {t}}}_{0}}^{(0)}\big )\right) v^{(2:0)}_{{{\text {t}}}_{0}}\,. \end{aligned} \end{aligned}$$
(83)

Once complemented with a condition for the drift \(\partial _{{\text {q}}} U^{(0)}_{{{\text {t}}}_{0}}\), Eqs. (82) and (83) form a closed system of differential equations. The missing relation can be obtained from the stationarity condition (36c), which at order one in \(\varepsilon \) reads

$$\begin{aligned} \begin{aligned} g\, {\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)} \partial _{{\text {q}}} v^{(0:0)}_{{{\text {t}}}_{0}}+{\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)} v^{(1:1)}_{{{\text {t}}}_{0}}+2 \,{\text {f}}_{{{\text {t}}}_{0}}^{(1:1)} v^{(2:0)}_{{{\text {t}}}_{0}}= {\left\{ \begin{array}{ll} \dfrac{1+g}{2}\,{\text {f}}_{{\text {t}}_{0}\,;{{\text {t}}}_{2}}^{(0:0)} \,\partial _{{\text {q}}} {\text {U}}^{(0)}_{{{\text {t}}}_{0}}\quad & {\textbf {[KL]}} \\ 2\,g \,{\text {f}}_{{\text {t}}_{0};{{\text {t}}}_{2}}^{(0:0)}\, \partial _{{\text {q}}} {\text {U}}^{(0)}_{{{\text {t}}}_{0}}+g\,\partial _{{\text {q}}} {\text {f}}^{(0:0)}_{{\text {t}}_{0},{{\text {t}}}_{2} }\,.\quad & {\textbf {[EP]}} \end{array}\right. } \end{aligned} \end{aligned}$$
(84)

Eq. (84) provides an expression for the drift, which can be inserted into Eq. (82) to obtain a relation for \(v^{(1:1)}_{{{\text {t}}}_{0}}\) (see Eq. (140) in Appendix F). The system is then solved by differentiating the resulting equation with respect to \({\text {t}}_{0}\), and eliminating \(\partial _{{\text {t}}_{0}}v^{(1:1)}_{{{\text {t}}}_{0}}\) through (83) and \(v^{(1:1)}_{{{\text {t}}}_{0}}\) through (140). A second-order ODE for \({\text {f}}_{{{\text {t}}}_{0}}^{(1:1)}\) is found:

$$\begin{aligned} \partial _{{\text {t}}_{0}}^2 {\text {f}}_{{{\text {t}}}_{0}}^{(1:1)}-\omega ^2 \, {\text {f}}_{{{\text {t}}}_{0}}^{(1:1)} = F_{{{\text {t}}}_{0}}\,, \end{aligned}$$
(85)

with \(\omega \) as defined in (48). The dependence of \(F_{{{\text {t}}}_{0}}({\text {q}})\) on \({\text {t}}_{0}\) is known; for its explicit expression, see Eq. (141). The equation can be solved by recalling that the Green function for the second order differential equation (85) is

$$\begin{aligned} G_{t,s}=J_{t,s}+J_{s,t} \end{aligned}$$
(86)

with

$$ J_{t,s}=-\theta \,(t-s)\,\dfrac{\sinh \left( \omega ({\text {t}}_{\mathfrak {f}}-t)\right) \,\sinh \left( \omega s\right) }{\omega \sinh \left( \omega {\text {t}}_{\mathfrak {f}}\right) }\,, $$

with \(\theta (\cdot )\) being the Heaviside step-function. By introducing the notation

$$\begin{aligned} G^{(k)}_t=\int _{0}^{{\text {t}}_{\mathfrak {f}}}\text {d}s \, G_{t,s}\, e^{-k({\text {t}}_{\mathfrak {f}}-s)}\,, \end{aligned}$$
(87)

one obtains for \({\text {f}}_{{{\text {t}}}_{0}}^{(1:1)}\) the relation

$$\begin{aligned} \begin{aligned} {\text {f}}_{{\text {t}}_{0};{{\text {t}}}_{2}}^{(1:1)}&= \omega ^2 \,G^{(0)}_{{\text {t}}_{0}}\,{\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)} \,\partial _{{\text {q}}} \zeta _{{{\text {t}}}_{2}}+{\left\{ \begin{array}{ll} \dfrac{4}{1+g}\,\partial _{{\text {q}}} \left( v^{(2:0)}_{{\text {t}}_{\mathfrak {f}};{{\text {t}}}_{2}} \,{\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}\right) \, G^{(2)}_{{\text {t}}_{0}} \quad & {\textbf {[KL]}} \\ \dfrac{1}{g}\,\partial _{{\text {q}}} \left( v^{(2:0)}_{{\text {t}}_{\mathfrak {f}};{{\text {t}}}_{2}} \,{\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}-\dfrac{{\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}}{2}\right) G^{(2)}_{{\text {t}}_{0}} \quad & {\textbf {[EP]}} \end{array}\right. } \end{aligned} \end{aligned}$$
(88)

where

$$\begin{aligned} \zeta _{{\text {t}}_{2}}({\text {q}})={\left\{ \begin{array}{ll} 2\, v_{{\text {t}}_{\mathfrak {f}};{{\text {t}}}_{2}}^{(0:0)}({\text {q}})+{\text {U}}_{\star }({\text {q}})+\ln {\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}({\text {q}}) \quad & {\textbf {[KL]}} \\ \dfrac{ 1}{2}\left( v_{{\text {t}}_{\mathfrak {f}};{{\text {t}}}_{2}}^{(0:0)}({\text {q}})+\ln {\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}\right) ({\text {q}})\,,\quad & {\textbf {[EP]}} \end{array}\right. } \end{aligned}$$
(89)

and a notation analogous to (80) is adopted also for the value function. The last step of the solution of the order \(\varepsilon ^{1}\) consists in writing the optimal control potential as a function of (88). From Eq. (82) we find

$$\begin{aligned} \partial _{{\text {q}}} {\text {U}}_{{{\text {t}}}_{0}}^{(0)}({\text {q}})=-\frac{\partial _{{\text {q}}}{\text {f}}_{0;{{\text {t}}}_{2}}^{(0,0)}({\text {q}})+\partial _{{\text {t}}_{0}}{\text {f}}_{{\text {t}}_{0};{{\text {t}}}_{2}}^{(1:1)}({\text {q}})+{\text {f}}_{{\text {t}}_{0};{{\text {t}}}_{2}}^{(1:1)}({\text {q}})}{{\text {f}}_{0;{{\text {t}}}_{2}}^{(0,0)}({\text {q}})}\,. \end{aligned}$$
(90)

Since there are no equations for \(\partial _{{\text {t}}_{1}}{\text {f}}_{{{\text {t}}}_{0}}^{(1:1)}\) nor \(\partial _{{\text {t}}_{1}}v^{(1:1)}_{{{\text {t}}}_{0}}\), i.e. no secular terms are found on the time scale \({\text {t}}_{1}\), we can assume the solution to be independent of \({\text {t}}_{1}\). Once \({\text {f}}_{{{\text {t}}}_{0}}^{(1:1)}\) is known, an explicit expression for \(v^{(1:1)}_{{{\text {t}}}_{0}}\) can also be found from (83) (see Eq. (140) in Appendix F). From the above equation it is possible to derive the expression (65) for the optimal drift, by using the expressions of \({\text {f}}_{{\text {t}}_{0};{{\text {t}}}_{2}}^{(0:0)}\) and \({\text {f}}_{{\text {t}}_{0};{{\text {t}}}_{2}}^{(1:1)}\) that will be found in the next subsection.

6.2.4 Solution of the Problem at Order Two

The order-two expansion of (36a) provides the following relations

$$\begin{aligned} \partial _{{\text {t}}_{0}}{\text {f}}_{{{\text {t}}}_{0}}^{(0:2)}+\partial _{{\text {t}}_{2}}{\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}= & -\partial _{{\text {q}}} {\text {f}}_{{\text {t}}_{0};{{\text {t}}}_{2}}^{(1:1)} +g\,\partial _{{\text {q}}}^{2} {\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)} + g \,\partial _{{\text {q}}}\left( {\text {f}}_{{\text {t}}_{0};{{\text {t}}}_{2}}^{(0:0)} \,\partial _{{\text {q}}} {\text {U}}^{(0)}_{{\text {t}}_{0};{{\text {t}}}_{2}}\right) \quad \end{aligned}$$
(91a)
$$\begin{aligned} \partial _{{\text {t}}_{0}}{\text {f}}_{{{\text {t}}}_{0}}^{(1:2)}+ {\text {f}}_{{{\text {t}}}_{0}}^{(1:2)}= & - \partial _{{\text {q}}} {\text {f}}_{{{\text {t}}}_{0};{{\text {t}}}_{2}}^{(0:1)}-{\text {f}}_{{\text {t}}_{0};{{\text {t}}}_{2}}^{(0:0)}\,\partial _{{\text {q}}} {\text {U}}_{{{\text {t}}}_{0}}^{(1)} \quad \end{aligned}$$
(91b)
$$\begin{aligned} \partial _{{\text {t}}_{0}}{\text {f}}_{{{\text {t}}}_{0}}^{(2:2)}+2\, {\text {f}}_{{{\text {t}}}_{0}}^{(2:2)}= & - \partial _{{\text {q}}} {\text {f}}_{{\text {t}}_{0};{{\text {t}}}_{2}}^{(1:1)}-{\text {f}}_{{\text {t}}_{0};{{\text {t}}}_{2}}^{(1:1)}\,\partial _{{\text {q}}} {\text {U}}_{{\text {t}}_{0};{{\text {t}}}_{2}}^{(0)} \quad \end{aligned}$$
(91c)
$$\begin{aligned} \partial _{{\text {t}}_{0}}{\text {f}}_{{{\text {t}}}_{0}}^{(n:2)}+n \,{\text {f}}_{{{\text {t}}}_{0}}^{(n:2)}= & 0,\qquad n>2. \quad \end{aligned}$$
(91d)

The last equation (91d) ensures that all terms \({\text {f}}_{{{\text {t}}}_{0}}^{(n:2)}\) with \(n>2\) vanish once equilibrium boundary conditions are taken into account. Equation (91b) provides a relation for \({\text {f}}_{{{\text {t}}}_{0}}^{(1:2)}\) that requires knowledge of \(\partial _{{\text {q}}} {\text {U}}^{(1)}_{{{\text {t}}}_{0}}\). If we expand the stationary condition (36c) to second order in \(\varepsilon \) and assume that all \(v_{{{\text {t}}}_{0}}^{(n:0)} \), \(v_{{{\text {t}}}_{0}}^{(n:1)} \) that are not needed to control the non-vanishing \({\text {f}}_{{{\text {t}}}_{0}}^{(n:2)}\)’s can be set to zero, we get

$$\begin{aligned} \partial _{{\text {q}}} {\text {U}}^{(1)}_{{{\text {t}}}_{0}}= {\left\{ \begin{array}{ll}\frac{2}{g+1}\left( v_{{{\text {t}}}_{0}}^{(1:2)}+\frac{2\, {\text {f}}_{{{\text {t}}}_{0}}^{(1:2)}\,v_{{{\text {t}}}_{0}}^{(2:0)}}{{\text {f}}_{{{\text {t}}}_{0}}^{(0:0)}}\right) \quad & {\textbf {[KL]}} \\ \frac{\omega ^{2}-1}{2}\left( v_{{{\text {t}}}_{0}}^{(1:2)}+\frac{2\, {\text {f}}_{{{\text {t}}}_{0}}^{(1:2)}\,v_{{{\text {t}}}_{0}}^{(2:0)}}{{\text {f}}_{{{\text {t}}}_{0}}^{(0:0)}}\right) \,. \quad & {\textbf {[EP]}} \end{array}\right. } \end{aligned}$$

We insert this result into (91b) and the corresponding equation for \(v_{{{\text {t}}}_{0}}^{(1:2)} \), and after straightforward, albeit tedious, algebra we arrive at

$$\begin{aligned} \partial _{{\text {t}}_{0}}{\text {f}}_{{{\text {t}}}_{0}}^{(1:2)}-\omega ^{2}\,{\text {f}}_{{{\text {t}}}_{0}}^{(1:2)}=0\,. \end{aligned}$$

Taking into account the boundary conditions, we get

$$\begin{aligned} {\text {f}}_{0,{{\text {t}}}_{1}}^{(1:2)}={\text {f}}_{{\text {t}}_{\mathfrak {f}},{{\text {t}}}_{1}}^{(1:2)}=0 \end{aligned}$$

and we conclude that for any \({\text {t}}_{0}\),

$$\begin{aligned} {\text {f}}_{{\text {t}}_{0},{{\text {t}}}_{1}}^{(1:2)}=0\,. \end{aligned}$$

The same applies to \(v_{{\text {t}}_{0},{{\text {t}}}_{1}}^{(1:2)}\).

Let us focus first on Eq. (91c). Integrating over \({\text {t}}_{0}\), one has

$$ {\text {f}}^{(2:2)}_{{{\text {t}}}_{0}}=-\int _{0}^{{\text {t}}_{0}}\text {d}{\text {s}}\, e^{-2({\text {t}}_{0}-{\text {s}})}\left( \partial _{{\text {q}}}{\text {f}}_{{\text {s}};{{\text {t}}}_{2}}^{(1:1)}+{\text {f}}_{{\text {s}};{{\text {t}}}_{2}}^{(1:1)}\partial _{{\text {q}}} {\text {U}}_{{\text {s}};{{\text {t}}}_{2}}^{(0)}\right) \,. $$

By substituting the expression of the drift obtained from Eq. (90) and integrating the term proportional to \(\partial _s{\text {f}}_{{\text {s}};{{\text {t}}}_{2}}^{(1:1)}\) by parts, we find

$$ {\text {f}}^{(2:2)}_{{\text {t}}_{0};{{\text {t}}}_{2}}=\dfrac{\left( {\text {f}}_{{\text {t}}_{0};{{\text {t}}}_{2}}^{(1:1)}\right) ^{2}}{2\,{\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}}-{\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}\int _{0}^{{\text {t}}_{0}}\text {d}{\text {s}}\, e^{-2({\text {t}}_{0}-{\text {s}})}\partial _{{\text {q}}} \left( \dfrac{{\text {f}}_{{\text {s}};{{\text {t}}}_{2}}^{(1:1)}}{{\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}}\right) \,, $$

which is Eq. (63). This relation implies, recalling the boundary conditions, that

$$\begin{aligned} \int _{0}^{{\text {t}}_{\mathfrak {f}}}\text {d}{\text {s}}\, e^{-2\,({\text {t}}_{\mathfrak {f}}-{\text {s}})}\,\partial _{{\text {q}}} \left( \dfrac{{\text {f}}_{{\text {s}};{{\text {t}}}_{2}}^{(1:1)}}{{\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}}\right) =0\,. \end{aligned}$$
(92)

By substituting Eq. (88), an equation for the term \(\partial _{{\text {q}}}\left( v^{(2:0)}_{{\text {t}}_{\mathfrak {f}};{{\text {t}}}_{2}} \,{\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}\right) \) can be derived (see Eq. (142) in Appendix F). Once plugged back into Eq. (88) itself, it yields

$$\begin{aligned} {\text {f}}_{{\text {t}}_{0};{{\text {t}}}_{2}}^{(1:1)}({\text {q}})=-{\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}\left( a_{{\text {t}}_{0}}\, (\partial \zeta _{{{\text {t}}}_{2}})({\text {q}})-b_{{\text {t}}_{0}}\,\kappa _{{{\text {t}}}_{2}} \right) \,. \end{aligned}$$
(93)

Here we introduce the functions whose explicit expression we gave in (54)

$$\begin{aligned}&a_{{\text {t}}_{0}}=-\omega ^2\,\left( G^{(0)}_{{\text {t}}_{0}}-\frac{G^{(0:2)}}{G^{(2:2)}}\,G^{(2)}_{{\text {t}}_{0}}\right) \\&b_{{\text {t}}_{0}}=\omega ^2\,\frac{G^{(0:2)}}{G^{(2:2)}}\,G^{(2)}_{{\text {t}}_{0}}\,. \end{aligned}$$

By (87) the two functions \(a_{{\text {t}}_{0}}\) and \(b_{{\text {t}}_{0}}\) are non homogeneous solution of the unstable oscillator equation weighed by constant coefficient also depending upon integrals over the Green function

$$\begin{aligned} G^{(k:l)}=\int _{0}^{{\text {t}}_{\mathfrak {f}}}\text {d}s\, e^{-l({\text {t}}_{\mathfrak {f}}-s)}\,G^{(k)}_s\,. \end{aligned}$$
(94)

In (93) we also introduce

$$\begin{aligned} \kappa _{{{\text {t}}}_{2}}=\int _{\mathbb {R}}\text {d}{\text {q}}\, {\text {f}}_{{\text {t}}_{0};{{\text {t}}}_{2}}^{(0:0)}({\text {q}})\, (\partial \zeta _{{{\text {t}}}_{2}})({\text {q}})\,, \end{aligned}$$
(95)

where we use the function \(\zeta _{{{\text {t}}}_{2}}\) defined in Eq. (89). Equation (93) will be crucial in the following, as it allows to write a closed system of differential equations for \({\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}\) and \(v^{(0:0)}_{{\text {t}}_{\mathfrak {f}};{{\text {t}}}_{2}}\), which can be reshaped as in Eqs. (44).

Taking into account the boundary conditions and Eq. (90), Eq. (91a) can be integrated over \({\text {t}}_{0}\) to give

$$\begin{aligned} \partial _{{\text {t}}_{2}}{\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}+\frac{g+1}{{\text {t}}_{\mathfrak {f}}}\int _{0}^{{\text {t}}_{\mathfrak {f}}}\text {d}{\text {s}}\, \partial _{{\text {q}}}{\text {f}}_{{\text {s}};{{\text {t}}}_{2}}^{(1:1)}=0\,. \end{aligned}$$
(96)

If we now substitute Eq. (93) we get

$$\begin{aligned} \partial _{{\text {t}}_{2}}{\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}=A\,\partial _{{\text {q}}}\left( {\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)} \big (\partial _{{\text {q}}}\zeta _{{{\text {t}}}_{2}}\big )\right) -B\kappa _{{{\text {t}}}_{2}}\partial _{{\text {q}}}{\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)} \end{aligned}$$
(97)

where

$$\begin{aligned} A= & \frac{g+1}{{\text {t}}_{\mathfrak {f}}}\int _{0}^{{\text {t}}_{\mathfrak {f}}}\text {d}{\text {s}}\,a_{{\text {s}}} =-\dfrac{\omega ^2\,(1+g)}{{\text {t}}_{\mathfrak {f}}}\left( G^{(0:0)}-\dfrac{\left( G^{(0:2)}\right) ^2}{G^{(2:2)}}\right) \end{aligned}$$
(98a)
$$\begin{aligned} B= & \frac{g+1}{{\text {t}}_{\mathfrak {f}}}\int _{0}^{{\text {t}}_{\mathfrak {f}}}\text {ds} \,b_{{\text {s}}}=\dfrac{\omega ^2\,(1+g)}{{\text {t}}_{\mathfrak {f}}}\,\dfrac{\left( G^{(0:2)}\right) ^2}{G^{(2:2)}} . \end{aligned}$$
(98b)

The above relations lead to Eq. (47).

We now need to find an equation for \(\zeta _{{{\text {t}}}_{2}}\) in order to close the differential system and find the \({\text {t}}_{2}\)-dependence of \({\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}\). To this aim, we consider the case \(n=0\) for the expansion of Eq. (36b) at order two in \(\varepsilon \). It reads

$$\begin{aligned} \begin{aligned} \partial _{{\text {t}}_{0}}v_{{\text {t}}_{0};{{\text {t}}}_{2}}^{(0:2)}+&\partial _{{\text {t}}_{2}}v_{{\text {t}}_{\mathfrak {f}};{{\text {t}}}_{2}}^{(0:0)}+\left( \partial _{{\text {q}}} -(\partial _{{\text {q}}} {\text {U}}_{{\text {t}}_{0};{{\text {t}}}_{2}}^{(0)})\right) \left( v_{{\text {t}}_{0};{{\text {t}}}_{2}}^{(1:1)}+g\,\partial _{{\text {q}}} v_{{\text {t}}_{\mathfrak {f}};{{\text {t}}}_{2}}^{(0:0)}\right) \\ &\qquad ={\left\{ \begin{array}{ll} -\dfrac{g+1}{4}\left( \partial _{{\text {q}}}\big ({\text {U}}_{{\text {t}}_{0};{{\text {t}}}_{2}}^{(0)}- {\text {U}}_{\star }\big )\right) ^2\quad & {\textbf {[KL]}} \\ -g \left( \big (\partial _{{\text {q}}} {\text {U}}^{(0)}_{{\text {t}}_{0};{{\text {t}}}_{2}}\big )^2-\partial _{{\text {q}}}^2{\text {U}}_{{\text {t}}_{0};{{\text {t}}}_{2}}\right) \,.\quad & {\textbf {[EP]}} \end{array}\right. } \end{aligned} \end{aligned}$$
(99)

We integrate the above equation over \({\text {t}}_{0}\). By substituting (90) and making repeated use of Eqs. (85), (93) and (92) (see Appendix F for details), one finds

$$\begin{aligned} \begin{aligned} \partial _{{\text {t}}_2}\zeta _{{{\text {t}}}_{2}}&=\frac{A-B}{2}(\partial _{{\text {q}}}\zeta _{{{\text {t}}}_{2}})^2+\frac{B}{2}\left( \partial _{{\text {q}}}\zeta _{{{\text {t}}}_{2}}-\kappa _{{{\text {t}}}_{2}}\right) ^2+\frac{\alpha ^2}{A} \left( W_{\star }+ \frac{\partial _{{\text {q}}}^2{\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}}{\big ({\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}\big )^2} -\frac{1}{2}\left( \frac{\partial _{{\text {q}}}{\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}}{{\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}}\right) ^2\right) \,, \end{aligned} \end{aligned}$$
(100)

which is the closure equation for \(\zeta _{{{\text {t}}}_{2}}\). The constant \(\alpha \) is defined by Eq. (46).

The differential system for \({\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}\) and \(\zeta _{{{\text {t}}}_{2}}\) can be rewritten in a much more convenient form by introducing the auxiliary field

$$\begin{aligned} \begin{aligned} \sigma _{{{\text {t}}}_{2}}({\text {q}})&=A \,\zeta _{{{\text {t}}}_{2}}({\text {q}})-\alpha \ln {\text {f}}_{0;{{\text {t}}}_{2}}^{(0:0)}({\text {q}}) -B\,\left( {\text {q}}\,\kappa _{{{\text {t}}}_{2}}+\frac{A-B}{2}\int _{0}^{{\text {t}}_{2}}\text {d}{\text {s}}\, \kappa ^2_{{\text {s}},{{\text {t}}}_{3}}\right) \,. \end{aligned} \end{aligned}$$
(101)

Indeed, taking into account Eq. (149), it is easy to verify that Eqs. (97) and (100) are amenable to the form (44). Let us stress that, in terms of the field \(\sigma \), Eq. (97) becomes

$$\begin{aligned} \kappa _{{{\text {t}}}_{2}}=\frac{1}{A-B}\int _{\mathbb {R}}\text {d}{\text {q}}\, {\text {f}}_{{\text {t}}_{0};{{\text {t}}}_{2}}^{(0:0)}({\text {q}}) \,(\partial \sigma _{{{\text {t}}}_{2}})({\text {q}})\,. \end{aligned}$$
(102)

Upon inserting this identity,  (101), and (51), in (93), we recover the expression (53).

Finally, by plugging Eqs. (96) and  (90) in Eq. (91a) one gets:

$$ \partial _{{\text {t}}_{0}} {\text {f}}_{{{\text {t}}}_{0}}^{(0:2)} -\dfrac{1+g}{{\text {t}}_{\mathfrak {f}}}\int _{0}^{{\text {t}}_{\mathfrak {f}}}\text {d}{\text {s}}\, \partial _{{\text {q}}} {\text {f}}_{{\text {s}};{{\text {t}}}_{2}}^{(1:1)}=-(1+g)\,\partial _{{\text {q}}}{\text {f}}_{{{\text {t}}}_{0}}^{(1:1)}-g\partial _{{\text {t}}_{0}}\partial _{{\text {q}}} {\text {f}}_{{{\text {t}}}_{0}}^{(1:1)}\,. $$

Integrating over \({\text {t}}_{0}\) leads to Eq. (58).

7 Analytic Results for the Gaussian Case

As discussed in Sect. 6.1 and shown analytically in Sect. 6.2, in order to find the explicit solution of the optimal problem, one first needs to address the differential system (44). In most cases, the solution can only be found numerically: this is discussed in the next Section. However, if the assigned initial and final conditions are Gaussian probability density functions (meaning that the particle is subject to harmonic confinement), the solution can be found analytically.

To do this, we plug a Gaussian ansatz for the density and a parabolic one for \(\sigma _{{\text {t}}_{2}}\), namely

$$\begin{aligned} \rho _{{\text {t}}_{2}}= & \frac{1}{\sqrt{2\, \pi \,\varsigma _{{\text {t}}_{2}}}}\exp \left( -\frac{({\text {q}}-\mu _{{\text {t}}_{2}}^{(1)})^2}{2 \,\varsigma _{{\text {t}}_{2}}}\right) \end{aligned}$$
(103a)
$$\begin{aligned} \sigma _{{\text {t}}_{2}}= & \sigma ^{(0)}_{{\text {t}}_{2}}+\sigma ^{(1)}_{{\text {t}}_{2}}{\text {q}}+\sigma ^{(2)}_{{\text {t}}_{2}}{\text {q}}^2 \end{aligned}$$
(103b)

where \(\mu ^{(1)}\) and \(\mu ^{(2)}\) are consistent with Eq. (51), into Eqs. (44).

Next, we solve for the coefficients, taking into account the boundary conditions. The derivation is straightforward and not carried out here. For both cases KL and EP, and \({\text {U}}_{\star }=0\), the explicit expressions for the relevant coefficients appearing in Eqs. (103) are

$$\begin{aligned} \mu _{{\text {t}}_{2}}^{(1)}&=\mu ^{(1)}_{0}+\frac{{\text {t}}_{2}}{\varepsilon ^2 {\text {t}}_{\mathfrak {f}}}\left( \mu ^{(1)}_{\varepsilon ^2 {\text {t}}_{\mathfrak {f}}}-\mu ^{(1)}_{0}\right) \\ \varsigma _{{\text {t}}_{2}}&=\frac{({\text {t}}_{2}-\varepsilon ^2 {\text {t}}_{\mathfrak {f}})^{2}\,\varsigma _{0} +{\text {t}}_{2} \left( 2 \, (\varepsilon ^2 \,{\text {t}}_{\mathfrak {f}}-{\text {t}}_{2})\,\lambda _{\varepsilon ^2 {\text {t}}_{\mathfrak {f}}}+{\text {t}}_{2}\, \varsigma _{\varepsilon ^2 {\text {t}}_{\mathfrak {f}}}\right) }{\varepsilon ^4 {\text {t}}_{\mathfrak {f}}^2}\\ \sigma _{{\text {t}}_{2}}^{(1)}&=\frac{\mu ^{(1)}_{0} \left( \varsigma _{\varepsilon ^2 {\text {t}}_{\mathfrak {f}}}-\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}\,\alpha +\lambda _{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\right) -\mu ^{(1)}_{\varepsilon ^2 {\text {t}}_{\mathfrak {f}}} \left( \varsigma _{0}+\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}\,\alpha +\lambda _{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}\right) }{\varepsilon ^4\, {\text {t}}_{\mathfrak {f}}^2\,\varsigma _{{\text {t}}_{2}}} \end{aligned}$$

where

$$\begin{aligned} \lambda _{\varepsilon ^2 {\text {t}}_{\mathfrak {f}}}=\sqrt{\varepsilon ^{4}\,{\text {t}}_{\mathfrak {f}}^{2}\,\alpha ^{2}\,+\varsigma _{0} \,\varsigma _{\varepsilon ^2 {\text {t}}_{\mathfrak {f}}}} \end{aligned}$$

and for \(\dot{\varsigma }_{{\text {t}}_{2}}=\partial _{{\text {t}}_{2}}\varsigma _{{\text {t}}_{2}}\)

$$\begin{aligned} \sigma _{{\text {t}}_{2}}^{(2)}=\frac{2\,\alpha -\dot{\varsigma }_{{\text {t}}_{2}}}{2\,\varsigma _{{\text {t}}_{2}}} \end{aligned}$$
(104)

Knowing these coefficients allows us to compute the cumulants discussed in Sect. 6.1.2 for the general case.

It is worth noticing that these results result in a remarkably simple expression for mean entropy production at \(g=0\)

$$\begin{aligned} \mathcal {E}=\frac{\left( \mu ^{(1)}_{\varepsilon ^2 {\text {t}}_{\mathfrak {f}}}-\mu ^{(1)}_{0}\right) ^{2}+\left( \sqrt{\varsigma _{\varepsilon ^{2}{\text {t}}_{\mathfrak {f}}}}-\sqrt{\varsigma _{0}}\right) ^{2}}{2\,\varepsilon ^2 {\text {t}}_{\mathfrak {f}}}\,. \end{aligned}$$

When

$$\begin{aligned} {\text {U}}_{\star }={\text {U}}_{\star }^{(1)}{\text {q}}+\frac{1}{2}{\text {U}}_{\star }^{(2)}{\text {q}}^{2} \end{aligned}$$

(104) remains valid, whereas it is possible to close the hierachy with a second order equation for the variance of the position process

$$\begin{aligned} 2\,\varsigma _{{\text {t}}_{2}}\,\ddot{\varsigma }_{{\text {t}}_{2}}-\left( \dot{\varsigma }_{{\text {t}}_{2}}\right) ^{2}-4\,\alpha ^{2}\left( {\text {U}}_{\star }^{(2)}\,\varsigma _{{\text {t}}_{2}}-1\right) =0 \end{aligned}$$
(105)

The general solution of this equation takes the form

$$\begin{aligned} \varsigma _{{\text {t}}_{2}}=\frac{ c_{1}\,e^{2\,\alpha \,{\text {U}}_{\star }^{(2)}\,{\text {t}}_{2}}+c_{2}\,e^{-2\,\alpha \,{\text {U}}_{\star }^{(2)}\,{\text {t}}_{2}}+c_{3}}{{\text {U}}_{\star }^{(2)}} \end{aligned}$$
(106)

with the constants \(c_{i}\), \(i=1,2,3\), related by the algebraic equation

$$\begin{aligned} 4\,c_{1}\,c_{2}+1-c_{3}^{2}=0 \end{aligned}$$

Unfortunately resolving the \(c_{i}\)’s in terms of generic boundary conditions leads to somewhat cumbersome expressions. In Sect. 8.1.1 we consider a special case of particular relevance.

8 Numerically Assisted Applications

In this section, we apply numerical methods to the multiscale expansion to analyze the underdamped dynamics, both in the case of Gaussian boundary conditions and in more complex boundary conditions, in particular, those modelling Landauer’s one bit of memory erasure.

In the Gaussian case, we have a system of differential equations specifying the non-perturbative solution, and we can therefore use numerical integration to solve the associated boundary value problems, from which we can obtain the first and second order phase space cumulants. We then use the perturbative approach to compute the same values, which show good agreement: see Figs. 3 for case KL and  4 for case EP. Additionally, we take a look at expansion and compression with Gaussian boundary conditions in Sect. 8.1.1.

Furthermore, the perturbative approach can be used to make predictions for the cumulants when no analytic solution is available. We demonstrate this using boundary conditions modelling Landauer’s one bit of memory erasure, as illustrated in Fig. 1. This requires numerically solving the cell problem (50), from which we obtain the optimal control protocol and the marginal distribution of the position in the overdamped dynamics. We can then compute leading order corrections to approximate the quantities in the underdamped dynamics.

8.1 Gaussian Case

In cases KL and EP, when the boundary conditions are assigned as Gaussian random variables, we have two boundary value problems for the first and second order cumulants. For case KL, we compute approximate solutions to the systems (19) and (20), and, for case EP, we make the amendments as described in Sect. 4.2.

The perturbative approach follows Sect. 7, and instead we have only one boundary value problem. The dependant quantities: momentum mean, momentum variance and the position-momentum cross correlation, as well as the higher order corrections to the position mean and variance can then be computed.

The respective boundary value problems are integrated numerically using the DifferentialEquations.jl [104] library in the Julia programming language. The results of the perturbative and non-perturbative integrations for case KL are in Fig. 3 and for case EP are in Fig. 4. In both case KL and case EP, we see that the perturbative expansion gives a very good approximation of the true solution.

Fig. 3
figure 3

Position mean (a) and variance (b); position-momentum cross correlation (c); and momentum mean (d) and variance (e) for the underdamped problem minimising the Kullback–Leibler divergence (Case KL) from a free diffusion with assigned Gaussian initial and final conditions. We plot the expressions of cumulants up to second order predicted by our perturbative approach, solid dark blue line, and contrast them with the numeric solution of the corresponding non-perturbative equation of Sect. 4.1 shown with a dashed light blue line. To plot the perturbative expressions we use the exact solution of the cell problem given in Sect. 7 and then we determine the full perturbative prediction for each of the cumulants using the expressions given in Sect. 6.1.2. We impose Gaussian boundary conditions through the first and second order cumulants of the position and momentum (tildes denoting non-dimensional coordinates): at initial time \({\text {t}}= 0\), we set the position and momentum variance \(\tilde{\mathscr {Q}}_{0}=\tilde{\mathscr {P}}_{0}=1\), the position-momentum cross correlation \(\tilde{\mathscr {C}}_{0} = 0\); and the position and momentum means \({\text {E}}_{\mathcal {P}}\tilde{\varvec{\mathcalligra{q}}}_{{\text {t}}_{\iota }} ={\text {E}}_{\mathcal {P}}\tilde{\varvec{\mathcalligra{p}}}_{{\text {t}}_{\iota }} =0\). At final time \({\text {t}}= {\text {t}}_{\mathfrak {f}}\): the momentum variance \(\tilde{\mathscr {P}}_{{\text {t}}_{\mathfrak {f}}}=1\); the position-momentum cross correlation \(\tilde{\mathscr {C}}_{{\text {t}}_{\mathfrak {f}}} = 0\); the position variance \(\tilde{\mathscr {Q}}_{{\text {t}}_{\mathfrak {f}}}=1.7\); the momentum mean \( {\text {E}}_{\mathcal {P}}\tilde{\varvec{\mathcalligra{p}}}_{{\text {t}}_{\mathfrak {f}}} =0\); and the position mean \({\text {E}}_{\mathcal {P}}\tilde{\varvec{\mathcalligra{q}}}_{{\text {t}}_{\mathfrak {f}}} = \sqrt{2}\). We use \({\text {t}}_{\mathfrak {f}}=5\), \(\varepsilon =0.2\) and \(g=0\). Numerical integration is performed by a fourth order co-location method in the DifferentialEquations.jl library [104]

Fig. 4
figure 4

Position mean (a) and variance (b); position-momentum cross correlation (c); and momentum mean (d) and variance (e) for the underdamped problem minimising the entropy production EP from a free diffusion with assigned Gaussian initial and final conditions. We use \({\text {t}}_{\mathfrak {f}}= 5\), \(\varepsilon = 0.2\), and compare the values computed by the perturbative approach (solid lines) with the numeric solution of the non-perturbative system at \(g=0.5\) (blue, dashed) and \(g=0.1\) (green, dotted), and \(\omega = \sqrt{(1+g)/g}\). We impose Gaussian boundary conditions through the first and second order cumulants of the position and momentum. We use the same values for the boundary conditions and the same numerical integration method as in Fig. 3. We compute the perturbative predictions in the same way as explained in the caption of Fig. 3. The equations of the non-perturbative system are those of Sect. 4.2

8.1.1 Asymmetry in Optimal Approaches to Equilibrium

Fig. 5
figure 5

Thermal kinematics in the underdamped dynamics. We compare a compression (blue) and expansion (orange) process starting from thermodynamically equidistant states from the final state. We fix the final position variance as \(\mathscr {Q}_{{t}_{\mathfrak {f}}} = 4\), the corresponding reference potential \(\mathscr {U}_{\star } = 1/4\), and \(\beta = 1\) in all panels. Panels (a)-(c) show the picture where the initial variances are chosen to be close together. We use \(\mathscr {Q}^{(c)}_{0} = 4.20\) for compression and \(\mathscr {Q}^{(e)}_{0} \approx 3.8065\) for expansion. For (a)-(b), we use \({\text {t}}_{\mathfrak {f}}=5\) and \(\varepsilon =0.1\). Panel (a) shows the variance of the position, with the solid lines computed non-perturbatively and the overlayed dashed lines computed using the linearized approach outlined in Sect. 8.1.1. Panel (b) shows the static Kullback–Leibler divergence (107), with the inset axes showing the difference between the compression and expansion process. Panel (c) shows the difference in the dynamic Kullback–Leibler divergence as a function of the time horizon \({\text {t}}_{\mathfrak {f}}\), with \(\varepsilon =0.5\). Panels (d)–(e) illustrate the case when the initial variances are chosen to be further apart. We use \(\mathscr {Q}^{(c)}_{0} \approx 10.3467\) for compression and \(\mathscr {Q}^{(e)}_{0} = 1\) for expansion. We use \({t}_{\mathfrak {f}}=5\) and \(\varepsilon =0.1\). Panel (d) shows the variances and (e) shows the static Kullback–Leibler divergence as functions of the time interval. Panel (f) shows the dynamic Kullback–Leibler divergence as a function of the time horizon \({\text {t}}_{\mathfrak {f}}\), with \(\varepsilon =0.5\). First order cumulants do not play a role in the analysis and are equal to 0 in all panels. All numerical integration is performed by DifferentialEquations.jl [104], as in Fig (3)

Very recently, [70, 71] highlighted the existence of a cooling versus heating asymmetry in the relaxation to a thermal equilibrium from hotter and colder states that are “thermodynamically equidistant”. Although not strictly a distance, the Kullback–Leibler divergence from the thermal state may be used to identify the dual processes [70]. We show that a similar asymmetry also occurs in optimally controlled isothermal compressions versus expansions of a small system.

To this goal we make the following observations. Choosing a reference potential \(U_{\star }\) in (4) equal to the potential in the final condition (3) forces the current velocity specified by the optimal protocol to be as small as possible at the end of the control horizon. In this sense, the optimal control problem models a relaxation to a thermal equilibrium in finite time. Well-established laboratory techniques [37, 105, 106] use the fact that the optical potential generated by a laser to trap a colloidal nanoparticle is effectively Gaussian. We combine these two observations to compare the compression versus the expansion of a nanosystem in an isothermal environment when the initial data are thermodynamically equidistant from the final equilibrium state. Mathematically, this means that the position marginals of the boundary conditions (2), (3) are centered Gaussians that differ only in the variance. In such a case, the only non-trivial optimal control equations are (19) and (21). Our aim is to compare a compression and an expansion process starting from “dual” initial states. Duality is with respect the Kullback–Leibler divergence from the end state whose value is initially the same for the two opposite processes. In the notation of Sect. 4 the Kullback–Leibler divergence for \(d=1\) reads

$$\begin{aligned} {\text {K}}(\tilde{{f}}_{t}\mathrel {\Vert } \tilde{{f}}_{{t}_{\mathfrak {f}}})=\frac{1}{2}\left( \frac{\mathscr {Q}_{t}}{\mathscr {Q}_{{t}_{\mathfrak {f}}}} -1-\ln \frac{\mathscr {Q}_{t}}{\mathscr {Q}_{{t}_{\mathfrak {f}}}}\right) \end{aligned}$$
(107)

We fix the terminal condition

$$\begin{aligned}&\mathscr {Q}_{{t}_{\mathfrak {f}}}^{(i)}=(\beta \,\mathscr {U}_{\star })^{-1}=:\mathscr {Q}_{\star },\qquad i=e,c \end{aligned}$$

and compare the evolution of probability densities specified by initial conditions at \({t}_{\iota }=0\)

$$\begin{aligned} \mathscr {Q}_{0}^{(e)}\,<\,\mathscr {Q}_{\star }\,<\,\mathscr {Q}_{0}^{(c)} \end{aligned}$$

such that the initial position marginals have equal Kullback–Leibler divergence from the final state

$$\begin{aligned} {\text {K}}(\tilde{{f}}_{0}^{(e)}\mathrel {\Vert } \tilde{{f}}_{\star })={\text {K}}(\tilde{{f}}_{0}^{(c)}\mathrel {\Vert } \tilde{{f}}_{\star }) \end{aligned}$$

The dynamic Schrödinger bridge with boundary conditions \((\mathscr {Q}_{0}^{(e)},\mathscr {Q}_{\star })\) / \((\mathscr {Q}_{0}^{(c)},\mathscr {Q}_{\star })\) provides a model of optimal expansion/compression of the system towards the equilibrium state characterized by \( \mathscr {Q}_{\star }\).

The multiscale prediction for the position variance is

$$\begin{aligned} \dfrac{\mathscr {Q}_{t}}{\ell ^{2}}=\varsigma _{\frac{\varepsilon ^{2}\,t}{\tau }} - \varepsilon ^{2}\,\frac{\dot{\varsigma }_{\frac{\varepsilon ^{2}\,t}{\tau }}}{A} \left( \frac{t}{{t}_{\mathfrak {f}}}\int _{0}^{\frac{{t}_{\mathfrak {f}}}{\tau }}\text {d}s -\int _{0}^{\frac{t}{\tau }}\text {d}s\right) a_{s}+O(\varepsilon ^{3}) \end{aligned}$$

where for the sake of simplicity we set \(g=0\). To relate non-dimensional quantities to their dimensional counterparts, we explicitly write the Stokes time \(\tau \) and the typical length-scale \(\ell \) of the transition. We suppose that the variance of the non-dimensional cell problem at the beginning of the control horizon is

$$\begin{aligned}&\varsigma _{0}=\frac{\textsf{v}}{{\text {U}}_{2}},\hspace{0.5cm} \hbox {with}\,{\text {U}}_{2}=\frac{\beta \,\mathscr {U}_{\star } }{\ell ^{2}} \end{aligned}$$

How much the non-dimensional constant \(\textsf{v}\) differs from unity controls the thermodynamic distance from the final state. In such a case we find that the coefficients \(c_{i}\)’s in (106) are

$$\begin{aligned}&c_{1}=y\,c_{2}\\&c_{2}=\frac{2 \,e^{2 \,\alpha \,\varepsilon ^{2} \,{\text {t}}_{\mathfrak {f}}\,{\text {U}}_2} \left( y\, e^{4\, \alpha \,\varepsilon ^{2} \, {\text {t}}_{\mathfrak {f}}{\text {U}}_2}+1\right) }{\left( y \,e^{4\, \alpha \,\varepsilon ^{2} \, {\text {t}}_{\mathfrak {f}}{\text {U}}_2}-1\right) ^2}\\&c_{3}=-\frac{1+6 \,e^{4 \,\alpha \,\varepsilon ^{2} \,{\text {t}}_{\mathfrak {f}}\,{\text {U}}_2}\,y+ e^{8 \,\alpha \,\varepsilon ^{2} \,{\text {t}}_{\mathfrak {f}}\,{\text {U}}_2} y^{2}}{\left( y \,e^{4\, \alpha \,\varepsilon ^{2} \, {\text {t}}_{\mathfrak {f}}{\text {U}}_2}-1\right) ^2} \end{aligned}$$

with

$$\begin{aligned} y&=\frac{2 \cosh \left( 2 \,\alpha \,\varepsilon ^{2} \,{\text {t}}_{\mathfrak {f}}\,{\text {U}}_2\right) -3}{\left( \textsf{v}+1\right) e^{4\, \alpha \,\varepsilon ^{2} \,{\text {t}}_{\mathfrak {f}}\,{\text {U}}_2}-2\, e^{2\, \alpha \,\varepsilon ^{2} \,{\text {t}}_{\mathfrak {f}}\,{\text {U}}_2}}\\&\qquad +\frac{\textsf{v}-2 \sqrt{2} \sinh \left( \alpha \,\varepsilon ^{2} \,{\text {t}}_{\mathfrak {f}}\,{\text {U}}_2\right) \sqrt{2\, \textsf{v}+\cosh \left( 2\, \alpha \,\varepsilon ^{2} \,{\text {t}}_{\mathfrak {f}}\,{\text {U}}_2\right) -1}}{\left( \textsf{v}+1\right) e^{4\, \alpha \,\varepsilon ^{2} \,{\text {t}}_{\mathfrak {f}}\,{\text {U}}_2}-2\, e^{2\, \alpha \,\varepsilon ^{2} \,{\text {t}}_{\mathfrak {f}}\,{\text {U}}_2}} \end{aligned}$$

The above expressions are exact and provide a useful benchmark for exact numerical integration of the cumulant hierarchy (see Fig 5).

For transitions describing small deformations of the position marginal of the system, it is however expedient to resort to simpler approximated expressions. We obtain these by linearizing (105) around the final condition of the transition. In other words, we look for a solution of the form

$$\begin{aligned} \varsigma _{{\text {t}}_{2}}=\frac{1}{{\text {U}}_{2}}+\varsigma _{{\text {t}}_{2}}^{\prime }+\dots \end{aligned}$$

with dots corresponding to higher order terms in the non-linearity. We obtain

$$\begin{aligned} \varsigma _{{\text {t}}_{2}}^{\prime }= -\frac{\left( \textsf{v}-1\right) e^{-2 \,\alpha \, {\text {t}}_{2}\, {\text {U}}_2} \left( e^{4\, \alpha \, {\text {t}}_{2}\, {\text {U}}_2}-e^{4\, \alpha \, \varepsilon ^{2}\,{\text {t}}_{\mathfrak {f}}\, {\text {U}}_2}\right) }{{\text {U}}_2 \left( e^{4\, \alpha \, \varepsilon ^{2}\,{\text {t}}_{\mathfrak {f}}\, {\text {U}}_2}-1\right) } \end{aligned}$$

This expression allows us to analytically compare the behavior of the divergence from a common end state of system undergoing an expansion and a compression. We see that if we choose

$$\begin{aligned} \textsf{v}^{(e)}=1-\eta \end{aligned}$$

for \(\eta \sim O(10^{-1})\) then within \(O(10^{-4})\) accuracy the initial data for the dual compression process is

$$\begin{aligned} \textsf{v}^{(c)}=1+\eta +\frac{2 \eta ^2}{3}+\frac{4 \eta ^3}{9}+\frac{44 \eta ^4}{135} +O(\eta ^{5}) \end{aligned}$$

A straightforward calculation then shows that within leading order accuracy

$$\begin{aligned}&{\text {K}}(\tilde{{f}}_{t}^{(c)}\Vert \tilde{{f}}_{\star })-{\text {K}}(\tilde{{f}}_{t}^{(e)}\Vert \tilde{{f}}_{\star }) \,\ge \, 0\,,\qquad \forall \,0\,\le \,t\,\le \,{\text {t}}_{\mathfrak {f}}\end{aligned}$$

The result holds analytically for small deformations of the potential \(\eta \ll 1\) and close to the overdamped limit \(\varepsilon \,\ll \,1\).

Another thermodynamic indicator encoding similar information is the cost of the dynamic Schrödinger bridge (4). This quantity is a global indicator of the transition that can be studied versus the duration of the horizon. Consistently with the analytic perturbative result the evaluation of (4) shows that the divergence from equilibrium is larger for compression processes. The difference between compression and expansion tends to zero as the duration of the horizon tends to infinity, thus indicating symmetry restoration for adiabatic processes.

Our findings are summarized in Fig. 5. Our analysis is in line with the findings of [70]. If we interpret the divergence from equilibrium at any fixed time as an indirect quantifier of the speed with which the system ultimately thermalizes, our analytic and numerical results confirm that expansion is faster than compression for Gaussian models.

8.2 Landauer’s Erasure Problem

Fig. 6
figure 6

Predictions for the position mean (a) and variance (b); position-momentum cross correlation (c); momentum variance (d) and mean (e) in the underdamped dynamics minimizing the Kullback–Leibler divergence (Case KL) from a free diffusion computed using the perturbative expansion. The boundary conditions are assigned on the marginal density of the position: the initial state at \({\text {t}}= 0\) is a single peaked distribution centered at \(x_{\mathfrak {o}} = 1\) (see Eq. (108)) and the final is a double peaked distribution with peaks at \(-1\) and 1 (see Eq. (109)). We set \({\text {t}}_{\mathfrak {f}}= 5\), \(\varepsilon =0.2\), \(g=0\), \(\omega = 1\) and use \(\alpha = \sqrt{(1+g)\,A}\approx 0.64\), where A is as defined in (98a). The functions \(\rho _{{\text {t}}_{2}}({\text {q}})\) and \(\sigma _{{\text {t}}_{2}}({\text {q}})\) are approximated numerically for values of \({\text {t}}_{2}\in [0,\varepsilon ^2\, {\text {t}}_{\mathfrak {f}}]\) as the solution of Eq. (50) by a forward-backward iteration. We perform a total of 15 forward and backward passes of the iteration. At each step, the factors \(\phi \) and \(\hat{\phi }\) are computed by means of Eq. (112) and normalized for numerical stability. We use a total of 8000 sample points for \({\text {q}}\) in the interval \([-6,6]\) and evolve \(50\ 000\) independent Monte Carlo trajectories started from each \({\text {q}}\) by an Euler-Maruyama discretization of the SDE (113) with step-size \(h=0.005\). The forward-backward iteration is initialized by \(\hat{\phi }_{{\text {t}}_{\mathfrak {f}}}\) with a vector of ones. We recover the functions \(\rho \) and \(\sigma \) from \(\phi \) and \(\hat{\phi }\) using Eqns. (114); these are then smoothed using a convolution with a box filter with window size \(\delta = 0.06\). The predictions for the underdamped moments are then computed using expressions found in Sect. (6.1.2)

We model the Landauer’s one bit of memory erasure [47] as a Schrodinger bridge problem between an initial state single-peaked distribution and final state as a double-peaked distribution, as illustrated in Fig. 1. We can make predictions for the first and second order cumulants of the position and momentum distributions from the perturbative expansion, by computing the numerical solution to the cell problem (50) and hence the appropriate corrections. We focus only on case KL.

We assign the initial and final state of the position marginal distribution

$$\begin{aligned} \rho _{\varepsilon ^2{\text {t}}_{\iota }}({\text {q}})&= \int _{\mathbb {R}} \text {d} {\text {p}}\ \texttt {p}_{{\text {t}}_{\iota }}({\text {q}},{\text {p}}) =: P_{\iota }({\text {q}}) \\ \rho _{\varepsilon ^2 {\text {t}}_{\mathfrak {f}}}({\text {q}})&= \int _{\mathbb {R}} \text {d} {\text {p}}\ \texttt {p}_{{\text {t}}_{\mathfrak {f}}}({\text {q}},{\text {p}}) =: P_{\mathfrak {f}}({\text {q}}) \end{aligned}$$

where \(P_{\iota }\) and \(P_{\mathfrak {f}}\) denote the assigned initial and final distributions, and here take the explicit forms

$$\begin{aligned} \begin{aligned} P_{\iota }({\text {q}})&=\dfrac{1}{Z_{\iota }} \exp \Bigl (-\, ({\text {q}}-x_{\mathfrak {o}})^4\Bigr ) \end{aligned} \end{aligned}$$
(108)
$$\begin{aligned} \begin{aligned} P_{\mathfrak {f}}({\text {q}})&=\dfrac{1}{Z_{\mathfrak {f}}}\exp \Bigl (-\, ({\text {q}}^2-x_{\mathfrak {o}}^{2})^2\Bigr ) \end{aligned} \end{aligned}$$
(109)

with \(Z_{\iota },\ Z_{\mathfrak {f}}\) normalizing constants. The initial condition is a single peaked distribution centered at \(x_{\mathfrak {o}}\), and final condition is a double peaked distribution, with peaks at \(x_{\mathfrak {o}}\) and \(-x_{\mathfrak {o}}\).

We look at the case of \(U_{\star }=0\). The cell problem (44) can be approximated numerically using a forward-backward iteration. This specifically means computing the numerical solution of two coupled non-linear partial differential equations to obtain the functions \(\rho \) and \(\sigma \) of the slow time \({\text {t}}_{2} = \varepsilon ^2 {\text {t}}\).

We adopt the methodology of [84], beginning with the Hopf-Cole transform

$$ \hat{\phi }_{{\text {t}}_{2}}({\text {q}}) = \rho _{{\text {t}}_{2}}({\text {q}})\exp \left( {\dfrac{\sigma _{{\text {t}}_{2}}({\text {q}})}{2\,\alpha }}\right) ,\quad \phi _{{\text {t}}_{2}}({\text {q}}) = \exp \left( -\dfrac{\sigma _{{\text {t}}_{2}}({\text {q}})}{2\,\alpha }\right) $$

yielding a pair of Fokker–Planck equations

$$\begin{aligned} \partial _{{\text {t}}_{2}} \phi _{{\text {t}}_{2}}({\text {q}}) + \alpha \,\partial ^2_{{\text {q}}} \phi _{{\text {t}}_{2}}({\text {q}})&= 0 \end{aligned}$$
(110a)
$$\begin{aligned} \partial _{{\text {t}}_{2}} \hat{\phi }_{{\text {t}}_{2}}({\text {q}}) - \alpha \,\partial _{{\text {q}}}^2 \hat{\phi }_{{\text {t}}_{2}}({\text {q}})&= 0 \end{aligned}$$
(110b)

with coupled boundary conditions

$$\begin{aligned} \phi _{\varepsilon ^2{\text {t}}_{\mathfrak {f}}}({\text {q}})&= P_{\mathfrak {f}}({\text {q}})\, / \, \hat{\phi }_{\varepsilon ^2{\text {t}}_{\mathfrak {f}}}({\text {q}}) \end{aligned}$$
(111a)
$$\begin{aligned} \hat{\phi }_0({\text {q}})&= P_{\iota }({\text {q}})\, / \, \phi _0({\text {q}}) \end{aligned}$$
(111b)

In this form, the cell problem can be solved using the forward-backward iteration, an adaptation of Algorithm 1 of [84]. We make a slight simplification, in that we perform the numerical integration of equations (110) by a Monte Carlo method, computing

$$\begin{aligned} \hat{\phi }_{\varepsilon ^2 {\text {t}}_{\mathfrak {f}}}({\text {q}})&= {\text {E}}\Bigl (\hat{\phi }_0\left( \mathcalligra{q}_{\varepsilon ^2 {\text {t}}_{\mathfrak {f}}}\right) \,\Big |\, \mathcalligra{q}_{0}={\text {q}}\Bigr ) \end{aligned}$$
(112a)
$$\begin{aligned} \phi _{0}({\text {q}})&= {\text {E}}\Bigl (\phi _{\varepsilon ^2{\text {t}}_{\mathfrak {f}}}\left( \mathcalligra{q}_{0}\right) \,\Big |\, \mathcalligra{q}_{\varepsilon ^2 {\text {t}}_{\mathfrak {f}}}={\text {q}}\Bigr ) \end{aligned}$$
(112b)

using the forward and backward evolution respectively of the underlying auxiliary (Ito) stochastic process

$$\begin{aligned} \text {d}\mathcalligra{q}_{{\text {t}}_{2}} = \sqrt{2\,\alpha }\, \text {d}\mathcalligra{w}_{{\text {t}}_{2}}\,,\end{aligned}$$
(113)

where \(\{\mathcalligra{w}_{{\text {t}}_{2}}\}_{{\text {t}}_{2}\ge 0}\) denotes a standard Wiener process. The values of \(\mathcalligra{q}_{{\text {t}}_{2}}\) are approximated with discretized trajectories of (113) by the Euler-Maruyama scheme.

The forward-backward iteration goes as follows: We begin by sampling a set of values for \({\text {q}}\) from an interval on which both the initial and final assigned distributions \(P_{\iota }\) and \(P_{\mathfrak {f}}\) are compactly supported. We initialize the forward-backward iteration by taking a set of (positive) values for \(\hat{\phi }_{\varepsilon ^2{\text {t}}_{\mathfrak {f}}}\), which are then used to compute the boundary condition (111a) for equation (110a). We integrate equation (110a) using the expression (112b) to obtain \(\phi _0\) and recompute \(\hat{\phi }_0\) using (111b). By integrating (110b) using (112a) up to \({\text {t}}_{\mathfrak {f}}\), we once again obtain \(\hat{\phi }_{\varepsilon ^2{\text {t}}_{\mathfrak {f}}}\). This procedure is then repeated until convergence; we verify that the boundary condition relations (111) are satisfied, and the mean-squared difference between two iterations of \(\phi _{{\text {t}}_{\mathfrak {f}}}\) and \(\hat{\phi }_{{\text {t}}_{\mathfrak {f}}}\) is less than a specified tolerance. We can then recover the values of \(\rho _{{\text {t}}_{2}}\) and \(\sigma _{{\text {t}}_{2}}\) by the relations

$$\begin{aligned} \begin{aligned} \rho _{{\text {t}}_{2}}({\text {q}})&= \hat{\phi }_{{\text {t}}_{2}}({\text {q}})\, \phi _{{\text {t}}_{2}}({\text {q}}) \\ \sigma _{{\text {t}}_{2}}({\text {q}})&= - 2\,\alpha \,\log \left( \phi _{{\text {t}}_{2}}({\text {q}})\right) \,. \end{aligned} \end{aligned}$$
(114)

The optimal control protocol in the overdamped case is \(\sigma \). From here, we use the relevant equations in Sects. 6.1.2 and 6.1.3 to make predictions for the first and second order cumulants of the position and momentum in the underdamped dynamics, which are shown in Fig. 6. The predicted marginal distribution of the position and the gradient of the optimal control protocol is shown in Fig. 7. Figure 8 contrasts the heights of the peaks of the marginal distribution of the position in the underdamped and overdamped dynamics over the time interval.

Fig. 7
figure 7

Predictions for the marginal density of the position (a)-(e) and (k) -(o) and the gradient of the optimal control protocol (f)-(j) and (p) -(t) in the overdamped (orange) and underdamped (blue) dynamics minimizing the Kullback–Leibler divergence (Case KL) from a free diffusion, \(U_{\star }=0\). We show the distribution \(\rho \) and the gradient of the optimal control protocol \(-\partial _{\text {q}} \sigma \) (114) for the overdamped dynamics, and compute the corrections needed to obtain the corresponding quantities \({\text {f}}_{{\text {t}}}\) and \(-\partial _{{\text {q}}} U_{{\text {t}}}\) for the underdamped dynamics. The shaded region in panels (a) and (o) show the assigned boundary conditions (108) and (109) respectively: the initial state at \({\text {t}}= 0\) is a single peaked distribution centered at \(x_{\mathfrak {o}} = 1\) and the final is a double peaked distribution with peaks at \(-1\) and 1. We set \({\text {t}}_{\mathfrak {f}}= 5\), \(\varepsilon =0.2\), \(g=0\), \(\omega = 1\) and \(\alpha = \sqrt{(1+g)\,A}\approx 0.64\), where A is as defined in (98a). The functions \(\rho _{{\text {t}}_{2}}({\text {q}})\) and \(\sigma _{{\text {t}}_{2}}({\text {q}})\) are computed as in Fig. (6), and predictions for the underdamped are computed using the expressions in 6.1. All distributions are normalized

Fig. 8
figure 8

Predictions for the heights of the peaks of the marginal distribution of the position in the overdamped (orange) and underdamped (blue) dynamics. Both peaks in the overdamped remain at roughly equal height, while the underdamped diverge. The distribution in the overdamped and the corrections to obtain the underdamped are computed as in Fig. 7, using \(\text {t}_{\mathfrak {f}} = 5\), \(\varepsilon = 0.2\), and \(g=0\)

9 Conclusions and Outlook

In this paper, we address the problem of finding optimal control protocols analytically for finite time stochastic thermodynamic transitions described by underdamped dynamics. To such end, we introduce a multiscale expansion whose order parameter vanishes in the overdamped limit. Within second order accuracy, we are able to find corrections for the linear and quadratic moments of the process. When the boundary conditions are Gaussian, our results are in excellent agreement with the solutions found by non-perturbative numerical methods.

We expect our theoretical predictions to provide a necessary benchmark for design and interpretation of experiments on nanomachine thermodynamics. In particular, this is the case for statistical indicators of the momentum process, whose dynamical properties are a distinctive trait of the underdamped regime. Our predictions for the momentum variance and the position-momentum cross correlation are in qualitative agreement with the very recent experimental observations in related laboratory setups [40].

We envisage several directions to extend the present work. In our view, the most urgent and possibly relevant for applications is devising efficient numerical algorithms to determine regular extremals for general (non-Gaussian) boundary conditions. The non-local nature of the equations determining the regular extremals hamper the direct application of proximal algorithms [84, 100] and Monte Carlo methods. We address the problem of generalizing these methods to the underdamped case in a companion contribution [107]. Here, we also compute inertial corrections to the numerical solution of the overdamped problem [31] for minimal entropy production in Landauer’s problem [28].

A second main result of the present work is the proof that the optimal control for transitions between Gaussian states solve a Lyapunov equation in any number of dimensions. This is a strong indication of the existence of regular extremals in phase spaces of any number of dimensions: in view of [66], the extension of the multiscale method is very cumbersome, but otherwise conceptually straightforward. A more subtle issue is instead the computation of corrections of orders higher than two, which are prone to instabilities already at third order. Ideas motivated by normal form theory [103] offer a promising way to overcome this difficulty. Yet, the application to optimal control on a finite time horizon is still an open challenge.

From the physics perspective, the multiscale expansion appears best suited to deal with nanoscale dynamics when inertial effects are present, but are small in comparison to thermal fluctuations. A possible alternative approach is the underdamped expansion (see e.g. Chapter 6 of [76]). This technique could be used to extract complementary information to that obtained here.

In terms of applications, our results are relevant for all physical contexts where random fluctuations and inertial effects cannot be disregarded. This is the case, for example, in bit manipulation in electronic devices. Information bits are encoded using bi-stable states governed by double-well potentials. Inertia is required to improve the efficiency of most logic operations [44].

Our results find natural applications also in biophysics. The control of biological systems such as bacteria suspensions and swarms is nowadays accessible to experimentation through several techniques [108,109,110,111]. This has generated increasing interest in the theoretical challenge of applying control theory to active matter models, i.e. out-of-equilibrium dynamics showing complex phenomena inspired by biology [26, 112,113,114]. So far, however, only overdamped dynamics have been considered. While this does describe the behaviour of microscopic biological systems at high Reynolds numbers (e.g., bacteria in liquid suspensions) fairly, it is well known that inertial effects do play a fundamental role in some classes of such systems [115,116,117]. A meaningful description of the collective behaviour of flocks and swarms requires taking into account inertial effects that allow efficient propagation of information within the system [118,119,120]. Any approach to the control of these models should therefore be carried out in the underdamped regime: even if our results cannot be straightforwardly applied to collective dynamics, they may provide a promising starting point for the development of control theory in this context.