Double integral over area bounded by ellipse Evaluate the double integral of $\int \int(x+y)^{2} dxdy$ over the area bounded by the ellipse $(\frac{x}{a})^2+(\frac{y}{b})^2=1$
Please check answer = $\frac{ab\pi}{4}(a^{2}+b^{2})$
 A: Let,
$$x=ar\cos(\theta)$$
$$y=br\sin(\theta)$$
With $\theta \in [0,2\pi]$ and $r \in [0,1]$. Then the Jacobian corresponding to this transformation is $abr$. And we have the double integral,
$$\int_{0}^{2\pi} \int_{0}^{1} (ar\cos(\theta)+br\sin(\theta))^2 ab r dr d\theta$$
$$=ab \int_{0}^{2 \pi} \int_{0}^{1} \left(a^2r^2\cos^2(\theta)+b^2r^2 \sin (\theta)+\frac{ab}{2}r^2 \sin(2\theta) \right) r dr d\theta$$
Noticing that cosine is $2\pi$ periodic so we quickly see we can drop the $\sin(2\theta)$ term then separate the double integral as follows.
$$=ab \int_{0}^{1} r^3 dr \int_{0}^{2\pi} \left(a^2\cos^2(\theta)+b^2\sin^2(\theta) \right) d\theta$$
$$=\frac{ab}{4} \int_{0}^{2\pi} \left(\frac{1}{2}a^2(1+\cos(2\theta)+\frac{1}{2}b^2(1-\cos(2\theta) \right) d\theta$$
By $2\pi$ periodicity of sine we will see we can drop the $\cos(2\theta)$ terms to get,
$$=\frac{ab}{4} \int_{0}^{2\pi} \left(\frac{a^2}{2}+\frac{b^2}{2} \right) d\theta$$
$$=\frac{\pi ab}{4}(a^2+b^2)$$
A: If we are going to do this without using a transformation. Notice our regions boundary is,
$$(\frac{x}{a})^2+(\frac{y}{b})^2=1$$
So that $x \in [-a\sqrt{1-(\frac{y}{b})^2},a\sqrt{1-(\frac{y}{b})^2}]$ and of course $y \in [-b,b]$. So we are interested in computing,
$$\int_{-b}^{b} \int_{-a\sqrt{1-(\frac{y}{b})^2}}^{a\sqrt{1-(\frac{y}{b})^2}} (x^2+2xy+y^2) dx dy$$
We integrate with respect to $x$ first. Notice that $2xy$ is odd with respect to $x$ so we can drop that term. So then what we get is,
$$=\int_{-b}^{b} \left( \frac{2}{3}(a\sqrt{1-(\frac{y}{b})^2})^3+y^2\left(2a\sqrt{1-(\frac{y}{b})^2}\right) \right) dy$$
$$=\int_{-b}^{b} \left(\frac{2}{3}(a\sqrt{1-(\frac{y}{b})^2})a^2\left(1-(\frac{y}{b})^2\right)+y^2\left(2a\sqrt{1-(\frac{y}{b})^2}\right) \right) dy$$
First let $\frac{y}{b}=u$ so $dy=bdu$ and we have that what we want is the sum of,
$$I_1=\frac{2}{3}a^3b \int_{-1}^{1}(1-u^2)\sqrt{1-u^2} du$$
$$I_2=2ab^3\int_{-1}^{1} u^2\sqrt{1-u^2} du$$
The integrals in each of these are both standard, and related integrals. Find one, you find the other by geometry.
A: \begin{align}
I= \iint_A (x+y)^{2} dxdy = \iint_A (x^2 +y^2) dxdy + 2\iint_A xy\ dxdy
\end{align}
The latter integral vanishes due to odd symmetry in $x$ and $y$. We didn't need odd symmetry in both for the integral to vanish; just one would have sufficed.
\begin{align}
\iint_A xy\ dxdy = \int_{-b}^b\int_{-a\sqrt{1-(y/b)^2)}}^{a\sqrt{1-(y/b)^2)}} xy\ dxdy =0
\end{align}
The former integral is best evaluated in polar, but we  proceed in Cartesian. It turns into a trigonometric integral shortly. First, note the even symmetry in both $x$ and $y$, leading to simplified bounds and a factor of $2^2$ in front.
\begin{align}
I= \iint_A (x^2 +y^2) dxdy &=  \int_{-b}^b\int_{-a\sqrt{1-(y/b)^2)}}^{a\sqrt{1-(y/b)^2)}} (x^2 +y^2) dxdy
\\
 &=  4\int_0^b\int_0^{a\sqrt{1-(y/b)^2)}} (x^2 +y^2) dxdy
\\
 &=  4\int_0^b \left(
\frac13a^3\left(1-\frac{y^2}{b^2}\right)^{3/2} +ay^2\sqrt{1-\frac{y^2}{b^2}} 
\right)dy
\end{align}
After reducing to a single integral, we need to make a trig substitution. The trigonometric integrals are then evaluated through repeated use of the half angle formula. 
\begin{align}
I &= 4\int_0^{\pi/2} \left(
\frac{a^3b}{3}\cos^4t +ab^3\sin^2 t\cos^2 t 
\right)  dt
\qquad\text{(letting } \sin t=y/b)
\\
&= 4\int_0^{\pi/2} \left(
\frac{a^3b}{3}\cos^4t +\frac{ab^3}{4}\sin^2(2t) 
\right)  dt
\qquad\text{(double angle formula)}
\\
 &=  4\left(
\frac{a^3b}{3}\frac{3\pi}{16} +\frac{ab^3}{4}\frac{\pi}{4}\right) 
\qquad\text{(repeated use of half angle formulae)}
\\
 &=  \frac{ab\pi}{4}\left(a^2 +b^2\right)
\end{align}
