This R package estimates Volterra and Fredholm integral equations. It is a translation into R of the Python package “inteq” by Matthew W. Thomas (https://github.com/mwt/inteq).
Installation: //to be completed
This package provides the function fredholm_solve which approximates the solution, \(g(x)\), to the Fredholm Integral Equation of the first kind:
\[\begin{align} f(s) = \int_a^b K(s, y)\, g(y)\, dy, \end{align}\]
using the method described in Twomey (1963). It will return a grid that is an approximate solution, as demonstrated by the following example:
\[ f(s) = \int_{-3}^{3} K(s, y)\, g(y)\, dy, \]
where the kernel \(K(s, y)\) and left-hand side \(f(s)\) are defined as:
\[ K(s, y) = \begin{cases} 1 + \cos\left(\dfrac{\pi (y - s)}{3}\right), & \text{if } |s - y| \leq 3 \\ 0, & \text{otherwise} \end{cases}, \]
\[ f(s) = \frac{1}{2} \left[ (6 - |s|)\left(2 + \cos\left(\frac{|s| \pi}{3}\right)\right) + \frac{9}{\pi} \sin\left(\frac{|s| \pi}{3}\right) \right]. \]
The true solution is \(g(y) = K(0, y)\).
This package provides the function volterra_solve which approximates the solution, g(x), to the Volterra Integral Equation of the first kind:
\[\begin{align} f(s) = \int_a^s K(s,y) g(y) dy, \end{align}\]
using the method in Betto and Thomas (2021), as demonstrated by the following example:
\[ f(s) = \int_0^s \cos(t-s) g(t) dt, \]
with left-hand side
\[ f(s) = \int_0^s \cos(t-s) \frac{2 + t^2}{2} dt \]
and true solution
\[ g(s) = \frac{2 + s^2}{2}. \]
It also provides volterra_solve2 which approximates the solution, g(x), to the Volterra Integral Equation of the second kind:
\[\begin{align} g(s) = f(s) + \int_a^s K(s,y) g(y) dy, \end{align}\]
using the method in Linz (1969), as demonstrated by the following example:
\[ g(s) = 1 + \int_0^s (s-t) g(t) dt, \]
with true solution
\[ g(s) = \cosh(s). \]