# Line Integrals

1. Dec 19, 2004

### Cyrus

I took multivariable calculus a while back. It was all fine until we got to line integrals and surface integrals divergance etc. Then it seemed like I got the rug swept from beneath me. After taking physics 2 alot of it makes so much more sense now though. Im reading through that stuff for a second time now, but am not sure about one thing for line integrals. I understand a line integral with respect to deltaS, or arc length. That can be visualized in terms of the area that the space curve "fence" so to speak makes on one side. But what in the heck is a line integral with respect to deltax, or deltay. They dont give you the same anwser as deltaS. I looked through 3 different books calc books, and not one of them goes into any detail about WHY we want to use these or what the hell they mean. So far im only left with my intution telling me that it may somehow be related to a projection onto the xz plane where y has no effect for the delta x, or similarly the yz plane where x has no effect for delta y, I don't, you all are smarter than me please help.

The book does give some good examples of line integral applications in phyiscs, like center of mass of a wire, or the weight of a wire with varyin density, but all are with respect to deltaS, nothing to do with deltaX or deltaY!

Last edited: Dec 19, 2004
2. Dec 19, 2004

### Hurkyl

Staff Emeritus
The easiest way to understand it, coming from a Riemann sum mindset, is that the d? part is part of the "function" -- when you're doing the line integrals with ds, the summand has a factor that is the difference in arclength (s) for that partition. When you're doing a line integral with dx, then you use the (signed!) difference in x instead.

3. Dec 20, 2004

### Tide

If you had to integrate a function f(s) along a path

$$\int f(s) ds$$

that would be a simple enough matter. However, f is not usually given or known as a function along a path. Oftentimes, you will have a function f(x, y) to integrate. Unfortunately, mapping f(x, y) -> f(s) is usually not easy to do accomplish.

In those cases you have to resort to working with x and y and they are related by

$$ds = \sqrt {dx^2 + dy^2}$$

and, as a matter of convenience, you may work with it in this form:

$$ds = \sqrt {1 + \left(\frac {dy}{dx}\right)^2} dx$$

in which case your integral is

$$\int f ds = \int f(x, y) \sqrt {1 + \left(\frac {dy}{dx}\right)^2} dx$$

or something similar with the integral over y. You simply choose whichever fits your problem the best.

4. Dec 20, 2004

### dextercioby

