Find the area enclosed by the following curves.
$$r^2=a^2\sin(2\theta)~~~(a>0)$$
To hold the above identity, we want to determine the range of $~ \theta ~$
$$0\le2\theta\le\pi\iff \underbrace{0\le\theta\le {\pi \over 2 }}_{\text{This is it} } $$
$$\begin{align} A&:= {1 \over 2 } \int_{0}^{\pi\over2} r(\theta)^2 \mathrm{d}\theta\\ &={1 \over 2 }\int_{0}^{\pi\over2} a^2 \sin(2\theta) \mathrm{d}\theta\\ &={a^2 \over 2 }\int_{0}^{\pi\over2}2\sin(\theta)\cos(\theta) \mathrm{d}\theta \\ &={a^2 }\int_{0}^{\pi\over2}\sin(\theta)\cos(\theta) \mathrm{d}\theta\\ I&:=\int \sin(\theta)\cos(\theta) \mathrm{d}\theta\\ t&:=\sin(\theta)\\ {\mathrm{d}t \over \mathrm{d} \theta }&=\cos(\theta)\iff \mathrm{d} t= \mathrm{d} \theta \cos(\theta)\\ I&=\int t \mathrm{d} t \\&= {1 \over 2 }t^2+ \mathrm{const} \\&= {1 \over 2 }\sin(\theta)^2+ \mathrm{const}\\ \therefore A&=a^2 \left\{ {1 \over 2 }\sin(\theta)^2 \right\}\Bigg|_{0}^{\pi\over2} \\ &={a^2 \over 2 }\sin(\theta)^2\Big|_{0}^{\pi\over2}\\ &={a^2 \over 2 } \end{align}$$
But the book(A First Course in Calculus by Serge Lang) says the correct answer is $~ a^2 ~$
Where I've made mistake(s)?
The correct equation for the answer is as following.
$$\begin{align} A&=\color{fuchsia}{\int_{0}^{\pi\over2} {1 \over 2}r(\theta)^2 \mathrm{d} \theta + \int_{\pi}^{3\pi\over2} {1 \over 2}r(\theta)^2 \mathrm{d} \theta} \\&= {a^2 \over 2 } + {a^2 \over 2 }\sin(\theta)^2\Bigg|_{\pi}^{3\pi\over2} \\&=a^2 \end{align}$$
One should consider for any section of $~0\le\theta\le2\pi$ with this kind of problem.