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 ?

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.
