bundles / scipy 1.17.1 / scipy / integrate / _bvp / estimate_rms_residuals
function
scipy.integrate._bvp:estimate_rms_residuals
source: /scipy/integrate/_bvp.py :528
Signature
def estimate_rms_residuals ( fun , sol , x , h , p , r_middle , f_middle ) Summary
Estimate rms values of collocation residuals using Lobatto quadrature.
Extended Summary
The residuals are defined as the difference between the derivatives of our solution and rhs of the ODE system. We use relative residuals, i.e., normalized by 1 + np.abs(f). RMS values are computed as sqrt from the normalized integrals of the squared relative residuals over each interval. Integrals are estimated using 5-point Lobatto quadrature [1], we use the fact that residuals at the mesh nodes are identically zero.
In [2] they don't normalize integrals by interval lengths, which gives a higher rate of convergence of the residuals by the factor of h**0.5. I chose to do such normalization for an ease of interpretation of return values as RMS estimates.
Returns
rms_res: ndarray, shape (m - 1,)Estimated rms values of the relative residuals over each interval.
Aliases
-
scipy.integrate._bvp.estimate_rms_residuals