I am sorry if the following query is too basic or technically incorrect. Actually I am quite away from mathematics so I could not figure out how to solve this.
I have the following function.
$$f(\Theta,\Phi) = \int_0^\pi d\phi \int_0^\pi d\theta \frac{sin\theta}{\sqrt{1-\{\cos\Theta \cos \theta +\sin\Theta \sin\theta\cos(\Phi-\phi)\}^2}} $$
for $\Theta = \Phi = 0$ $$f(0,0) = \int_0^\pi d\phi \int_0^\pi d\theta \frac{sin\theta}{\sqrt{1-\{\cos0 \cos \theta +\sin0 \sin\theta\cos(0-\phi)\}^2}}$$
$\implies$ $$f(0,0) = \int_0^\pi d\phi \int_0^\pi d\theta \frac{sin\theta}{\sqrt{1-\cos^2 \theta}} $$ $\implies$ $$f(0,0) = \int_0^\pi d\phi \int_0^\pi d\theta \frac{sin\theta}{\sin\theta} $$
$\implies$ $$f(0,0) = \pi^2$$
But if I want to calculate using discrete summation then, firstly I take $$\Delta i = \Delta j = \frac{\pi}{180}$$ and $$i = j = (0,1,2...,180)$$ $$\theta_i = \phi_i = \frac{i}{180}\pi$$ $$f(0,0) = \Delta i \Delta j \sum_{i=1}^{180}\sum_{j=1}^{180}\frac{sin\theta_i}{\sqrt{1-\{\cos0 \cos \theta_i +\sin0 \sin\theta_i\cos(0-\phi_j)\}^2}}$$ But at when I calculate it using Matlab, then at $i =j= 1$ above equation results to $\inf$ or singularity.
I just want to calculate it discretely. Can someone help me with some methods which I can follow to calculate this discretely?
Thanks in advance