mqr.utils.
fredholm2#
- mqr.utils.fredholm2(t0, fn_K, fn_g, lmda, x, w)#
Solve a Fredholm equation of the second kind.
Evaluates \(f\) at t0 in:
\[f(t) = g(t) + λ \int_Q K(t, s) f(s) ds\]where the definite integral is approximated over the region \(Q\) defined by the quadrature points x and weights w.
Uses the quadrature points and weights provided to form linear equations, and then interpolates the result using Nystrom’s method. See [1] for a summary.
- Parameters:
- t0float
Point to evaluate the function f(t).
- fn_KCallable[]
Function that returns values of K(t, s); see equation above.
- fn_gCallable[]
Function that returns values of g(t); see equation above.
- lmbdafloat
Multiple of the integral term; see equation above.
- xarray_like
Quadrature abcissa points.
- warray_like
Quadrature weights.
References
[1]Press, W. H. (2007). Numerical recipes 3rd edition: The art of scientific computing. Cambridge university press.