Sure,Tide,u're right.Everything depends on the way the path is given.There are some curves where either parametric or (plane) polar coordinates are given.In that case,you should should consider some line elements of this kind::
$$ds=\sqrt{(\frac{dx}{dt})^{2}+(\frac{dy}{dt})^{2}+(\frac{dz}{dt})^{2}} dt$$
for the case of a non plane curve
$$x=x(t);y=y(t);z=z(t)$$
(think about a helicoid,it's given usually in parametric coordinates),and for the case of a plane curve (e.g.the cycloid,hypocycloid,astroid,...),simply give up "z" in the formula above.
As for a plane curve given in polar coordinates (think about a spiral (logarithmic,Archimedes,Cornu))
$$\rho=\rho(\phi)$$
,the line element is:
$$ds=\sqrt{1+(\frac{d\rho}{d\theta})^{2}} d\theta$$

I hope these examples (sorry,theory items :tongue2: ) can make u see a little more clear curvilliniar integrals of first kind.

Daniel.

EDIT:And thanx to Galileo,u're given a viewpoint about curviliniar integrals of the second kind (defined for vector fields) and their tremendous applications in phyisics.Maybe if he had mentioned something about the work and heat in thermodynamics,or Clausius principle,or 1 forms (exact or closed),or maybe that would have been too technical... :tongue2:

Last edited: Dec 20, 2004
5. Dec 20, 2004

### Galileo

They are very important in physics. I wondered the same thing at first as well, but it became clear later. I think you'll get to this part later in the course.

Per definition, the work done on a particle by a forcefield F is:

$$W=\int_C \vec F(x,y,z) \cdot \vec T(z,y,z) ds=\int_C \vec F(\vec r) \cdot \vec T(\vec r) ds$$
where C is the path the particle takes and T(x,y,z) is the unit tangent vector at (x,y,z) on C.

If the curve is given by the vector equation: $\vec r(t)=x(t)\vec i + y(t)\vec j +z(t)\vec k$ (with $a \leq t \leq b$, then $\vec T(t)=\vec r'(t)/|\vec r'(t)|$.
Notice that $ds=|\vec r'(t)|dt$

Using we write the work done as:

$$W=\int_a^b \vec F(\vec r(t)) \cdot \vec r'(t)dt$$
this is often abbreviated and written as:

$$W=\int_C \vec F(\vec r(t)) \cdot d\vec r$$

Such an integral is very common in i.e. electromagnetism. Its called the line integral of F along C.

Suppose know that F is given by component functions:
$$F=P \vec i+Q \vec j+R \vec k$$

Now plug this in $$\int_C \vec F(\vec r(t)) \cdot d\vec r$$.
You'll see that:

$$W=\int_C \vec F(\vec r(t)) \cdot d\vec r=\int_C Pdx +\int_C Qdy+\int_C Rdz=\int_C Pdx +Qdy+Rdz$$

Which uses line integrals w.r.t. x, y and z.

Last edited: Dec 20, 2004
6. Dec 20, 2004

### Cyrus

Seems to make more sense. Tide, Let me just check to see if im understanding you correctly. You are saying that if I am given a function in terms of a parameter t: x=x(t); y=y(t);z=z(t) and a function F(x,y,z), then I should use the formula with repect to arc length ds. But if im given a function written as x=x; y=y(x); z=z(x); and a function F(x,y,z), then I should make everything in terms of x and dx. For example, a function in terms of x,y,z. If I were to choose to use dx to solve this problem, would this mean that y and z would HAVE to be functions of x, or could y and z not be functions of x. Also, lets say I could write a function in terms of dx, or dy, or dz. But I could also easily write it in terms of t and ds. If I were to do the line integral with respect to dx, dy, or dz, and ds, should I get the same anwser in all three cases? When it comes to visualizing a line integral with respect to dx,dy or dz, does it still look the same as ds? (ds being the area of one side of a "fence"). Would it look like the same exact space curve and the same exact fence?

7. Dec 20, 2004

### Tide

Cyrus,

You had better get the same result regardless of which method you use!

Also, I'm not sure what you mean by "fence" and the line or path integral does not refer to area.

8. Dec 20, 2004

### Cyrus

In my calc book it says that you can think of the curve as the base of a fence. The function f(x,y) is the height of the fence. And the line integral is the area of one side that makes up this fence.

9. Dec 21, 2004

### Tide

Cyrus,

Oh, I see - that's kind of a neat way of looking at it.

10. Dec 21, 2004

### Cyrus

Glad I caught you online now Tide, I got a slight problem im not getting the same anwser I will post it in one sec.

11. Dec 21, 2004

### Cyrus

In one calc book it says to evaluate:

$$\int_c f(x,y)dx$$

and

$$\int_c f(x,y)dy$$

if:
$$f(x,y)=xy^2$$ and C is part of the parabola y=x^2 from A(0,0) to B(2,4).

When they do with respect to dx, they get 32/3,
and with dy, 256/7

But these are not the same anwsers!?

Last edited: Dec 21, 2004
12. Dec 21, 2004

### dextercioby

And what's the problem??U have a function which is integrated wrt to different variables ("x" and then "y") and with limits which vary:when "x":0->2,when "y":0->4.And the fact that u're integrationg along a path simply requires substituting one variable wrt the other according to which variable of integrations is chosen.That is
$$\int_{C} xy^{2} dx=\int_{0}^{2} x^{5} dx =...=\frac{32}{3}$$
$$\int_{C} xy^{2} dy=\int_{0}^{4} y^{\frac{5}{2}} dy=...=\frac{256}{7}$$

You're actually integrating different functions along the same path.Remember that the variables "x" and "y" which appear in the function "f" are not independent,actually the fact that u integrate along a curve y=y(x) makes them depend one on another.Else,hadn't it been a curvilinear integral,u would have had:
$$\int_{0}^{2} xy^{2} dx=2y^{2}$$
$$\int_{0}^{4} xy^{2} dy=\frac{64x}{3}$$

Daniel.

13. Dec 21, 2004

### Cyrus

Let me try to restate my problem a little more clearly.

First, we have a function, (lets assume for the moment), that depends on x and y. so:

$$z=f(x,y)$$

Now lets also assume we have a curve C.

Now we want to integrate this function, $$f=(x,y)$$ over the space curve that C makes.

In order to do this, we must use the formula:

$$\int_C f(x,y)ds$$

but the problem now lies in the ds. We cannot integrate over ds, so we must use something we can integrate over. One possible way is to define the curve C with parametric equations. Then this reduces the line integral in terms of ds into:

$$\int^b_a f(x(t),y(t)) \sqrt( (\frac{dx}{dt})^2+ (\frac{dy}{dt})^2) dt$$

This is now trivial to solve, because everything is in terms of the parameter t.
So far so good, *I Think*, I understand this.

Now comes the integral in terms of dx and dy.
Lets assume that the curve C is in parametric form. But perhaps we can break the curve into piecewise-smooth segements. And for one segment it might be easier to write the function in terms of the variable x, and for the other segment it might be easier to write the function in terms of the variable y. In such a case the standard equation:
$$\int_C f(x,y)ds$$

reduces into the integral:

$$\int^b_a f(x,y(x))dx$$

Or we could do this:

$$\int^b_a f(x(y), y) dy$$

So this is what it means to write the equation in terms of the variable x, or the variable y, or the paramater t.

And if it were possible for me to choose any of the three integration methods, I should get the same anwser.

Isint this where a line integral in terms of dx or dy comes from?

Furthermore,

if you look at what I posted up above, one of my calculus books has an example:

"Evaluate $$\int_c f(x,y) dx$$ and $$\int_c f(x,y)dy$$
if: $$f(x,y) = xy^2$$ and C is part of the parabola $$y=x^2$$ from A(0,0) to B(2,4).
But the book does it and gets two DISTINCT anwsers. For dx, it gets, $$\frac{32}{3}$$ and for dy, it gets $$\frac{265}{7}$$.

I know I said it before, but I have to keep asking until I undersand this. WHY the difference? If I were to follow the logic that I stated before I got to the books example, I would EXPECT to get the same anwser. Why is this not working out?

Last edited: Dec 21, 2004
14. Dec 21, 2004

### Cyrus

Here is their work, but I dont agree with it, at least not the part they did for dy.

$$\int_c xy^2dx= \int^2_0 x(x^4)dx = \frac{32}{3}$$

$$\int_c xy^2dy = \int^2_0 x(x^4)2xdx = \frac{256}{7}$$

But its dy!?

Shouldent the second equation be this!?:

First $$y=x^2$$ so: $$dy=2xdx$$ or: $$dx=\frac{dy}{2x}$$. If we plug this back into the origional equation we get:

$$\int_c \frac{xy^2dy}{2x}= \int^4_0 \frac{y^{2}dy}{2} = 32/3!$$.

This is EXACTLY he same anwser as if I integrated with respect to x!!

What the hecks going on here?

Another example of this change between dx and dy:
If i integrate $$y=x^2$$ from 0,0 to 2,4 in terms of x or y, I get:

$$\int^2_0 x^2 dx = \frac{8}{3}$$

or:

we say $$y=x^2$$, then that means $$dy= 2xdx$$ or: $$dx=\frac{dy}{2x}$$. If we plug this into the origional integral, we obtain:

$$x^2dx = \frac{x^2}{2x} dy = \frac {x}{2} dy$$

if we integrate this, we get:

$$\int^4_0 .5y^{1/2}dy$$ = $$\frac{8}{3}$$

See, these are BOTH EQUAL! If I use dy or dx! Why isint the same true for the line integral!?

Last edited: Dec 21, 2004
15. Dec 21, 2004

### Hurkyl

Staff Emeritus
That's because you did the first integral, not the second!! Recall that the second equation says $\int_C xy^2 \, dy$, not $\int_C xy^2 \, dx$.

16. Dec 21, 2004

### Cyrus

Oh, so how can they just interchange them like that with such ease? Is it even allowable to do that? It seems that doing this would voilate how you arrive at a solution in terms of dx or dy!

Maybe Im wrong, but to me, it seems that you can't just put a dx or a dy anywhere you would like! It seems that you have to first see if your function is defined in terms of x, y or t. Once you know how your function is defined, you can choose the variable that is simpliest to integrate, x,y or t, and find a solution. But even if you decide to go the long and hard route, choosing a variable that complicates things, you should STILL arrive at the same anwser.

Last edited: Dec 21, 2004
17. Dec 21, 2004

### Hurkyl

Staff Emeritus
They're two different integrals. $\int_C xy^2 \, dx$ and $\int_C xy^2 \, dy$ have different integrands.

When you tried to do integral 2, you observed that $dy = 2x \, dx$, and started with

$$\int_c \frac{xy^2dy}{2x}$$

Which is not integral 2 at all -- it's integral 1, after replacing $dx$ with $dy / 2x$.

18. Dec 21, 2004

### Cyrus

Ok, then can you explain the meaning of the two different integrals? This is what im not understanding. If you look at the example I did, I started off with a line integral in terms of a paramater t. Then I reduced the equation to terms of x and dx, and then to terms of y and dy. They all lead to the same anwser. This means they all represent the same space curve, and that they all represent the same area of the "fence" so to speak that this function makes.

What does it mean to be in terms of x and y then? It seems that this is totally unrelated to the origional curve and function in terms of ds.

19. Dec 21, 2004

### dextercioby

I believe that both I and Hurkyl told you that under the integration sing there were two totally different functions.That's the only explanation for the fact that the 2 integrals do not coincide.But the curve (the parabola $y=x^{2}$) is still the same.It's fixed.It cannot change.The arch of parabola along u integrate it's a geometrical locus.However,it's parametrization is not unique.You have proven that there can be found minimum 3 for the same simple curve:a parabola:
$$y(x)=x^{2};x(y)=\sqrt{y};x(t)=t;y(t)=t^{2}$$.

This integral u're evaluating doesn't have the significations of "area" under the graph of a curve.If someone told you that all first kind curvilinear integrals can be pictured as "areas" under certain curves,then he lied to you,as it is not true.
If,even now,you're still wondering why the two integrated functions are differrent,i'll repeat myself in telling u that the deciding 2 factors in this judgment are:
1)"y" and "x" are not idependent variables.This is due to the fact that the integral is evluated on a curve described by a function $y=y(x)$.
2)The differentials of the 2 integration variables are different.Since the function to integrate is the same ($xy^{2}$) and the path is the same,it follows that the results are different.Now,it's handy to use the same variable of integration:let that be "x".Then the integral wrt to "y" must be converted in to an integral wrt to "x" by merly an ordinary change of variables,which this time is not random/out of the blue,but is dictated by the path.From changing the variables,u can see for sure that the 2 functions which need to be integrated become different (cf.prior case),but this time the integration is made not only on the same curve,but also wrt to the same variable (let's call it "x").

