Domain: Physics — Quantum Mechanics

Problem:
Compute the zeta-regularized determinant ratio:

\[
\mathcal{R}(\varepsilon) \;\equiv\; 
\frac{\det\bigl[-\tfrac{\mathrm{d}^2}{\mathrm{d}x^2} + U_{\varepsilon}(x)\bigr]}{\det\bigl[-\tfrac{\mathrm{d}^2}{\mathrm{d}x^2} + m^2\bigr]},
\qquad
U_{\varepsilon}(x)=m^2 - 6\,\mathrm{sech}^2 x + \varepsilon\,\mathrm{sech}^4 x,
\quad m^2=4,
\quad \varepsilon=0.2,
\]

on the finite interval $[-L,L]$ with Dirichlet boundary conditions $y(\pm L)=0$ and the limit $L\to\infty$ understood in the Gel'fand–Yaglom sense.

Assume the zeta prescription for regularization and that the small deformation $\varepsilon>0$ removes any accidental zero mode.
Your task is to produce a **single real number**, the infinite-interval limit:

\[
\boxed{\mathcal{R}(0.2)=\lim_{L\to\infty}
\frac{\det_{D,[-L,L]}\bigl[-\tfrac{\mathrm{d}^2}{\mathrm{d}x^2}+U_{0.2}(x)\bigr]}
{\det_{D,[-L,L]}\bigl[-\tfrac{\mathrm{d}^2}{\mathrm{d}x^2}+m^2\bigr]}}\,.
\]

Provide the final answer to at least 4 significant digits. 
You must:

(i) Present the analytic reduction that justifies computing this ratio by solving linear ODE initial-value problems and 

(ii) Implement the numerical evaluation to deliver the **single numeric value** $\mathcal{R}(0.2)$.

Answer: 0.0030127

Solution code:
import numpy as np
from scipy.integrate import solve_ivp

def compute_determinant_ratio(eps=0.2):
    """
    Compute the determinant ratio using the scaled Gel'fand-Yaglom method
    """
    
    def scaled_ode_system(t, y, eps):
        """
        ODE system for scaled equation:
        tilde_psi'' + 4*tilde_psi' + (4 - U_eps)*tilde_psi = 0
        """
        psi, dpsi = y
        
        # Compute U_eps(x)
        sech = 1.0 / np.cosh(t)
        sech2 = sech * sech
        U_eps = 4.0 - 6.0*sech2 + eps*sech2*sech2
        
        # d²tilde_psi/dx² = -4*dtilde_psi/dx - (4 - U_eps)*tilde_psi
        d2psi = -4.0*dpsi - (4.0 - U_eps)*psi
        
        return [dpsi, d2psi]
    
    # Compute for increasing L values to verify convergence
    L_values = [20, 25, 30, 35, 40]
    ratios = []
    
    for L in L_values:
        # Initial conditions for scaled equation
        y0 = [0.0, 1.0]
        
        # Solve from -L to L
        sol = solve_ivp(scaled_ode_system, [-L, L], y0, args=(eps,),
                       method='DOP853', rtol=1e-12, atol=1e-14,
                       dense_output=True)
        
        # Get tilde_psi(L)
        tilde_psi_L = sol.sol(L)[0]
        
        # The determinant ratio in the limit L→∞ is 2*tilde_psi(L)
        ratio = 2.0 * tilde_psi_L
        ratios.append(ratio)
        
    # Check convergence
    converged_value = ratios[-1]
    
    # Verify convergence by checking relative differences
    for i in range(1, len(ratios)):
        rel_diff = abs(ratios[i] - ratios[i-1]) / abs(ratios[i])
        if rel_diff < 1e-8:  # Converged to 8 digits
            converged_value = ratios[i]
            
    return converged_value

# Calculate the final answer
result = compute_determinant_ratio(0.2)