Determine the value of the double integral (lemniscate for $x \ge 0$ So this time I have to evaluate the following integral:
$$\int \int \sqrt{a^2-x^2-y^2}dxdy$$ in the area
$$(x^2+y^2)^2=a^2(x^2-y^2)$$
and $$x \ge 0$$, $$a > 0 $$
So my first instinct was to introduce polar coordinates
$x=r\cos\phi$
$y=r\sin\phi$
$|J| = r$
So, substituting this we have that $$r^4 = a^2r^2\cos(2\phi)$$
or
$$r = a \sqrt{\cos(2\phi)}$$
this means that $$r \in [0, a\sqrt{\cos(2\phi)}$$
For the angle $\phi$, we have that $x \ge 0$, so $$\phi \in [-\frac{\pi}{2}, \frac{\pi}{2}]$$
Now, I'm not sure if my boundaries for the angle are correct, because in the upper boundary for $r$ I have the square root of cosine, so I don't know if I should take $\cos(2\phi) \ge 0$ into account.
If my deduction is correct, the integral would be:
$$ \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \int_0^{a\sqrt{\cos(2\phi)}} r\sqrt{a^2-r^2}drd\phi $$
However, I'm not sure if my boundaries for the angle are correct.

No, your boundaries are not correct. Since $r^2=a^2\cos(2\phi)$, you must have $\phi\in\left[-\frac\pi4,\frac\pi4\right]$, so that $\cos(2\phi)\geqslant0$. So, compute$$\int_{-\pi/4}^{\pi/4}\int_0^{a\sqrt{\cos(2\phi)}}r\sqrt{a^2-r^2}\,\mathrm dr\,\mathrm d\phi.$$You should get:\begin{align}\int_{-\pi/4}^{\pi/4}\int_0^{a\sqrt{\cos(2\phi)}}r\sqrt{a^2-r^2}\,\mathrm dr\,\mathrm d\phi&=2\int_0^{\pi/4}\int_0^{a\sqrt{\cos(2\phi)}}r\sqrt{a^2-r^2}\,\mathrm dr\,\mathrm d\phi\\&=2\int_0^{\pi/4}\frac13a^3 \left(1-2 \sqrt2\sin^3(\phi)\right)\,\mathrm d\phi\\&=\frac1{18}a^3\left(20-16\sqrt2+3\pi\right).\end{align}
