# Line Integral does not match Greens Theorem?

1. Mar 10, 2012

### PhantomPower

1. The problem statement, all variables and given/known data

To evaluate the following line integral where the curve C is given by the boundary of the square 0 < x < 2 and 0 < y < 2 (In the anti clockwise sense):

$\oint (x+y)^2 dx + (x-y)^2 dy$

3. The attempt at a solution

Firstly it is noted that for a square ABDE :
Between AB, dy = 0 ,y = 0
Between BD, dx = 0 ,x = 2
Between DE, dy = 0 ,y = 2
Between EA, dx = 0 ,x =0

Thus : $\int^2_0 x^2 dx + \int^2_0 (2-y)^2 dy + \int^0_2 (x+2)^2 dx + \int^0_2 -y^2 dy$
Giving $\frac{x^3}{3} |^2_0 + \frac{-(2-y)^3}{3} |^2_0 + \frac{(x+2)^3}{3} |^0_2 + \frac{-y^3}{3} |^0_2$

Evaluating gives 10.6? but applying greens theorem gives -16. Can anyone spot my mistake - Probaly a negative sign?

Thanks very much.
P.s sorry for typos this keyboard is broken

2. Mar 10, 2012

### tiny-tim

Hi PhantomPower!

erm

∫ (2 - y)2 is the same as ∫ (y - 2)2 !

(similary for (-y)2)

3. Mar 10, 2012

### PhantomPower

Ooops.

Thanks very much - been a long day...