Numerical Integration of a Fredholm Integral Equation of the First Kind

I'm trying to test out a numerical integration scheme for a Fredholm integral equation of the first type with an integral equation that has an exact solution. My test equation is: $$\int_{-1}^{1}\frac{y(t)dt}{\sqrt{1+x^2-2xt}}=f(x),$$ where $y(t)$ is unknown, and $f(x)$ is known. The kernel of this equation is a generating function of the Legendre polynomial which allows the solution to be represented as a series in the form of: $$y(x)=\frac{1}{2}\sum_{n=0}^{\infty}\frac{2n+1}{n!}f_x^{(n)}(0)P_n(x)$$ where $f_x^{(n)}(0)$ is the Maclaurin series of $f(x)$ and $P_n(x)$ are Legendre polynomials (see section 12.3-2 in "Handbook of Integral Equations" by A.D. Polyanin and A.V. Manzhirov, 2nd Ed. for this example). This is a simple summation formula which can easily be solved to find $y(x)$ given $f(x)$.

I've been trying to evaluate a numerical scheme with this integral equation to try to prove my scheme, but the method does not give me the same answer as the series solution above. I've been using Galerkin's Method which works in the following manner. First, we seek a solution in the form of a sum: $$y(x)=\sum^N_{n=1}A_n\varphi_n(x)$$ where $\varphi_n(x)$ is a complete system of functions on the integral equation's interval, $(a,b)$. We can solve for the coefficients $A_n$ with the following summation: $$\sum^N_{n=1}\sigma_{nm}A_n=B_m$$ where $m=1,..., n$ and $B_m=\int^a_b f(x) \psi_m(x) dx$, $\sigma_{nm}=\int^a_b g_n(x) \psi_m(x) dx$, $g_n(x)=\int_a^bK(x,t)\varphi_n(t)dt$, and $\psi_m(x)$ is a sequence of functions.

For the test case problem, if I choose $f(x)=x$ and evaluate at $x=3$, the analytical series solution converges at $y(3)=1,459$. For the numerical integration (the $A_n$ coefficient formula) I can choose the complete system of functions, $\varphi_n(x)$ and $\psi_m(x)$ to be any complete system, so I've chosen them to be Legendre polynomials. When I apply the Galerkin method to the test case integral equation, I get answers that are no where close to $y(3)=1,459$. It even seems as if my solution diverges. I have no clue why the Galerkin method which is a general case first order Fredholm integral equation solution method does not work.

I'm trying now Tikhonov regularization to convert the test equation to a Fredholm equation of the second kind but this seems like an extremely roundabout way to numerically integrate something.

Any help with numerically integrating Fredholm integral equations of the first kind would be greatly appreciated. I apologize for writing a wall of text, it's just that I've tried everything and can't get even a test case to work. Let me know if I've written anything unclear or need clarification. Thanks and have a great day.