# Homework Help: Line integral over a triangle

1. Sep 11, 2004

### galipop

Hi All,

I have the following electric field E = c(2bxy, x^2+ay^2) where a,b and c are constants

1. I need to find the line integral $$\oint E \cdot dl$$ where the close integration path is defined by the triangle (0,0) (1,0) (1,1)

2. compute the surface integral $$\int\nabla \times E \cdot dA$$ where the surface is defined by the area of the triangle.

3. determine the constants a and b such that $$\nabla \times E=0$$ and $$\nabla \cdot E=0$$. Compute the potential in this case.

can anyone get me started. thanks!

2. Sep 11, 2004

### Hurkyl

Staff Emeritus
Do you have any thoughts at all on the problem?

3. Sep 12, 2004

### galipop

Part A)

I guess this needs to be split up into 3 integrals. $$\int partialx.dx$$ + $$\int partialx.dy$$ + $$\int partialx.dx+partial.dy$$

i guess the limits are 0->1 , 0->1 and 0->1 for each integral. Is this right?

Part B) and C) I'm not sure at all what is being asked.

4. Sep 12, 2004

### Tide

For your first integral just evaluate
$$\int E_x dx + \int E_y dy$$
around the closed path paying close attention to the signs of both dx and dy and the values of x and y!

5. Sep 12, 2004

### Tide

Oh, for part (2) you'll need to work out the curl vector whose only vector component will be perpendicular to the x-y plane which also happens to be in the same direction as the normal to the surface. Then just evaluate the integral
$$\int f(x, y) dx dy$$
where f(x, y) will be the function you get from taking the curl.

6. Sep 12, 2004

### galipop

I think I understand part a now. Taking mulitple paths to the same point result in the same line integral?

As for the calculation I get:

=c * ($$\int 2by dx + \int 2ay dy$$)

both have limits 0 to 1.

How does that look?

7. Sep 12, 2004

### Tide

Good start but not quite!

Let's break it down into parts.

On the line segment from (0, 0) to (1, 0) dy is 0 so you'll only have an integral over x. However, y is also 0 on that line segment so $E_x = 0$ so this portion contributes nothing!

On the line segment from (1, 0) to (1, 1) dx is 0 so you'll only have an integral over y. Also, x = 1 on this line segment so $E_y = c(1+a y^2)$ which you can easily integrate from 0 to 1.

The last segment from (1, 1) back to the origin (0, 0) is a little more tricky. First note that dx = dy but since $dl = \sqrt {dx^2+dy^2}$ you will use, e.g. $\sqrt {2} dx$ in your integration. Also, your integrand will be $c \left( 2 b x^2 + x^2 + a x^2\right)$ since x = y along this segment and your limits of integration will go from $\sqrt 2$ to 0.

8. Sep 12, 2004

### Whatupdoc

man that math looks hard, i hope i dont have to take it. what math is that?

9. Sep 12, 2004

### Tide

It's for Galipop's Electricity and Magnetism course - he's basically trying to show that the electrical force is a conservative one.

10. Sep 12, 2004

### galipop

Hi again...

I found an example on the net somewhere showing a similar example for a circle. After looking and that and these notes I think I sorta understand now.

Ok so evaluating the integrals:

(0,0) -> (0,1) = 0
(0,1) -> (1,1) = c ( 1 + (a/3) )
(1,1) -> (0,0) = c * sqrt(2)^3 / 3 ( a + b + 1)

so do I just add up all of the component results now?

11. Sep 12, 2004

### HallsofIvy

On the first leg, from (0,0) to (1,0), we can take x= t, y= 0 as parametric equation. Then dx= dt and dy= 0. E.dl= c(2b(t)(0), t^2+a0^2) .(dt, 0)= 0. Integrating from t= 0 to t= 1 gives 0 just as you say.

On the second leg, from (1,0) to (1,1), we can take x= 1, y= t so that dx= 1, dy= dt.
Now E.dl= c(2b(1)(t),1^2+at^2).(0,dt)= c(1+ at^2)dt. Integrating that from 0 to 1,
we get c(1+a/3), again just what you have.

On the third leg, from (1,1) to (0,0), we can take x= t, y= t with t decreasing from 1 to 0. Now dx= dt, dy= dt and E.dl= c(2b(t)(t),t^2+at^2).(dt,dt)= 2bct^2dt+ (1+a)t^2dt= (2b+1+a)t^2 dt. Integrating from 1 down to 0, this gives -(2b+1+a)/3.
I suspect you put in the $\sqrt{2}$ to "normalize" t- make the length 1. But if you do that, $\sqrt{2}$ should appear both in E and dl and will "cancel".

Yes, once you have integrated on each leg, add them to find the full path integral.

To finish the problem take the curl of E and integrate it over the area of the triangle.

Last edited by a moderator: Sep 12, 2004
12. Sep 12, 2004

### galipop

Why do you need to take the curl of E and integrate it over the area?

13. Sep 12, 2004

### Tide

14. Sep 12, 2004

### galipop

oh. I thought HallsOfIvy was still talking about the 1st part :)

15. Sep 13, 2004

### galipop

Curl of E is:

c<0,0,2x-2bx>
normal to the area is <0,0,1>

how do I integrate this over the area of the triangle?

Thanks...

16. Sep 13, 2004

### HallsofIvy

$$\int\int{2(1-b)x dA}$$ over the triangle of course.

Since the hypotenuse of this triangle is the line y= x, that will be
$$2(1-b)\int_{x=0}^{1}\int_{y=0}^{x}xdydx$$.

17. Sep 13, 2004

### galipop

ah.....i was integrating from 0->1 and 0->1...that's why I wasn't getting the expected answer.

So now I've done both parts, the results are the same. This is due to the relationship between Gauss and Stokes theroems correct?

Now for part 3....

Determine the constants a and b such that $$\nabla \times E = 0$$ and
$$\nabla \cdot E = 0$$. Compute the potential in this case.

The curl = 0+0+cx(2-b) = 0
and the divergence = 2cy(b+a) = 0

to solve for a and b can I say that x=y as we are dealing with a triangle?

18. Oct 8, 2004

### AXIS

Okay

I managed to Answer all questions,

But I still have one question I need answered

Why does one obtain the same result in (b) as in (a)?