Solving a polar integral Hey ya'll thank you in advance for taking the time to answer some math questions...
so let's get into it, I was helping a student trying to work an example from the Stewart Calculus book and it all made sense up until we hit this definite integral, the book says that the answer is a length of 8, since we are dealing with arc length of a polar function.
I left out a few earlier steps, but like I said the book narrows it down to the following definite integral:
$$
L = \int_{0}^{2\pi}
\,\sqrt{\, 2 + 2\sin\left(\theta\right)\,}\,\mathrm{d}\theta
$$
Please try to show as many steps and their justifications, thank.
Apologies for the syntax, but the limits of integration should be from $0$-$2\pi$.
P.S. I got zero, and I also used photomath which also got zero, so I don't know what I'm missing.  The book does say to multiply top and bottom by the conjugate, which is what I did, to get started.  It seems everything goes ok until you have to convert your limits of integration for a $u$-substitution.  Any feedback is appreciated. Have a great day !! :)
 A: Firstly use that
$$2+2\sin{(\theta)}=4\cos^2{\left(\frac\pi4-\frac\theta2\right)}$$
This follows from
$$\sin{(\theta)}=\cos{\left(\frac\pi2-\theta\right)}$$
$$\cos{(\theta)}=2\cos^2{\left(\frac\theta2\right)}-1$$
Hence the integral is
$$\begin{align}
\int_0^{2\pi}\sqrt{4\cos^2{\left(\frac\pi4-\frac\theta2\right)}}d\theta
&=\int_0^{2\pi}2\left|\cos{\left(\frac\pi4-\frac\theta2\right)}\right|d\theta\\
&=\int_0^\frac{3\pi}22\cos{\left(\frac\pi4-\frac\theta2\right)}d\theta-\int_\frac{3\pi}2^{2\pi}2\cos{\left(\frac\pi4-\frac\theta2\right)}d\theta\\
&=\left[-4\sin{\left(\frac\pi4-\frac\theta2\right)}\right]_0^\frac{3\pi}2-\left[-4\sin{\left(\frac\pi4-\frac\theta2\right)}\right]_\frac{3\pi}2^{2\pi}\\
&=4-(-2\sqrt{2})-(2\sqrt{2}-4)\\
&=8\\
\end{align}$$
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
L & \equiv
\int_{0}^{2\pi}\root{2 + 2\sin\pars{\theta}}\,\dd\theta =
\root{2}\int_{-\pi}^{\pi}\root{1 - \sin\pars{\theta}}\,\dd\theta
\\[5mm] & =
\root{2}\sum_{\sigma = \pm 1}\int_{0}^{\pi}
\root{1 + \sigma\sin\pars{\theta}}\,\dd\theta =
\root{2}\sum_{\sigma = \pm 1}\int_{-\pi/2}^{\pi/2}
\root{1 + \sigma\cos\pars{\theta}}\,\dd\theta
\\[5mm] & =
2\root{2}\sum_{\sigma = \pm 1}\int_{0}^{\pi/2}
\root{1 + \sigma\cos\pars{\theta}}\,\dd\theta =
2\root{2}\sum_{\sigma = \pm 1}\int_{0}^{\pi/2}
{\sin\pars{\theta} \over
\root{1 - \sigma\cos\pars{\theta}}}\,\dd\theta
\\[5mm] & =
2\root{2}\sum_{\sigma = \pm 1}\int_{0}^{1}
\pars{1 -\sigma x}^{-1/2}\,\dd x =
2\root{2}\sum_{\sigma = \pm 1}
\left.\vphantom{\Large A}\pars{-2\sigma}
\root{1 -\sigma x}\,\right\vert_{\ x\ =\ 0}^{\ x\ =\ 1}
\\[5mm] & =
4\root{2}\sum_{\sigma = \pm 1}
\bracks{-\sigma\root{1 - \sigma} + \sigma} =
4\root{2}\bracks{\pars{\root{2} - 1} + 1} = \bbx{8}
\end{align}
