<s>[INST] Length of cardiod $r=1+\sin\left(\theta\right)$ I'm pretty sure this is correct since I'm able to justify each of the steps but I'm just wondering if there's a more efficient way that isn't just skipping steps? Because I had to do 2 substitutions, one of which converted sine into cosine.
\begin{align*}
\text{Length }= & \ 2 \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \sqrt{2 + 2\sin\left(\theta\right)} d\theta \\
= & \ 2  \sqrt{2} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \sqrt{1 + \sin\left(\theta\right)} d\theta\\
= & \ - 2\sqrt{2} \int_{\pi}^{0} \sqrt{1+ \sin\left(\frac{\pi}{2}-x\right) } dx \\
= & \ - 2\sqrt{2} \int_{\pi}^{0} \sqrt{1+ \cos\left(x\right) } dx \\
= & \ - 2\sqrt{2} \int_{\pi}^{0} \sqrt{2 \cos^2\left(\frac{x}{2}\right)} dx \\
= & \ - 4 \int_{\pi}^{0} \left|\cos\left(\frac{x}{2}\right)\right| dx \\
= & \ 4 \int_{0}^{\pi} \cos\left(\frac{x}{2}\right) dx \\
= & \ 4 \cdot 2 \int_{0}^{\frac{\pi}{2}} \cos\left(u\right) du \\
= & \ 8 \left[\sin\left(u\right)\right]_{u=0}^{u=\frac{\pi}{2}} \\
= & \ 8 \left[\sin\left(\frac{\pi}{2}\right) - \sin\left(0\right) \right] \\
= & \ 8 \\
\end{align*}
edit: admittedly, I do know of other answers but I have no idea how one would have come across such trigonometric identities, or reason out how such an identity would be beneficial.
 [/INST] Everything is correct including the setup of the integral (using symmetry), but note that $1 + \sin x = (\cos x/2 + \sin x/2)^2$ as mentioned here.
When taking the square root you have $|\cos x/2 + \sin x/2|$, but since this equals $|\sqrt{2} \cos(x/2 - \pi/4)|$ which is non-negative for $-\frac{\pi}{2} ≤ x ≤ \frac{3 \pi}{2}$, $|\cos x/2 + \sin x/2| = \cos x/2 + \sin x/2$ for your integral.
</s>