Numerical integration of a function with a singularity

improper-integralsintegrationnumerical methodsnumerical-calculus

I'm trying to compute numerically a function like the following:
$$
F(t)=\int_{0}^{t}{\frac{f(\tau)}{\sqrt{t-\tau}}d\tau}
$$

I tried to adopt the composite Simpson's rule, but the problem is that when $\tau=t$, I have a division by $0$, so I can't evaluate the integrand at the last point. I have also tried some substitutions but without success. Could someone please help me with how can I proceed to get rid of it? Thank you in advance!

Best Answer

If you consider the change of variable $t-\tau = y^2$ the integral becomes $$ \int_{\sqrt t}^0 \frac{f(t-y^2)}{y}\cdot (-2y) dy = 2 \int_0^{\sqrt{t}} f(t-y^2) dy. $$

Assuming that the singularity was expressed in the term $\frac{1}{\sqrt{t-\tau}}$ and $f$ is nice enough, Simpson's method will now work in standard way.

Related Question