Load leveling problems and energy storage systems can be modeled in the form of Volterra integral equations (VIE) with a discontinuous kernel. The Lagrange–collocation method is applied for solving the problem. Proving a theorem, we discuss the precision of the method. To control the accuracy, we apply the CESTAC (Controle et Estimation Stochastique des Arrondis de Calculs) method and the CADNA (Control of Accuracy and Debugging for Numerical Applications) library. For this aim, we apply discrete stochastic mathematics (DSA). Using this method, we can control the number of iterations, errors and accuracy. Additionally, some numerical instabilities can be identified. With the aid of this theorem, a novel condition is used instead of the traditional conditions.