how to find this line integral and what is its answer evaluate the line integral $$\int_C (xy^2 dy-x^2y dx), $$ taken in the counter-clockwise sense along the cardioid $$r= a(1+\cos\theta)$$
here putting the parametric form of cardioid $x=a(2\cos t-\cos2t), y= a(2\sin t-\sin2t) $ and taking $\theta$ , $0 $ to $2\pi $ tried  to solve but then it became complicated, so is there any other method and in this method please solve these as well ?
 A: I think this problem can be solved by Green's identity. Let $D$ denote the area of shape enclosed by $C$. By using polar substitution, we have:
\begin{equation}
\int_C(xy^2dy-x^2ydx)=\iint_Dx^2+y^2dxdy
\\=\int_0^{2\pi}\int_0^{a(1+\cos(\theta))}r^3drd\theta\\
=\frac{35}{16}\pi a^4
\end{equation}
I ignore the trigonometric integral in my deduction.
I want to explain the reason that my answer different from @Yiorgos S. Smyrlis's answer. The key is the parametric equation of the Cardioid. That is, $x=a(2\cos(t)-\cos(2t))$, $y=a(2\sin(t)-\sin(2t))$ is not the corresponding parametric equation of $r=a(1+\cos\theta)$! $x=\frac{a}{2}(1+2\cos(t)+\cos(2t))$, $y=\frac{a}{2}(2\sin(t)+\sin(2t))$ is the corresponding parametric equation of $r=a(1+\cos\theta)$! (see Cardioid). I display the two pictures as follow:


The 1st picture is the $r=a(1+\cos\theta)$ and 2nd is  $x=a(2\cos(t)-\cos(2t))$, $y=a(2\sin(t)-\sin(2t))$. We can obviously find the difference at x-axis. It can also easy check that in $x=a(2\cos(t)-\cos(2t))$, $y=a(2\sin(t)-\sin(2t))$, the curve do not cross $(0,0)$ while $r=a(1+\cos\theta)$ do. 
So, if we use the corresponding parametric equation that $x=\frac{a}{2}(1+2\cos(t)+\cos(2t))$, $y=\frac{a}{2}(2\sin(t)+\sin(2t))$ and calculate the integral, we have:
\begin{equation}
\int_C(xy^2dy-x^2ydx)\\
=\int_0^{2\pi}\sin(t)^2\cos(t)a^4(4\cos(t)^5+14\cos(t)^4+17\cos(t)^3+7\cos(t)^2-\cos(t)-1)dt\\
=\frac{35}{16}a^4
\end{equation}
The same answer! So I think if we use the corresponding polar equation of $x=a(2\cos(t)-\cos(2t))$, $y=a(2\sin(t)-\sin(2t))$, we can also get the result that $21\pi a^4$ by using Green's identity. All of our methods are valid but you should distinguish which parametric equation you want to use when you will solve this problem.
About the parametric equation of Cardioid:
The polar equation tell us all points on the curve satisfy that the angle between pole axis is $\theta$ and radius is $a(1+\cos\theta)$. So we can solve it in complex plane. That is, in exponential form, the equation in complex plane is $r=a(1+\cos\theta)e^{i\theta}$. To get the parametric equation, we solve the real part and imaginary part:
\begin{equation}
x=\Re\{ a(1+\cos\theta)e^{i\theta}  \}=\frac{a}{2}(1+2\cos(t)+\cos(2t))\\
y=\Im\{ a(1+\cos\theta)e^{i\theta}  \}=\frac{a}{2}(2\sin(t)+\sin(2t))
\end{equation}
That is the parametric equation.
A: You can use Green's theorem to simplify matters. Indeed,
$$\int_C(xy^2dy-x^2ydx)=\iint(y^2+x^2)dxdy=\int_0^{2\pi}\int_{0}^{a(1+\cos\theta)}r^3drd\theta.$$
It now turns into a fairly straightforward double integral.
A: If $x=a(2\cos t-\cos 2t)$ and $y=a(2\sin t-\sin 2t)$, then
$$
xy=a^2\big(2\sin 2t-2\sin3t+\tfrac{1}{2}\sin 4t\big),
$$
$$
x^2-y^2=a^2\big(4\cos 2t-4\cos 3t+\cos4t\big),
$$
and
$$
x\,dx-y\,dy=a^2\big(-4\sin 2t+6\sin 3t-2\sin4t\big)\,dt.
$$
Hence
$$
xy^2\,dy-x^2y\,dx=a^4\big(2\sin 2t-2\sin3t+\tfrac{1}{2}\sin 4t\big)
\big(4\sin 2t-6\sin 3t+2\sin4t\big)\,dt,
$$
and
\begin{align}
\int_C xy^2\,dy-x^2y\,dx &=\int_0^{2\pi}a^4\big(2\sin 2t-2\sin3t+\tfrac{1}{2}\sin 4t\big)
\big(4\sin 2t-6\sin 3t+2\sin4t\big)\,dt\\ &=a^{4}\int_0^{2\pi}\big(8\sin^22t+12\sin^23t+\sin^44t\big)\,dt=\pi a^4 (8+12+1)=21\pi a^4.
\end{align}
A: Translating into functions of $\theta$ we have
$$\begin{array}{l}
x(\theta)=r(\theta)\cos\theta=a(1+\cos\theta)\cos\theta,\\
y(\theta)=r(\theta)\sin\theta=a(1+\cos\theta)\sin\theta.
\end{array}$$
And the derivatives are
$$\begin{array}{l}
x'(\theta)=-a\sin\theta(1+2\cos\theta),\\
y'(\theta)=a\left(\cos\theta(1+\cos\theta)-\sin^2\theta\right).
\end{array}$$
One needs to computes explicitely
$$I=\int_{-\pi}^{\pi}\left[x(\theta)y(\theta)^2y'(\theta)-x(\theta)^2y(\theta)x'(\theta)\right]\mathrm d\theta.\tag 1$$
It gives a straightforward but lengthy solution and we find
$I=\frac{35a^4\pi}{16}$. 
A: I am not sure in this answer,Actually i am studying multivariable calculus and didn't reach integration.But from my physics experience.I think you proceed through changing Cartesian to polar.
ie.$x=r\cos\theta$ and $y=rsin\theta$.so we get $\int_C (xy^2 dy-x^2y dx) =\int_C\frac{r^4sin^2(2\theta)}{2}$ and put $r$ equal to closed curve $r= a(1+\cos\theta)$ where limit will be from $0$ to $2\pi$,since it is a closed curve $dr$ term become $0$.I think this is the method,If not,feel free to correct me :)
