Calculate:
$\iint_{D}(x^2-y^2)dxdy$
D is the area inside the lemniscate $(x^2+y^2)^2=4(x^2-y^2)$
My attempt:
Define:
$x=r\cos\theta ,y=r\sin\theta$
Therfore,
$r^4\le4r^2(\cos^2\theta-\sin^2\theta)$
$r^2\le2(\cos 2\theta)$
Hence,
$0\le r\le 2\sqrt{\cos 2\theta}, 0 \le \theta \le \frac{\pi}{4}$
(D is symmetric so we can limit $\theta$ to the first and second quarters and at the end multiply by two)
$$I=\iint_{\Delta }r^3cos2\theta d\theta dr=\int_{0}^{2\sqrt{\cos 2\theta}}(\int_{0}^{\frac{\pi}{4}}r^3\cos 2\theta d\theta)dr=$$
$$\int_{0}^{2\sqrt{\cos 2\theta}}\frac{r^3}{2}\sin 2\theta|^{\frac{\pi}{4}}_{0}dr=\frac{1}{2}\int_{0}^{2\sqrt{\cos 2\theta}}r^3dr=2\cos^2 2\theta$$
I can't find my mistake because obviously the result can't be dependent on $\theta$
You should have computed$$\int_0^{\frac\pi4}\int_0^{2\sqrt{\cos2\theta}}r^3\cos(2\theta)\,\mathrm dr\,\mathrm d\theta.$$Can you take it from here?