A Novel Method for Solving Second Kind Volterra Integral Equations with Discontinuous Kernel

: 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.

It should be mentioned that for solving mathematical and engineering problems, we apply the methods, using floating-point arithmetic (FPA). In general form, the precision of these methods should be obtained, using the following condition: which depends on the exact solution y(x), the approximate solution y n (x) and . Finding the exact solution and the optimal are the main difficulties of the mentioned condition.
Without having the optimal , extra iterations are produced. In order to avoid theses problems, we apply the DSA and a novel termination criterion instead of (2). To this aim, the CESTAC method and the CADNA library are handled. Additionally, we do not need to apply the condition (2) and we have the following novel condition: where @.0 is the informatical zero, which can be produced only in the CESTAC method. This sign shows the equality between the number of common significant digits (NCSDs) of y n (x) and y n−1 (x). For the first time, Laporte and Vignes [36,37] applied this method, and a research group in France developed it [38]. By using this technique, we can find the optimal results, iterations and error of the presented scheme. The CADNA library is the software to write all the CESTAC codes. In this library, we apply C, C++, Fortran or ADA codes. In addition, the Linux operating system should be applied for running the CADNA library. Dynamical control of the Adomian decomposition method [12], homotopy perturbation method [13], homotopy analysis method [20,21,39,40], numerical integration rules [41][42][43][44][45], Sinc-collocation method [25,26], homotopy regularization method [24], Taylor-collocation method [15,16] and many others [46], are some of applications of the mentioned technique. The rest of the paper is organized as follows: Section 2 focuses on solving the VIE (1), applying the Lagrange-collocation method. Additionally, the error analysis theorem is proved. The CESTAC method and the CADNA library are discussed in Section 3 to validate the obtained numerical results. The main theorem of the method is proved to apply the novel condition (3). In Section 4, we solve some examples and validate the results using the mentioned technique. Based on this procedure, we are able to find the optimal iteration, approximation and error, which are the main novelties of this study. In Section 5, we provide some conclusions.

Lagrange-Collocation Method
Let be the approximate solution of Equation (1) where for nodes a = x 0 < . . . < x n = b. Replacing (4) into (1) leads to the following: Substituting the collocation nodes x i = a + ( b−a n )i, i = 0, 1, . . . , n in Equation (5), we obtain the following: where Thus, solving the following system, where the n-th order approximate solution of the VIE with discontinuous kernel (1) based on the Lagrange polynomials can be obtained in the form of y n (x) = ∑ n j=0 y j l j (x).
. Let y(x) be the exact solution of (1), which is assumed to be arbitrarily differentiable, and y n (x) the n-th order Lagrange collocation solution of (7). We obtain the following: Proof. For the exact and approximate solutions y(x) and y n (x), we obtain the following: are the interpolation function and the approximate solution of (1), respectively. By writing the remainder term of the interpolation polynomial as R n (x) = y(x) − l n (x) = y (n+1) (n+1)! w n+1 (x), we can write the following: By denoting δ n = (e(x 0 ), e(x 1 ), . . . , e(x j ), . . . , e(x n )) T and l = (l 0 (x), l 1 (x), . . . , l n (x)) T , we obtain the following: where e(x j ) = y(x j ) − y n (x j ). Using Equations (8) and (9), we can write the following:

CESTAC Method and CADNA Library
In order to apply the CESTAC method, we need to use the SA; generally, we utilize this method to control the accuracy of numerical and iterative methods for solving mathematical and engineering problems [47,48].
Assume that B is a set of representable values by a computer; for s * ∈ R, we can produce S * ∈ B with α mantissa bits of the binary FPA as the following: where ρ shows the sign, 2 −α φ demonstrates the missing segment of the mantissa, and E is the binary exponent of the result. Changing α from 24 to 53, we can change the precision from a single to double form [49,50]. Let φ be a stochastic variable, which is uniformly distributed on [−1, 1]. Making a perturbation on the last mantissa bit of s * , we have the mean (µ) and the standard deviation (σ) for S * . Repeating the process for k-times, we have k samples of S * as follows: .., S * k }. Now we can find the mean and standard deviation values as the following: Thus, we are able to find the NCSDs between S * andS * as the following: where τ δ is the value of T distribution, as the confidence interval is 1 − δ with k − 1 freedom degree. When we haveS * = 0, or CS * ,S * ≤ 0, the algorithm is stopped by showing S * = @.0. It shows that we have equality between the NCSDs ofS * and S * . The main difference between this method and other methods is applying the CADNA library instead of mathematical packages, such as MATLAB, Mathematica, Maple. In order to apply this library, we need to use the LINUX operating system. Additionally, we should write all codes using C, C++, FORTRAN or ADA. Applying this method and the library, we can find the optimal approximation, optimal step of the method, optimal error and some of numerical instabilities. They are the main advantages of our method, compared to other methods.
In order to apply the CADNA library, the following sample can be applied: Main Part printf (" Parameter= %s \n ",Strp(Parameter)); cadna − end(); The function "Strp" should be applied to show the NCSDs. Thus, when the NCSDs become zero, we will see the informatical zero sign @.0, and the algorithm will be stopped.

