3

I would like someone to review my solution please, the original question is to calculate

$\iiint \frac{1}{x^2+y^2+(z-2)^2}dA$ where $A=\{x^2+y^2+z^2 \leq 1\}$

What I did:

First I changed variables to polar coordinates in order to simplify the boundaries:

$x=r\sin\theta cos\phi$, $y=r\sin\theta \sin\phi$, $z=r\cos\theta$, $0\leq r \leq 1$, $0\leq \theta \leq \pi$, $0 \leq \phi \leq 2\pi$ and the jacobian is $r^2\sin\theta$.

to get the following result:

$$\int_{0}^{2\pi}\int_{0}^{\pi}\int_{0}^{1} \frac{r^2sin\theta}{r^2-2rcos\theta+4}drd\theta d\phi$$

We can see that $\phi$ doesn't appear in any integral, so we can just multiply by $2\pi-0=2\pi$ and forget about it:

$$\int_{0}^{2\pi}\int_{0}^{\pi}\int_{0}^{1} \frac{r^2sin\theta}{r^2-2rcos\theta+4}drd\theta d\phi =2\pi \int_{0}^{\pi}\int_{0}^{1} \frac{r^2sin\theta}{r^2-2rcos\theta+4}drd\theta$$

now I used substitution, $\alpha=-cos\theta$, $d\alpha =sin\theta d\theta$, $-1 \leq \alpha \leq 1$

$$2\pi \int_{0}^{\pi}\int_{0}^{1} \frac{r^2sin\theta}{r^2-2rcos\theta+4}drd\theta=2\pi \int_{-1}^{1}\int_{0}^{1}\frac{r^2sin\theta}{r^2+2r\alpha+4}dr\frac{d\alpha}{sin\theta}$$

cancel the sine to get:

$$2\pi \int_{-1}^{1}\int_{0}^{1}\frac{r^2}{r^2+2r\alpha+4}drd\alpha$$