Daniel.

PS.Think of the next example:
Evaluate $\int x^{2}y^{2}z dz$ along the path:
$$R:x=2t^{2}+1;y=3t;z=3t+4;t=[3,5]$$

Solve it.

Last edited: Dec 21, 2004
20. Dec 21, 2004

### Cyrus

Can you provide an application where I would want to replace ds with dx?
Here is what my book says, maybe It can help:

"Two other line integrals are obtained by replacing $$\Delta S_i$$ by either $$\Delta x_i = x_i - x_{1-2}$$ or $$\Delta y_i = y_i - y_{1-2}$$ in definition 2. They are called the line integrals of f along C with respect to x and y:

eq. 5 $$\int_c f(x,y)dx = lim_{\substack{n\rightarrow \infty}} \sum^n_{i=1} f(x^*_i,y^*_i)\Delta x_i$$

eq. 6 $$\int_c f(x,y)dx = lim_{\substack{n\rightarrow \infty}} \sum^n_{i=1} f(x^*_i,y^*_i)\Delta y_i$$

When we want to distinguish the origional line integral $$\int_c f(x,y)ds$$ from those in Equations 5 and 6, we call it the line integral with respect to arc length.
The following formulas say that line integrals with respect to x and y can also be evaluated by expressing everything in terms of t:x=x(t), y=y(t),dx=x'(t)dt, dy=y'(t)dt.

$$\int_c f(x,y)dx= \int^b_a f(x(t),y(t))x'(t)dt$$

$$\int_c f(x,y)dy= \int^b_a f(x(t),y(t))y'(t)dt$$

Last edited: Dec 22, 2004