Wikipedia:Reference desk/Archives/Mathematics/2013 July 1

= July 1 =

Deriving volume of a cone formula with double integration
I am trying to derive $$V=\frac{1}{3}\pi hr^{2}$$ using the following double integral:

$$\int\limits_{-r}^{r}\int\limits_{-\sqrt{r^{2}-x^{2}}}^{\sqrt{r^{2}-x^{2}}}h-\frac{h}{r}\sqrt{x^2+y^2} dy dx$$

because I observed that a cone can be defined by that equation. The problem is, it gets messy after the first integration:

$$\int\limits_{-r}^{r}\int\limits_{-\sqrt{r^{2}-x^{2}}}^{\sqrt{r^{2}-x^{2}}}h-\frac{h}{r}\sqrt{x^2+y^2} dy dx = \int\limits_{-r}^{r} \left(hy - \frac{h}{r}\left(\frac{x^{2}\ln{|\sqrt{x^2+y^2}+y|}}{2}+\frac{y\sqrt{x^2+y^2}}{2}\right)\right)\bigg|_{-\sqrt{r^2-x^2}}^{\sqrt{r^2-x^2}} dx = \int\limits_{-r}^{r} 2h\sqrt{r^2-x^2}-\frac{h}{2r}\left(x^2\ln\left|\frac{r+\sqrt{r^2-x^2}}{r-\sqrt{r^2-x^2}}\right|+2r\sqrt{r^2-x^2}\right) dx$$

The first term easily integrates to $$\pi hr^2$$ because I recognize it as the area of a circle times the height, while the last term similarly integrates to (after distributing the $$\frac{h}{2r}$$) $$\frac{\pi hr^2}{2}$$. But I cannot see how the second term will integrate to the missing $$-\frac{\pi hr^2}{6}$$. I know the volume is readily obtained using disk integration and/or polar coordinates. However, it still should be possible to obtain it using plain rectangular coordinates too.--Jasper Deng (talk) 19:34, 1 July 2013 (UTC)
 * Try integration by parts.  Sławomir Biały  (talk) 20:12, 1 July 2013 (UTC)
 * I did. But that natural log-based expression alone has no elementary anti-derivative I could think of. Trigonometric substitutions didn't help either.--Jasper Deng (talk) 20:41, 1 July 2013 (UTC)
 * The log term should be the u in integration by parts, the $$x^2$$ is the dv. So you shouldn't need to find an antiderivative of the log factor.  (See, for instance, the ILATE rule.)   Sławomir Biały  (talk) 20:54, 1 July 2013 (UTC)

Perhaps I did not try hard enough though, as it turns out that $$\int\ln({r+\sqrt{r^2-x^2}}) dx = x\ln{(r-\sqrt{r^2-x^2})}+r\arctan{\frac{x}{\sqrt{r^2-x^2}}}-x$$ and $$\int\ln({r-\sqrt{r^2-x^2}}) dx = x\ln{r-\sqrt{r^2-x^2}}-r\arctan{\frac{x}{\sqrt{r^2-x^2}}}-x$$. Oh well.--Jasper Deng (talk) 20:58, 1 July 2013 (UTC)
 * Still, however, I can't see how the missing $$-\frac{\pi hr^2}{6}$$ will come out of all of that.--Jasper Deng (talk) 21:04, 1 July 2013 (UTC)
 * Reset. Try again.  $$u=\ln\left|\frac{r+\sqrt{r^2-x^2}}{r-\sqrt{r^2-x^2}}\right|$$,  $$dv=x^2\,dx$$, so $$du=?$$ and $$v=?$$.   Sławomir Biały  (talk) 21:51, 1 July 2013 (UTC)
 * OK, so with that, we have $$\frac{1}{3}x^3\ln\left|\frac{r+\sqrt{r^2-x^2}}{r-\sqrt{r^2-x^2}}\right| - \int\frac{x^3r(r-\sqrt{r^2-x^2})dx}{\sqrt{r^2-x^2}(\sqrt{r^2-x^2}+r)(r\sqrt{r^2-x^2}+\frac{x^2}{2}-r^2)}$$, which doesn't seem very encouraging, but seems solvable with a trigonometric substitution.--Jasper Deng (talk) 22:14, 1 July 2013 (UTC)
 * You'll probably want to apply partial fractions now. (Or, cleverly manipulate the original logarithm factor.)   Sławomir Biały  (talk) 22:31, 1 July 2013 (UTC)
 * I obtained the erroneous result $$2r\sqrt{r^2-x^2}$$ using trigonometric substitution. I don't really know how to decompose this expression because it contains square roots in the denominator. It seems like a trigonometric substitution would be most obvious, but it gave me that erroneous result (the substitution was $$x=r\sin{u}$$, $$dx=r\cos{(u)}du$$ - eventually the expression reduced to $$\int-2r^{2}\sin{(u)}du$$).--Jasper Deng (talk) 23:12, 1 July 2013 (UTC)
 * The special case r=1 and h=1 simplifies the expressions and is rather easily generalized afterwards. Bo Jacoby (talk) 07:04, 2 July 2013 (UTC).