this integral is very difficult (at least wasn't apparent to me) if we integrate by $r$. luckily, Fubini's theorem states that we can integrate by $\alpha$ first and the result won't change:

$$2\pi \int_{-1}^{1}\int_{0}^{1}\frac{r^2}{r^2+2r\alpha+4}drd\alpha=2\pi\int_{0}^{1}\int_{-1}^{1}\frac{r^2}{r^2+2r\alpha+4}d\alpha dr $$

The antiderivative of $$\frac{1}{r^2+2r\alpha+4}$$ with respect to alpha is $$\frac{\ln(r^2+2r\alpha+4)}{2r}$$

since $\alpha$ goes from $-1$ to $1$: $$\frac{\ln(r^2+2r+4)}{2r}-\frac{\ln(r^2-2r+4)}{2r} = \frac{\ln(r+2)^2-\ln(r-2)^2}{2r}=\frac{\ln(\frac{r+2}{r-2})}{r}$$ so:

$$2\pi\int_{0}^{1}\int_{-1}^{1}\frac{r^2}{r^2+2r\alpha+4}d\alpha dr=2\pi \int_{0}^{1}r\ln(\frac{r+2}{r-2})dr$$

Now I integrated by parts $\int uv'=uv-\int u'v$ where $u=\ln(\frac{r+2}{r-2})$, $u'=\frac{-4}{r^2-4}$, $v'=r$, $v=\frac{r^2}{2}$:

$$\int r\ln(\frac{r+2}{r-2})dr=\frac{r^2ln(\frac{r+2}{r-2})}{2}-\int\frac{-2r^2}{r^2-4}dr =\frac{r^2ln(\frac{r+2}{r-2})}{2}+2(r+\ln(\frac{r-2}{r+2})+2)$$

when $r=1$:

$$\frac{1^2ln(-3)}{2}+2(1+\ln(\frac{-1}{3})+2)=\frac{1}{2}\ln(-3)-2\ln(-3)+6=-\frac{3}{2}\ln(3)-\frac{3\pi i}{2}+6$$

when $r=0$:

$$0+2(0+\ln(-1)+2)=2\ln(-1)+4=2\ln(1)+2\pi i+4=4+2\pi i$$

Subtract the 2 results to get: $$-\frac{3}{2}\ln(3)-\frac{3\pi i}{2}+6-4-2\pi i=2-\frac{3}{2}\ln(3)-\frac{7\pi i}{2}$$

Multiply this result by $2\pi$ to reach the final answer which is $$4\pi-3\pi \ln(3)-7\pi^2i$$

Is this indeed the correct answer? Is there a better way of solving this? this seems like a very difficult way to do the exercise.

S L
  • 11,961
Oria Gruber
  • 13,035
  • By the way, wolfram alpha does not agree with this result. according to wolfram the correct answer is http://www5a.wolframalpha.com/Calculate/MSP/MSP38011eahcea43i4940h100001ii608d1gg7g99ea?MSPStoreType=image/gif&s=17&w=342.&h=43. – Oria Gruber May 22 '14 at 22:09
  • $\ln(x<0)$ doesn't exist so you can't say $\ln((r-2)^2)=2\ln(r-2)$ – Fabien May 22 '14 at 22:11
  • by definition $\ln(a<0)=\ln(-a)+\pi i$. logarithm rules don't work with complex numbers? – Oria Gruber May 22 '14 at 22:12
  • Your integral is real so there's no way your result can be complex – Fabien May 22 '14 at 22:15
  • Yes I agree, this is a very strange result but I can't put my finger on where I made the mistake. I'm sure its not the $ln((r-2)^2)=2ln(r-2)$ because that is still true. However, somewhere along the lines the imaginary factors should cancel themselves, but they don't. so clearly i made a mistake – Oria Gruber May 22 '14 at 22:16
  • @OriaGruber Actually the exponent rule for complex $\log$ doesn't hold. See this. – Git Gud May 22 '14 at 22:28
  • @OriaGruber Without really checking it out, I'd say your mistake is right at the start. I don't think your transformation transforms $M$ is a sphere. You probably should have done $z=2+r\cos(\theta)$. – Git Gud May 22 '14 at 22:39
  • wolf says the answer is zero. http://www.wolframalpha.com/input/?i=Integrate%5B++r%5E2+Sin%5Bt%5D%2F%28r%5E2+-+2+r+Cos%5Bt%5D+%2B+4%29%2C+%7Br%2C+0%2C+1%7D%2C+%7Bt%2C+0%2C+2+Pi%7D%2C+%7Bp%2C+0%2C++++Pi%7D%5D – S L May 22 '14 at 22:46
  • Why would that effect the result? I understand why picking $z=2+rcos\theta$ would simplify the integral a bit, but my transformation is valid. i should arrive at the correct result. it seems like the exponent rule does not apply for logarithm of a negative number. I guess that is the problem – Oria Gruber May 22 '14 at 22:46
  • @OriaGruber In the denominator, after the transformation, I'm not getting the same as you. Where you have a $2$, I get a $4$. – Git Gud May 22 '14 at 23:03
  • You are right. the result is different...I don't understand what's going on. – Oria Gruber May 22 '14 at 23:07
  • @OriaGruber What do you mean? You've found your mistake, what's keeping you from making progress? – Git Gud May 22 '14 at 23:10
  • changing to spherical coordinates is a diffeomorphism. $\int_{\psi(S)}f =\int f|det(D\psi)|$ should still hold. But we get different integrals right after the transformations. so clearly one transformation is false. Why can't I change to spherical coordinates here? – Oria Gruber May 22 '14 at 23:14
  • @OriaGruber But you can. Why do you claim you can't? Did you fix the denominator and tried to carry on with the calculation? – Git Gud May 22 '14 at 23:15
  • Ah I see now, I made a silly computation error, I thought that we get different results because we used different transformations (which I won't stand for). Thanks Git yet again. I will write a full correct answer first thing tomorrow morning – Oria Gruber May 22 '14 at 23:20
  • @OriaGruber Actually in my comment about $2$ and $4$ I was using your transformation. Good luck with this. Good night. – Git Gud May 22 '14 at 23:21
  • The answer I get using the transformation is $$\pi, \left(2-\frac{3}{2}\log{3}\right) \approx 1.1060968643$$ – gar May 23 '14 at 11:10
  • I get the same result – Oria Gruber May 23 '14 at 12:35

1 Answers1

4

\begin{align*} \int_{0}^{2\pi}\int_{0}^{1}\int_{0}^{\pi} \frac{r^2\, \sin\theta}{r^2-4\, r\, \cos\theta+4}\, d\theta \, dr\, d\phi &= 2\, \pi\, \int_{0}^{1} \, \frac{r}{4}\, \log(r^2-4\, r\, \cos\theta +4) \Big|_0^\pi \, dr\\ &= 2\, \pi\, \int_{0}^{1} \, \frac{r}{4}\, \left(\log{(r+2)^2}-\log{(r-2)^2}\right)\, dr\\ &= 2\, \pi\, \Big(\frac{r^2}{8} \, \log(r+2)^2 - \frac{r^2}{8} \, \log(r-2)^2 + r - \log(r + 2) + \log(r - 2) \Big) \Big\vert_0^1\\ &= \pi\, \left(2-\frac{3}{2}\log{3}\right) \approx 1.1060968643 \end{align*}

gar
  • 4,988