# Using Stoke's Theorem on a 2D vector field?

So i'm supposed to calculate the line integral

$$\int_C\mathbf{F}\cdot d\mathbf{l}$$

where $\mathbf{F}=(xy^2+2y)\vec{\mathbf{x}}+(x^2y+2x)\vec{\mathbf{y}}$

1. Through curve $C_1$ which contains two straight lines that crosses the points $(0,0),(a,0)$ and $(a,b)$ i found out this to be $(\int_{c_1}+\int_{c_1})\mathbf{F}\cdot d\mathbf{l}=\frac{a^2b^2}{2}+2ab$

2. Through the curve $C_2$ which contains a single straight line that connects the points $(0,0)$ and $(a,b)$ and i found out i'll get the same answer going as through $C_1$ $\int\mathbf{F}\cdot d \mathbf{l}=\frac{a^2b^2}{2}+2ab$

3. Verify using Stoke's Theorem and explain why you gotthe same answer in 1. and 2. using Stoke's theorem (Aka use stokes theorem to explain why $C_1$ and $C_2$ yielded the same answer).

I don't know how to use Stoke's theorem in a 2d vector field. What would the upper and limits be? How should I approach this problem using Stoke's? Since we're on the $xy$ plane then $\mathbf{n}=\mathbf{k}$ right?

• $z$ would be $0$? if i'm not mistaken? – Sami Shafi Sep 18 '18 at 21:43
• also i know that the curl in 2d is given simply $\frac{\partial Q}{\partial x}-\frac{\partial P}{\partial y}=4$ – Sami Shafi Sep 18 '18 at 22:07
• What version of Stokes’ theorem are you meant to use? I might be more concerned about the fact that neither curve is closed than by what the equivalent of curl is in 2-D. – amd Sep 18 '18 at 23:29
• Clue: The fact that the two integrals are the same is an indication that you have a conservative vector field. This means that there is a potential function $V$ such that $\bf{F}=\frac{\partial V}{\partial x}\bf{x}+\frac{\partial V}{\partial y}\bf{y}$. In such a case the value of the integral is going to be $V(end)-V(start)$ and so on. – Jap88 Sep 19 '18 at 2:03

Note that $$Q'_x=P'_y = 2xy + 2,$$ and $F$ is well defined on $\mathbb{R}^2$, hence $$\oint_{\partial D}Fdr=\int\int_D(Q'_x-P'_y)dxdy=0,$$ hence $F$ is conservative field. As such, $$V(x,y) = \int_x P(x,y)dx = \frac{x^2 y^ 2}{ 2 } + 2yx + g(y),$$ thus $$V'_y=x^2y+2x+g'_y(y)= x^ 2y+2x,$$ hence $g(y) = 0$, thus $$V(x,y) = \frac{x^2 y^ 2}{ 2 } + 2yx + C.$$ Therefore, path integral from $(0,0)$ to $(a,b)$ is $$V(a,b) - V(0,0)= \frac{a^2b^2}{2} + 2ab,$$ for any path.