Definition 1 ([51]
). Let s 1 and s 2 be two real numbers. The NCSDs for s 1 and s 2 can be defined as follows: Theorem 2. Assume that y(t) is the exact solution of the second kind VIE (1), and y n (t) is its approximate solution which is obtained using the Lagrange-collocation method. Then, we have the following: Proof. Applying Definition 1, we can write the following: C y n (t),y n+1 (t) = log 10 y n (t) + y n+1 (t) 2(y n (t) − y n+1 (t)) = log 10 y n (t) y n (t) − y n+1 (t) − 1 2 = log 10 y n (t) y n (t) − y n+1 (t) + log 10 using Theorem 1, we obtain the following: Therefore, we have the following: C y n (t),y n+1 (t) = log 10 y n (t) y n (t) − y n+1 (t) Furthermore, we have the following: C y n (t),y(t) = log 10 y n (t) + y(t) 2(y n (t) − y(t)) = log 10 y n (t) By using Equations (13) and (14), we have the following: C y n (t),y(t) − C y n (t),y n+1 (t) = log 10 y n (t) y n (t) − y(t) − log 10 y n (t) y n (t) − y n+1 (t) and we obtain the following: Approaching n to infinity, we have O 1 (n+1)! → 0 and the following: C y n (t),y(t) = C y n (t),y n+1 (t) .

Numerical Examples
In this section, some examples of VIEs with a discontinuous kernel are discussed. We use the mentioned method using both arithmetics, the FPA and the DSA. In addition, we apply both conditions (2) and (3), and finally, we compare the results to show several benefits of the DSA. Example 1. Consider the following second kind VIE as follows: where the following holds: Figure 1a shows the comparison between solutions, and Figure 1b shows the error. The results of the FPA can be found in Tables 1 and 2. In Table 2, the steps of the method are obtained for various . The optimal results are presented in Table 3. According to this table, we have the following: x 9 y(t)dt + 2 8x 9 5x 9 . Figure 2 shows the comparative graphs between solutions and also the error function. The results of the FPA for = 10 −1 and x = 0.8 are given in Table 4. Table 5 discusses the iterations for various . In Table 6, we can find the optimal results as the following: n opt = 4, y opt (0.8) = 0.511999.   Table 5. Applying the FPA to find n for various and x = 0.8.
The accuracy and efficiency of the method are shown in Figure 3 by plotting the comparative graph and the error function for n = 10 and x = 0.6. The numerical results of the FPA are presented in Tables 7 and 8. Additionally, in Table 9 the numerical results of the DSA are presented. We obtain the following: n opt = 8, y opt (0.6) = 0.564641.   Table 9. Results of the CESTAC method for Example 3 and x = 0.6.

Conclusions
The VIE with a discontinuous kernel was studied. We applied the Lagrange-collocation method for solving the problem. The accuracy of the method was discussed by proving the error analysis theorem. The optimal results were obtained using the CESTAC method and the CADNA library. Additionally, the optimal results, such as the optimal step, approximation and error, were found. Comparing the results between the Lagrange-collocation method using the FPA and the SA, we can see that the SA has more advantages in comparison with the FPA.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript:

VIE
Volterra integral equations CESTAC Controle et Estimation Stochastique des Arrondis de Calculs CADNA Control of Accuracy and Debugging for Numerical Applications DSA Discrete stochastic mathematic NCSDs Number of common significant digits