<s>[INST] Calculate $\int_{S^2}\frac{1}{\sqrt{(x-a)^2+(y-b)^2+(z-c)^2}}dS$ where $a^2+b^2+c^2<1$. 
Let $a^2+b^2+c^2 < 1$ and $S^2$ be unit sphere in $R^3$. Calculate $$\int_{S^2}\frac{1}{\sqrt{(x-a)^2+(y-b)^2+(z-c)^2}}dS$$

Let $(x,y,z)=(\cos\theta \cos\phi,\cos\theta \sin\phi, \sin\theta)$. By definition,
$$\int_{S^2}\frac{1}{\sqrt{(x-a)^2+(y-b)^2+(z-c)^2}}dS\\
=\int_{0}^{2\pi}\int_{0}^{\pi}\frac{1}{\sqrt{(\cos\theta \cos\phi-a)^2+(\cos\theta \sin\phi-b)^2+(\sin\theta-c)^2}}\sin\theta d\theta d\phi$$
It is too complicate.
This is calculus exam problem that I took yesterday.  Is there any good idea?
 [/INST] taking my suggested simplification a little further, since $y^2+z^2=1-x^2$ on the surface of the sphere, we obtain:
$$
I = 2\pi \int_{-1}^1 \frac{1}{\sqrt{1-2xr+r^2}}dx
$$
</s>