Example 10. Calculate the integral $I=\oint_{L}\left(x^{2}-y^{2}\right) d x+2 x y d y$, where $L-$ is the ellipse $\frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1$.
Solution. We apply Green's formula and compute the double integral, transitioning to "generalized" polar coordinates. We have: $P=x^{2}-y^{2}, Q=2 x y, \frac{\partial Q}{\partial x}-\frac{\partial P}{\partial y}=2 y+2 y=4 y$. Therefore,

$$
\begin{aligned}
& \int\left(x^{2}-y^{2}\right) d x+2 x y d y=4 \iint_{D} y d x d y= \\
& =\left\{\begin{aligned}
x & =a r \cos \varphi \\
y & =b r \cos \varphi, 0 \leqslant \varphi \leqslant 2 \pi, 0 \leqslant r \leqslant 1 \\
d x d y & =a b r d r d \varphi
\end{aligned}\right\}= \\
& =4 \iint_{D} a b^{2} r^{2} \sin \varphi d r d \varphi=4 a b^{2} \int_{0}^{2 \pi} \sin \varphi d \varphi \int_{0}^{1} r^{2} d r= \\
& =\left.\left.4 a b^{2} \cos \varphi\right|_{0} ^{2 \pi} \cdot \frac{r^{3}}{3}\right|_{0} ^{1}=0
\end{aligned}
$$

Answer. $I=0$.