7

I have trouble solving this task to find eigenvalues and eigenvectors for the Fredholm integral. I could not find an analytic solution to the equation. That is why I am trying to solve it numerically in Wolfram Mathematica. enter image description here

b and c are constants = 0.1 I saw a similar task for another kernel function (Fredholm Integral Equation of the 2nd Kind with a Singular Difference Kernel), but the Gauss-Legendre quadrature formula code doesn't allow solving this task because of singularity (division by zero are constantly happening).

Thanks for the advice.

Code to find 2 eigenvalues and eigenfunctions:

points = 100;
integrand[x_] =(exp[-0.1*Abs[x-y]]*cos[0.1*Abs[x - y]]) f[x];
domain = {0,1};
{nodes, weights} = Most[NIntegrate`GaussRuleData[points, MachinePrecision]];
midgrid = Rescale[nodes, {0, 1}, domain];
grid = Flatten[{domain[[1]], midgrid, domain[[-1]]}];
int = -Subtract @@ domain weights.Map[integrand, midgrid];
{b, m} = CoefficientArrays[int, f /@ grid];
mat = Table[m, {y, grid}];
{val, vec} = Eigensystem[mat, 2];
ListLinePlot[vec[[;; 2]], PlotRange -> All]
user82523
  • 71
  • 3

1 Answers1

5

There are several typos in the code, and after small correction we have

points = 100;
integrand[x_,y_] := (Exp[-0.1*Sqrt[(x - y)^2]]*Cos[0.1*Sqrt[(x - y)^2]]);
domain = {0, 1};
{nodes, weights} = 
  Most[NIntegrate`GaussRuleData[points, MachinePrecision]];
midgrid = Rescale[nodes, {0, 1}, domain];

mm = Table[ integrand[midgrid[[i]], midgrid[[j]]] weights[[i]], {i, Length[midgrid]}, {j, Length[midgrid]}];

{val, vec} = Eigensystem[mm, 2]; ListLinePlot[vec[[;; 2]], PlotRange -> All]

Figure 1

Alex Trounev
  • 44,369
  • 3
  • 48
  • 106