# Integral - Length of cardioid arc question

## Homework Statement

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.

## Homework Equations

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

## 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:

$$\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:
$$\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.

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?

Dick
Homework Helper
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?

$$\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.

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?

Dick