1
$\begingroup$

I'd like to numerically integrate $\frac{1}{\sqrt{f(x)}}$ on an interval between two consecutive zeros of the function $f(x)$, which makes the integrand singular at two endpoints. Standard practice seems to be to split into intervals so that each has one singularity at an endpoint. However, I don't know the locations of these endpoints explicitly; at best, I can solve for them numerically to arbitrary precision. This presents a dilemma because one needs to take into account the size of the singularity (i.e. the size of $f'(x)$ at the endpoints) to know how precisely to specify the endpoint. What's the best way to handle such a situation? Can standard software carry out the whole procedure to arbitrary precision?

$\endgroup$
  • 4
    $\begingroup$ I'm not sure I understand what you mean, because if you knew the singularity's location with complete precision, you could only ever specify it to numerical precision in code. So if you can evaluate it to arbitrary precision, then evaluating it to machine precision should be enough. Also, most quadrature libraries have options that tell them not to evaluate the function directly at an endpoint, so the values of the function right at the singularity would never be asked for, so don't enter calculations. Can you give an example of a function that fails to integrate, to be more concrete? $\endgroup$ – Kirill May 8 '15 at 20:23
2
$\begingroup$

You can use double exponential quadrature which is very effective in handling end point singularity.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.