# Solving Fredholm Equation of the second kind

Consider the Fredholm Equation of the second kind,

$$\phi(x) = 3 + \lambda \int_{0}^{\pi} \text{cos}(x-s) \, \phi(s) \,ds$$

Where the analytical solution is found as,

$$\phi(x) = 3 + \frac{6\lambda}{1 - \lambda \frac{\pi}{2}}\,\text{sin}(x)$$

How could one use Mathematica to find a numerical solution to the same integral equation by using the method of successive approximations (i.e. the Neumann series approach)?

Use DSolve:

PHI =
DSolveValue[ϕ[x] == 3 + λ Integrate[ Cos[x - s] ϕ[s], {s, 0, Pi}], ϕ, x]
(*Function[{x}, (3 (-2 + π λ - 4 λ Sin[x]))/(-2 + π λ)]*)


The solution can be further used in the form PHI[x].

• Thank you, but how can I use the function Mathematica returns to, say, investigate the convergence of the new $\phi (x)$ function? Mar 1 '19 at 19:40
• @ user57401 I modified my answer! Mar 1 '19 at 19:57

Following Weisstein, Eric W. "Integral Equation Neumann Series." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/IntegralEquationNeumannSeries.html, the Neumann series approximation is:

n = 10;  (* for example *)
ϕ[x_, 0] = 3;
Do[ϕ[x_, j_] = 3 + λ Integrate[Cos[x - p] ϕ[p, j - 1], {p, 0, π}], {j, n}]


The last term in the series ϕ[x,n] is the approximation to ϕ[x].

Here is what Mathematica returns for ϕ[x,10]. To investigate convergence, I guess we could look at the difference ϕ[x,n] - ϕ[x] as n gets large, since you know ϕ[x].

• Thank you! When I try to run this, my output is returning the value of 3? How did you get Mathematica to return the series above for [Phi]? Mar 1 '19 at 20:27
• Please clear out your variables, perhaps with Evaluation: Quit Kernel: Local. To print the final (nth) value: \[Phi][x, n].
– mjw
Mar 1 '19 at 20:52
• Made some edits to my answer. Had a couple of typos. Within a function definition it is x_, otherwise x. Also, \[Phi][x,j] needs two arguments, one for x and one for the jth approximation. Hope its clear.
– mjw
Mar 1 '19 at 20:55
• @m_goldberg, how do you post symbols rather than the clutzy [Phi] type of notation here?
– mjw
Mar 3 '19 at 1:57
• I use halirutan's plug-in. You can learn more about it here Mar 3 '19 at 2:53