<s>[INST] Help with Polar coordinates and the length of the curve. I have a test coming up today and I was going over our past midterms and this question came up. I tried it but its not working, please any hints or solution in how to do it will be really helpful.
Question:
Consider the polar curve $r = min(1 - cos(\theta), 1 + sin(\theta))$ and  $\theta \in [0, \frac{3\pi}{2}]$
a) Sketch the curve. TO sketch the curve you will need to rewrite r as a case define function
$r = 1 - cos(\theta), \theta \in [a, b]$ and $1 + sin(\theta), \theta \in [c, d]$
with $a, b, c, d$ to be determined.
b) Find the length of the curve. In the final answer you don't need to evaluate the values of sin or cos.
My attempt:
So what I did was I graphed the polar curve of $1 - cos(\theta)$ and $1 + sin(\theta)$ I drew it on the same graph. 
I can see that there is a point of intersection and that a and d maybe be 0. But I am not understanding the question properly. My friend told me that I need to use $tan(\theta) = -1$ but I am really confused. 
and b is followed by a, please any hints or solutions would be really appreciated.
Thank you
 [/INST] Both of the polar curves in this problem are cardioids:  $ \ r = 1 - \cos \theta \ $ has its symmetry axis along the $ x-$ axis with the cusp opening in the positive $ x-$ direction and $ \ r = 1 + \sin \theta \ $ has its symmetry axis along the $ y-$ axis, its cusp opening in the negative $ y-$ direction. 
The points of interest in dealing with these polar curves are the values of $ \ \theta \ $ in the "principal circle" ( $ 0 \le \theta < 2 \pi  $ ) at which $ \ r = 0 \ $ and at which the two curves intersect.  The "horizontal" cardioid meets the origin for
$$ 1 \ - \ \cos \theta \ = \ 0 \ \  \Rightarrow \ \ \cos \theta \ = \ 1 \ \ \Rightarrow \ \ \theta \ = \ 0 \ \ \ \text{and} $$
and the "vertical" cardioid, for
$$ 1 \ + \ \sin \theta \ = \ 0 \ \  \Rightarrow \ \ \sin \theta \ = \ -1 \ \ \Rightarrow \ \ \theta \ = \ \frac{3 \pi}{2} \ \ . $$
These curves intersect where
$$ 1 \ - \ \cos \theta \ = \ 1 \ + \ \sin \theta  \ \ \Rightarrow \ \ \sin \theta \ = \ - \cos \theta \ \ \Rightarrow \ \ \tan \theta \ = \ -1 \ \ \Rightarrow \ \ \theta \ = \ \frac{3 \pi}{4} \ , \ \frac{7 \pi}{4} \ \ . $$
(Dividing through by cosine is "safe" because it does not equal zero at any intersection point.)
Since we wish to use the portions of each curve closest to the origin (the specified "minimum radius" condition), our polar curve will consist of two parts meeting at the intersection point in the second quadrant:
$$ r(\theta) = \left\{ \begin{array}{rcl}
1 \ - \ \cos \theta & \mbox{for}
& 0 \ \le \ \theta \ \le \ \frac{3 \pi}{4} \ \ \text{ [blue arc] } \\ 1 \ + \ \sin \theta & \mbox{for}
& \frac{3 \pi}{4} \ \le \ \theta \ \le \ \frac{3 \pi}{2} \ \ \text{ [red arc] }
\end{array}\right.  $$

We wish to find the arclength of this piecewise-defined curve.  Since it is symmetrical about the line $ \ \theta = \frac{3 \pi}{4} \ $ , we can integrate one-half of the curve and double the result.  As a reminder, the polar form of the infinitesimal arclength element is given by 
$$ ds^2 \ = \ dx^2 \ + \ dy^2 \ = \ dr^2 \ + \ r^2 \ d\theta^2 \ \ . $$
The total arclength of our curve is then
$$ s \ = \ 2 \ \int_0^{3 \pi / 4} \ \sqrt{ \ \left(\frac{dr}{d\theta} \right)^2 \ + \ [ \ r(\theta) \ ]^2} \ \ d\theta  \ \ = \ \ 2 \ \int_0^{3 \pi / 4} \ \sqrt{ \ ( \ \sin \theta \ )^2 \ + \ [ \ 1 \ - \ \cos \theta \ ]^2} \ \ d\theta $$
$$  = \ \ 2 \ \int_0^{3 \pi / 4} \ \sqrt{ \ 2 \ - \ 2 \ \cos \theta } \ \ d\theta \ \ = \ \ 2 \sqrt{2} \ \int_0^{3 \pi / 4} \ \sqrt{ \ 1 \ - \  \cos \theta } \ \ d\theta $$
$$ = \ \ 2 \sqrt{2} \ \int_0^{3 \pi / 4} \ \sqrt{ \ 1 \ - \  \cos \theta } \ \cdot \ \frac{\sqrt{ \ 1 \ + \  \cos \theta }}{\sqrt{ \ 1 \ + \  \cos \theta }}\ \ d\theta \ \ = \ \ 2 \sqrt{2} \ \int_0^{3 \pi / 4} \  \frac{\sqrt{  \sin^2 \theta }}{\sqrt{ \ 1 \ + \  \cos \theta }}\ \ d\theta$$
$$ = \ \ 2 \sqrt{2} \ \int_0^{3 \pi / 4} \  \frac{ | \sin \theta | }{\sqrt{ \ 1 \ + \  \cos \theta }}\ \ d\theta \ = \ 2 \sqrt{2} \ \int_0^{3 \pi / 4} \  \frac{  \sin \theta}{\sqrt{ \ 1 \ + \  \cos \theta }}\ \ d\theta \ \ , $$
for which we have employed the "conjugate factor method" to make the integral tractable; the absolute value brackets in the numerator may be dropped since the calculation will be carried out entirely "above" the $ \ y-$ axis.  Using the substitution  $ \ u \ = \ 1 + \cos \theta \ , \ du \ = \ -\sin \theta \ d\theta \ $ , we find
$$ \rightarrow \ \  2 \sqrt{2} \ \int_2^{1 - (\sqrt{2} / 2)} \  \frac{  - du}{\sqrt{  u}} \ \ = \ \ 2 \sqrt{2} \ \cdot \ 2 \ \sqrt{u} \ \vert^2_{1 - (\sqrt{2} / 2)} $$
$$ = \ 4 \sqrt{2} \ \left[ \ \sqrt{2} \ - \ \sqrt{1 - (\frac{\sqrt{2} }{ 2})} \ \ \right] \ = \ 8 \ \left[ \ 1 \ - \ \frac{\sqrt{2 - \sqrt{2}} }{ 2} \ \right] \ \approx \ 4.939 $$
or
$$ \rightarrow \ \ \ 4 \sqrt{2} \ \cdot  \ \sqrt{1 \ + \ \cos \theta} \ \vert^0_{3 \pi / 4} \ = \ \ 4 \sqrt{2} \ \cdot  \ \left( \ \sqrt{2} \ - \ \sqrt{1 \ + \ \cos  \frac{3 \pi}{4}} \ \right) \ \ . $$
EDIT [4/19] -- As a check, we see that this curve is slightly smaller in arclength than the circumference of a  circle of diameter $ \ 1 \ + \ \frac{\sqrt{2}}{2} \ $ , which is $ \ \frac{2 + \sqrt{2}}{2} \pi  \ \approx \ 5.36 \ $  , so we may have some confidence in our result above.
</s>