Find the flux of $\boldsymbol{\mathrm{F}}=x\boldsymbol{\mathrm{i}} +4y \boldsymbol{\mathrm{j}}$ outwards across the triangle with vertices at $(0,0),(2,0)$ and $(0,2)$.
Solution: $10$
The answer says it's $10$, but I calculated it as $20$. I'm pretty sure i did the steps right, unless I have to halve it in the end because it's a triangle? I get double integral both a limits from $0$ to $2$. Integrate with respect to $x$ first we get
$$ \left[5x\right]_{x=2}^{x=0}. $$
Then it's just limit from $y=0$ to $y=2$ at $10\;\mathrm{d}y = 20$.
METHOD 1:
Using the Divergence Theorem we have
$$\int_C \vec F\cdot \hat n d\ell=\int_S \nabla \cdot \vec F dS=\int_S 5 dS=10$$
since $\nabla \cdot \vec F=\frac{\partial F_x}{\partial x}+\frac{\partial F_y}{\partial y}=1+4=5$ and the area of the triangle is $\frac12 \times 2 \times 2=2$
METHOD 2:
Here, we integrate the line integral directly. To that end, we have
$$\begin{align} \int_C\vec F\cdot \hat n d\ell&=\int_0^2 (\hat xx+\hat y\,0)\cdot (-\hat y) dx+\int_0^2 (\hat x2+\hat y4y)\cdot (\hat x) dy+\int_0^2(\hat xt+\hat y4t)\cdot \frac{-\hat x+\hat y}{\sqrt{2}}\sqrt{2}dt\\\\ &=0+4+6\\\\ &=10 \end{align}$$
as expected!