I'm finding the area of an ellipse given by $\frac{x^2}{a^2}+\frac{y^2}{b^2} = 1$. I know the answer should be $\pi ab$ (e.g. by Green's theorem). Since we can parameterize the ellipse as $\vec{r}(\theta) = (a\cos{\theta}, b\sin{\theta})$, we can write the polar equation of the ellipse as $r = \sqrt{a^2 \cos^2{\theta}+ b^2\sin^2{\theta}}$. And we can find the area enclosed by a curve $r(\theta)$ by integrating
$$\int_{\theta_1}^{\theta_2} \frac12 r^2 \ \mathrm d\theta.$$
So we should be able to find the area of the ellipse by
$$\frac12 \int_0^{2\pi} a^2 \cos^2{\theta} + b^2 \sin^2{\theta} \ \mathrm d\theta$$
$$= \frac{a^2}{2} \int_0^{2\pi} \cos^2{\theta}\ \mathrm d\theta + \frac{b^2}{2} \int_0^{2\pi} \sin^2{\theta} \ \mathrm d\theta$$
$$= \frac{a^2}{4} \int_0^{2\pi} 1 + \cos{2\theta}\ \mathrm d\theta + \frac{b^2}{4} \int_0^{2\pi} 1- \cos{2\theta}\ \mathrm d\theta$$
$$= \frac{a^2 + b^2}{4} (2\pi) + \frac{a^2-b^2}{4} \underbrace{\int_0^{2\pi} \cos{2\theta} \ \mathrm d\theta}_{\text{This is $0$}}$$
$$=\pi\frac{a^2+b^2}{2}.$$
First of all, this is not the area of an ellipse. Second of all, when I plug in $a=1$, $b=2$, this is not even the right value of the integral, as Wolfram Alpha tells me.
What am I doing wrong?