Is there any good way to deal with singularities(when x=y) in numerical integration ?

124 Views Asked by At

The integral equation with a singularity is as follows: $$\Omega=\int^\pi_0\frac{\cos(\theta)}{\sqrt{1-\cos(\theta)}}\,d\theta$$ I want to calculate this integral numerically. Is there an analytic expression that can be used when $\theta=0$, or is there a way to remove the singularity? Any insights on dealing with singular numerical integrals are very useful to me.

Thank you

2

There are 2 best solutions below

1
On

If $\theta$ is close to $0$, then $\cos \theta$ behaves like $1-\frac{\theta^2}{2}$. It means that the integrand behaves like $\frac{2-\theta^2}{\sqrt 2 \theta}$, hence the singularity in zero is non-integrable.

3
On

If you look at the expansion of the integrand around $\theta=0$, you have $$\frac{\cos(\theta)}{\sqrt{1-\cos(\theta)}}=\frac{\sqrt{2}}{\theta }-\frac{11}{12 \sqrt{2}} \theta +O\left(\theta ^3\right)$$ which shows how you can remove the singularity.

$$\int_0^\pi \left(\frac{\cos(\theta)}{\sqrt{1-\cos(\theta)}} -\frac{\sqrt{2}}{\theta }\right)\, d\theta=-\sqrt{2} (2+\log (\pi )-2\log (2))$$

Edit

$$\Omega(\epsilon)=\int^\pi_\epsilon\frac{\cos(\theta)}{\sqrt{1-\cos(\theta)}}\,d\theta=2\frac{ \sin \left(\frac{\epsilon }{2}\right) \log \left(\cot \left(\frac{\epsilon }{4}\right)\right)- \sin (\epsilon )}{\sqrt{1-\cos (\epsilon )}}$$ If you let $\epsilon=4 \tan ^{-1}(t)$ $$\Omega(t)=\sqrt{2} \left(2-\frac{4}{t^2+1}-\log (t)\right)$$