# Homework Help: Integral - Length of cardioid arc question

1. Jan 6, 2012

### karkas

1. The problem statement, all variables and given/known data
Hey all, I'm trying to calculate the length of the cardioid r(θ)=1+cosθ (polar coordinates) and I figured I'd try to do it in one integral from 0 to 2Pi.

2. Relevant equations
So the integral is $$\int_{0}^{2\pi} \sqrt{r^2 + (\frac{dr}{d\theta})^2}d\theta$$

3. The attempt at a solution
and it becomes $$\int_{0}^{2\pi} \sqrt{1+cos\theta} d\theta$$ which becomes I've found
$$\int_{0}^{2\pi} \sqrt{1+cos\theta} d\theta = \int_{0}^{2\pi} \frac{sin\theta}{\sqrt{1-cos\theta}} d\theta = 2\sqrt{1-cos\theta} |_{0}^{2\pi}$$

but that gives me 0 , although I run it through mathematica and it gives me $$4sqrt{2}$$. Why?

Last edited: Jan 6, 2012
2. Jan 6, 2012

### Poopsilon

$$\int_0^{2\pi} \sqrt{r^2 + (\frac{dr}{d\theta})^2}d\theta = \int_0^{2\pi} \sqrt{(1+cos\theta)^2 + sin^2\theta} d\theta = \int_0^{2\pi} \sqrt{2+2cos\theta}d\theta$$

Edit: Although this oversight is not enough to fix the problem. The integral is clearly always positive thus it can't be zero. You can note that the integral between 0 and 2pi is symmetric around pi and thus integrate $2\int_0^{\pi} \sqrt{2+2cos\theta}d\theta$. Something generally goes wrong when you try to do these integrals of trig functions between k and k+2pi, although I'm not sure exactly why that is; maybe somebody else more knowledgable can help explain why.

Last edited: Jan 6, 2012
3. Jan 6, 2012

### karkas

yep I left the sqrt2 factor out because the real problem is the $$\int_{0}^{2\pi} \sqrt{1+cos\theta} d\theta$$. I know, and by taking limits as 0 and pi/2 I can find a non-zero answer, but does mathematica do the same thing or am I missing something?

4. Jan 6, 2012

### Dick

$$\int_{0}^{2\pi} \sqrt{1+cos\theta} d\theta = \int_{0}^{2\pi} \frac{|sin\theta|}{\sqrt{1-cos\theta}} d\theta$$

You took a square root of $sin^2\theta$ and left out the absolute value. That's what's going wrong.

5. Jan 6, 2012

### karkas

Ah I tend to ignore these restrictions because I've been heavily working with indefinite integrals. So I break the integral into two others depending on where sin(theta) is positive or not and add them?

6. Jan 6, 2012

Sure.

7. Jan 6, 2012

### karkas

Ok thanks, rock on!