I just realized that by expressing the logarithm expression as a single term, I was really making life harder for myself. By separating the natural log into $$\ln{(r+\sqrt{r^2-x^2})}-\ln{(r-\sqrt{r^2-x^2})}$$, the second term of the integration by parts becomes $$\int\frac{-2xr}{\sqrt{r^2-x^2}} dx$$, which however still returns that erroneous result. I'm missing a key term, namely $$\frac{1}{3}r^3\arctan\frac{x}{\sqrt{r^2-x^2}}$$ - and I know that's the key term that will give me the missing piece of volume.--Jasper Deng (talk) 19:12, 3 July 2013 (UTC)
 * The second term of which integration by parts? You shouldn't get something that looks like this, IMO, but if you did it would just integrate away.  Sławomir Biały  (talk) 19:23, 3 July 2013 (UTC)
 * With v the natural log expression, as above (in my comment "OK, so with that, we have...."), dv is much simpler if I separate the quotient inside the natural log (for clarity, I had $$du=x^2 dx$$).--Jasper Deng (talk) 19:28, 3 July 2013 (UTC)

Perhaps the fact that $$\int\limits_{-\sqrt{r^2-x^2}}^{\sqrt{r^2-x^2}} = 2 \int_0^\sqrt{r^2-x^2}$$ and $$\int_{-r}^r = 2 \int_0^r$$ might prove itself a bit useful in simplifying some of the intermediary formulas ? — 79.113.211.75 (talk) 21:11, 3 July 2013 (UTC)
 * It doesn't really help, though, because I still wind up with that nasty natural log-based expression that's been a quandry for me.--Jasper Deng (talk) 21:14, 3 July 2013 (UTC)
 * I beg to differ. Ultimately, I arrive at
 * $$4 \int_0^r\int_0^\sqrt{...} ...\ dy\ dx = \pi r^2 h - 2\ \frac{h}{r}\ I$$
 * where
 * $$I = \int_0^r{\left[ x^2 \ln(r + \sqrt{r^2 - x^2}) + r \sqrt{r^2 - x^2} - x^2 \ln x \right]}dx$$
 * whose calculation is trivial. — 79.113.211.75 (talk) 21:59, 3 July 2013 (UTC)
 * But how did you arrive at that last integral? That's the step I'm a bit stuck on.--Jasper Deng (talk) 22:11, 3 July 2013 (UTC)
 * Sorry, I wrote a wrong expression for I earlier. Please check again to see the corrected version. The idea is that when the lower integration limit is 0 instead of a square root, the expression thus obtained is simpler. Or you might just use the fact that $$\scriptstyle\ln\tfrac{a}{b}\ =\ \ln a\ -\ \ln b$$ to arrive at the same result from your own previous calculations. — 79.113.211.75 (talk) 22:42, 3 July 2013 (UTC)
 * To me, the first term in your integrand above isn't trivial. As you can see above, I came to the same wrong antiderivative for that term when trying to integrate it by parts.--Jasper Deng (talk) 23:27, 3 July 2013 (UTC)
 * Then what exactly seems to be the problem ? We have I = I1 + I2 - I3. The last two are indeed trivial, and the first one is calculated through integration by parts, after making first the substitution t = rx, with F'(t) = t2 ⇔ F(t) = $$\tfrac{t^3}{3}$$ and G(x) = Ln(1 + √ 1 - t 2), ultimately arriving at
 * $$I_1 = r^2\int_0^1{t^2\left[\ln r + \ln(1+\sqrt{1-t^2})\right]}\ dt = r^2\left[\frac{t^3}{3}\left(\ln r + \ln(1+\sqrt{1-t^2}) - \tfrac13\right) + \frac{\arcsin t - t\sqrt{1-t^2}}{6}\right]_0^1 = ...$$
 * Then we add all three of them together to calculate the value of I, which we then replace into our initial formula above. — 79.113.211.75 (talk) 00:24, 4 July 2013 (UTC)
 * Yeah, sorry, I was having difficulties performing that integration by parts - somehow my trigonometric substitution has to be flawed for the integration by parts. The antiderivative I was shooting for is slightly different from yours, but it does the job. Still, I'd like to know what went wrong with the trigonometric substitution (which tempts me whenever I have that kind of square root expression in the integrand) that caused a whole term (the one having the inverse trigonometric function in it) to disappear.--Jasper Deng (talk) 00:52, 4 July 2013 (UTC)
 * My guess is that you probably made several small mistakes along the way, due to a crowded working-style. My advice would be to divide and conquer. — 79.113.211.75 (talk) 01:16, 4 July 2013 (UTC)