## 4 Numerical Algorithm and Results
### Example  
We here choose \(A(x)=1\) and \(b(x)=-U^{\prime}(x)\) with the potential \(U(x)=\frac{1}{4}x^{4}-\frac{1}{2}x^{2}\). This is a prototypical example of a double-well system. It has two minimum points, \(x_{sl}=-1\) and \(x_{sr}=1\), corresponding to the two stable fixed points, and a local maximum point \(x_{u}=0\) corresponding to the unstable fixed point of the average system. The global structure of the potential is displayed in Figure 1. It can be seen that restricting the domain to \(E=[-2,2]\) is precise enough for our calculation. In the following section, we partition the domain \(E\) into \(N=1000\) cells, and discretize the time interval \([-2,2]\) into \(M=1000\) small segments. The algorithm designed above can then be applied to show the effects of various parameters \(x_{0}\), \(x_{f}\) and \(T\) on the nonstationary optimal fluctuations. First, we fix \(x_{0}=-1\) and \(x_{f}=1\) to study the noise-induced transition between the two stable states. The global structure of the Hamiltonian system is plotted in Figure 2a. The red curve indicates the OP from \(x_{0}\) to \(x_{f}\), while the green curve corresponds to the OP of the reversed transition. This is the maximum-likelihood event with a minimum cost of the action. Near the fixed points, the momentum \(p\) is close to zero, and so is the velocity \(\dot{x}\), implying that the stochastic trajectories around it always spend almost-infinite time oscillating near the fixed points, and occasionally fluctuate to a bounded domain. However, this is not the case with the NOPs. As a finite time interval \([0,T]\) is required, the NOPs correspond to the Hamiltonian orbits above the heteroclinic orbit, which can be parameterized by the initial condition \((x_{0},p_{0})\). A typical NOP transitioning between these two points is shown by a purple curve in Figure 2a. It can be seen that the momentum here is always positive, meaning that a large bias from the average dynamic always exists. As a result, this is a rare event with exponentially small probability, and can scarcely be observed. Figure 1: The potential \(U(x)\) of the double-well model; its two minima correspond to the two metastable states \(x_{sl}=-1\) and \(x_{sr}=1\), with an unstable fixed point \(x_{u}=0\) separating them. To demonstrate how the nonstationary PPD can pinpoint the location of the NOP, we first calculate the time required for an NOP to reach the target point. As shown in Figure 2b, this is a monotone function of the initial momentum. For any choice of \(T\), a unique NOP exists, and no singular behavior arises consequently. The PPD will always present a single peak trajectory accordingly. Now, let \(T=10\). The PPDs and their peak trajectories for various noise intensities are illustrated in Figure 3. The results can be compared with those obtained by the minimum action method (MAM) [47] (details of the MAM are presented in Appendix A). This shows that our numerical method could approximate the NOP fairly well when \(\varepsilon\) is small enough. However, the matching effect soon fails as \(\varepsilon\) increases. In particular, the hopping of the peak trajectory of the PPD occurs, as displayed in Figure 3b. The law for all of the fluctuation paths connecting \(x_{0}\) with \(x_{f}\) is initially concentrated on the domain near \(x_{0}\). Larger noise makes significant fluctuation more likely. Consequently, a local peak near \(x_{f}\) emerges as time goes by, whose height subsequently exceeds that of the original one and dominates the law at the end. This is a result caused by the \(\varepsilon\)-dependent part of Equation (46), including the \(O(\varepsilon)\) part in the drift term as well as the weak Gaussian noise. To ensure that the peak trajectory of the PPD converges to the NOP, both of them require \(T\ll 1/\varepsilon\). As a result, lowering \(\varepsilon\) or \(T\) will reduce the error of our algorithm.