Solving integral equation using DifferentialEquations

Use Newton and a quadrature routine. That is, you are trying to find a root of

f(x) = x - \int_x^\infty A(z) dz

The derivative of this is f'(x) = 1 + A(x). So, you can just repeatedly take Newton steps

x \leftarrow x - \frac{f(x)}{f'(x)}

where f(x) is evaluated with a quadrature routine like QuadGK:

using QuadGK
f(x) = x - quadgk(A, x, Inf, rtol=1e-4)[1]

for example. (QuadGK handles the semi-infinite integral for you by a coordinate transformation.)

9 Likes