I have been asked to compute the integral $$\int_{|z|=r}x^2dz$$ for the circle traversed anticlockwise, without parametrisation, by observing that $$x = \frac{1}{2}(z+\bar{z})=\frac{1}{2}(z+\frac{r^2}{z})$$ First I calculated this using a parametrisation which gave me the (hopefully correct) answer of $r^2\pi i$, in order to give me an answer which I can try and obtain.
I have squared the two values for $x$ I am given but I am struggling to see what I can do with the results without using a parametrisation again to solve the integral. Is there something I am blatantly missing or have I just misinterpreted the question, i.e. will I have to use another parametrisation?
Since
$$x^2 = \frac{1}{4}\left(z^2 + \frac{r^4}{z^2} + 2r^2\right),$$
then
$$\int_{|z| = r} x^2\, dz = \frac{1}{4}\int_{|z| = r} z^2\, dz + \frac{r^4}{4}\int_{|z| = r} \frac{dz}{z^2} + \frac{r^2}{2}\int_{|z| = r} dz.\tag{*}$$
The first and third integrals on the right-hand side of (*) are zero by Cauchy's theorem, and the second integral is computed using Cauchy's differentiation formula, which results in zero. Thus, $\int_{|z| = r} x^2\, dz = 0$.
If you did the parametrization calculations correctly, you would have
$$\int_{|z| = r}x^2\, dz = ir^3\int_0^{2\pi} \cos^2(\theta)e^{i\theta}\, d\theta = \frac{ir^3}{4}\int_0^{2\pi} (e^{2i\theta} + e^{-2i\theta} + 2)e^{i\theta}\, d\theta = 0,$$
using
$$\cos(\theta) = \frac{e^{i\theta} + e^{-i\theta}}{2}.$$