Compute $\int_C x\sqrt{x^2-y^2} \mathrm ds$ 
Compute $$\int_C x\sqrt{x^2-y^2} \mathrm ds$$ 
  where $C:(x^2+y^2)^2=a^2(x^2-y^2)$ with $x\geq 0$.

My attempt:   
For this I tried the parametrization: $x=r\cos t,y=r\sin t$, but it doesn't seem to work and I get to: $\cos(2t)=\dfrac 1{a^2}$, so $t\in \left[3\dfrac {\pi}2,5\dfrac {\pi}2 \right]$?
 A: Note that the curve $(x^2+y^2)^2=a^2(x^2-y^2)$ (a lemniscate) is symmetric with respect to the $y$-axis so the line integral  on the WHOLE curve $C$, $\int_C x\sqrt{x^2-y^2}ds$ should be zero.
With the condition $x\geq 0$, then by using polar coordinates the curve becomes $r^2(\theta)=a^2\cos(2\theta)$. By symmetry with respect to $x$-axis, the integral can be taken along only one quarter of the whole curve: 
$$\int_{C^+} x\sqrt{x^2-y^2}ds=2\int_0^{\theta_1} r(\theta)\cos(\theta)\frac{r(\theta)^2}{|a|}\sqrt{r(\theta)^2+r'(\theta)^2}d\theta.$$
where $\cos(2\theta_1)=0$ that is $\theta_1=\pi/4$.
Can you take it from here?
A: Hint:
WLOG, $a=1$, for comfort. Using the polar form, the curve has the equation
$$r^4=r^2\cos2t,$$ or $$r=\sqrt{\cos2t}.$$
Then,
$$\dot r=-\frac{\sin2t}{\sqrt{\cos 2t}}$$
The integral now reads
$$\int r\cos t\sqrt{\cos2t}\,ds=\int r\cos t\sqrt{\cos2t}\sqrt{r^2+\dot r^2}\,dt=\int \cos t\sqrt{\cos2t}\,dt$$
after simplification. It is easier to integrate in the form
$$\int \cos t\sqrt{1-2\sin^2t}\,dt$$
and that leads to the area of an ellipse.
The answer will be of the form $\pi\sqrt2$ with a small integer or rational coefficient.

For $a\ne1$, the result just needs to be multiplied by $a^3$.
