Integrals over a Curve, Multidimensional Integrals

We will look at two examples of path integrals of vector functions of position and examine their path dependence.  The first integral has a non-zero curl (and so we know that it is not the gradient of some scalar potential)

Here is a vector function (xyz, xyz, xyz) for which the curl does not vanish anywhere

In[1]:=

<<Calculus`VectorAnalysis`

VectorFunction = {x y z, x y z , y x z}

CurlVectorFunction = Simplify[Curl[VectorFunction, Cartesian[x, y, z]]]

Out[2]=

{ x y z , x y z , x y z }

Out[3]=

{ x ( - y + z ) , y ( x - z ) , ( - x + y ) z }

These are the conditions that the curl is zero:

In[45]:=

ConditionsOfZeroCurl = Table [ 0 == CurlVectorFunction [ [ i ] ] , { i , 3 } ]

Out[45]=

{ 0 x ( - y + z ) , 0 y ( x - z ) , 0 ( - x + y ) z }

There is only one point where this occurs:

In[46]:=

FindInstance [ ConditionsOfZeroCurl , { x , y , z } ]

Out[46]=

{ { x 0 , y 0 , z 0 } }

Let's evaluate the integral of the vector potential ( v   •d s   ) for any  curve that wraps around a cylinder of radius R with an axis that coincides with the z-axis
[Graphics:HTMLFiles/Lecture-14_4.gif]
Any curve that wraps around the cylinder can be parameritized as (x(t), y(t), z(t)) = (R cos(t), R sin(t), A P 2 π (t)) where P 2 π (t) = P 2 π (t + 2π) and in particular P 2 π (0) = P 2 π (2π).
Therefore d s =    (-R sin(t), R cos(t), P ' 2 π (t)) dt = (-y(t), x(t), A P ' 2 π (t))     dt
The integrand for an integral of "VectorFunction" around such a curve is (written in terms of an arbitrary P(t):

In[4]:=

vf = VectorFunction . { - y , x , Amp D [ P [ t ] , t ] } /. { x Radius Cos [ t ] , y Radius Sin [ t ] , z Amp P [ t ] } // Simplify

Out[4]=

Amp Radius 2 Cos [ t ] P [ t ] Sin [ t ] ( Radius ( Cos [ t ] - Sin [ t ] ) + Amp P [ t ] )

The integral depends on the choice of P(t)

In[5]:=

PathDepInt = Integrate [ vf , { t , 0 , 2 Pi } ]

Out[5]=

0 2 π Amp Radius 2 Cos [ t ] P [ t ] Sin [ t ] ( Radius ( Cos [ t ] - Sin [ t ] ) + Amp P [ t ] ) t

Let's introduce some specific periodic functions for P. Note how the value of the integral changes as the path changes:

In[6]:=

PathDepInt /. P Sin

Out[6]=

1 4 Amp π Radius 2 ( Amp + Radius )

In[7]:=

PathDepInt /. P Cos

Out[7]=

- 1 4 Amp π Radius 2 ( Amp + Radius )

In[8]:=

PathDepInt /. { P [ t ] t ( t - 2 Pi ) , P ' [ t ] D [ t ( t - 2 Pi ) , t ] }

Out[8]=

Amp Radius 2 ( 3 Amp π 2 - 8 π Radius 9 )

However, here is  curious result which shows that some special paths can ``accidentally'' have zero integrals : let P(t) = cos(n t),

In[9]:=

pdigen = PathDepInt /. { P [ t ] Cos [ n t ] , P ' [ t ] D [ Cos [ n t ] , t ] }

Out[9]=

- Amp Radius 2 ( 8 ( - 3 + n 2 ) Radius Sin [ n π ] 2 + n ( - 8 Radius + Amp ( - 9 + n 2 ) Cos [ 2 n π ] ) Sin [ 2 n π ] ) 4 ( 9 - 10 n 2 + n 4 )

In[10]:=

Simplify [ pdigen , n Integers ]

Out[10]=

0

In[14]:=

thecurves = ParametricPlot3D [ { { Cos [ t ] , Sin [ t ] , Cos [ 3 t ] } , { Cos [ t ] , Sin [ t ] , Cos [ t ] } } , { t , 0 , 2 Pi } ]

[Graphics:HTMLFiles/Lecture-14_5.gif]

Out[14]=

Graphics3D

In[24]:=

Show [ { Graphics3D [ Thickness [ 0.01 ] ] , Graphics3D [ Hue [ 0.25 , 0.5 , 0.5 ] ] , thecurves } ]

[Graphics:HTMLFiles/Lecture-14_6.gif]

Out[24]=

Graphics3D

Apparently, the symmetry of the vector function causes cancelation (note results for P = Sin and P=Cos, differ by a minus sign)
But, why doesn't n=1 give us the correct result above? Note that the denominator goes to zero as n→1

Try the same thing with a conservative (curl free, or exact) Vector Function:

Start with a scalar potential

In[25]:=

temp = Grad [ Exp [ x y z ] , Cartesian [ x , y , z ] ]

Out[25]=

{ x y z y z , x y z x z , x y z x y }

Create another vector function that should have a zero curl

In[26]:=

AnotherVFunction = {^(x y z) y z, ^(x y z) x z, ^(x y z) x y}

Simplify[Curl[AnotherVFunction, Cartesian[x, y, z]]]

Out[26]=

{ x y z y z , x y z x z , x y z x y }

Out[27]=

{ 0 , 0 , 0 }

In[28]:=

anothervf = AnotherVFunction . { - y , x , D [ P [ t ] , t ] } /. { x Radius Cos [ t ] , y Radius Sin [ t ] , z P [ t ] } // Simplify

Out[28]=

1 2 Radius 2 Cos [ t ] P [ t ] Sin [ t ] Radius 2 ( 2 Cos [ 2 t ] P [ t ] + Sin [ 2 t ] P [ t ] )

The integral depends doesn't on the choice of P(t)

In[29]:=

PathDepInt = Integrate [ anothervf , t ]

Out[29]=

Radius 2 Cos [ t ] P [ t ] Sin [ t ]

In[30]:=

( PathDepInt /. t 2 Pi ) - ( PathDepInt /. t 0 )

Out[30]=

0

For a last example, suppose the curl vanishes on the cylindrical surface defined above:
[Graphics:HTMLFiles/Lecture-14_9.gif]
Suppose we can find a function that has a non-vanishing curl on this surface

In[79]:=

VanishOnCylinder = x ^ 2 + y ^ 2 - Radius ^ 2

Out[79]=

- Radius 2 + x 2 + y 2

In[80]:=

CurlOfOneStooge = { 0 , 0 , VanishOnCylinder }

Out[80]=

{ 0 , 0 , - Radius 2 + x 2 + y 2 }

It is easy to see that this is the curl of Stooge, where

In[81]:=

Stooge = { - 1 / 2 Integrate [ VanishOnCylinder , y ] , 1 / 2 Integrate [ VanishOnCylinder , x ] , 0 }

Out[81]=

{ 1 2 ( Radius 2 y - x 2 y - y 3 3 ) , 1 2 ( - Radius 2 x + x 3 3 + x y 2 ) , 0 }

In fact, we could add to Stooge, any vector function that has vanishing curl--there are an infinite number of these

In[82]:=

Simplify [ Curl [ Stooge , Cartesian [ x , y , z ] ] ]

Out[82]=

{ 0 , 0 , - Radius 2 + x 2 + y 2 }

Its integral doesn't care which path around the cylinder it takes, the integrand doesn't depend on P(t)

In[83]:=

WhyIOughta = Stooge . { - y , x , D [ P [ t ] , t ] } /. { x Radius Cos [ t ] , y Radius Sin [ t ] , z P [ t ] } // Expand

Out[83]=

- 1 2 Radius 4 Cos [ t ] 2 + 1 6 Radius 4 Cos [ t ] 4 - 1 2 Radius 4 Sin [ t ] 2 + Radius 4 Cos [ t ] 2 Sin [ t ] 2 + 1 6 Radius 4 Sin [ t ] 4

In[84]:=

Integrate [ WhyIOughta , { t , 0 , 2 Pi } ]

Out[84]=

- π Radius 4 2

Multidimensional Integral over Irregular Domains

We will attempt to model the energy of ion just above one half of a triangular capacitor.  Suppose there is a uniformly charged surface  (σ≡charge/area=1) occupying an equilaterial triangle in the z=0 plane:
    [Graphics:HTMLFiles/Lecture-14_10.gif]
    what is the energy (voltage) of a unit positive charge located at (x,y,z)

The electrical potential goes like 1 r , therefore the potential of a unit charge located at (x,y,z) from a small surface patch at (ξ,η,0) is σ r = ( x - ξ ) 2 + ( y - η ) 2 + z 2

Therefore it remains to integrate this function over the domain η∈(0, 3 2 ) and ξ∈ ( η 3 - 1 2 ) , ( 1 2 - η 3 ))  
0 3 2 η 3 - 1 2 1 2 - η 3 ( x - ξ ) 2 + ( y - η ) 2 + z 2 dξdη

Mathematica integrates over the last iterator first:

We will try to find the potential due to a triangular patch on a particle located at (x,y,z=1)

In[31]:=

TrianglePotentialDirect = Integrate [ 1 ( x - ξ ) 2 + ( y - η ) 2 + z 2 , { η , 0 , 3 2 } , { ξ , η 3 - 1 2 , 1 2 - η 3 } , Assumptions { x Reals , y Reals , z > 0 } ]

Out[31]=

$Aborted

Trying to do this directly either takes too long or there is no closed form! We have to work around it by using Indefinite Integrals

In[96]:=

TrianglePotentialNumeric [ x_ , y_ , z_ ] := NIntegrate [ 1 ( x - ξ ) 2 + ( y - η ) 2 + z 2 , { η , 0 , 3 2 } , { ξ , η 3 - 1 2 , 1 2 - η 3 } ]

In[97]:=

TrianglePotentialNumeric [ 1 , 3 , .01 ]

Out[97]=

0.15025179102646993

In[90]:=

Plot [ TrianglePotentialNumeric [ x , x , 1 / 40 ] , { x , - 1 , 1 } ]

NIntegrate :: slwcon : Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration being 0, oscillatory integrand, or insufficient WorkingPrecision. If your integrand is oscillatory try using the option Method->Oscillatory in NIntegrate. More… "Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration being 0, oscillatory integrand, or insufficient WorkingPrecision. If your integrand is oscillatory try using the option Method->Oscillatory in NIntegrate. \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, ButtonData:>\\\"NIntegrate::slwcon\\\"]\\)"

NIntegrate :: slwcon : Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration being 0, oscillatory integrand, or insufficient WorkingPrecision. If your integrand is oscillatory try using the option Method->Oscillatory in NIntegrate. More… "Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration being 0, oscillatory integrand, or insufficient WorkingPrecision. If your integrand is oscillatory try using the option Method->Oscillatory in NIntegrate. \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, ButtonData:>\\\"NIntegrate::slwcon\\\"]\\)"

[Graphics:HTMLFiles/Lecture-14_20.gif]

Out[90]=

Graphics

In[92]:=

Table [ ContourPlot [ TrianglePotentialNumeric [ x , y , h ] , { x , - 1 , 1 } , { y , - 0.5 , 1.5 } , Contours Table [ v , { v , .25 , 2 , .25 } ] , ColorFunction ( Hue [ 1 - 0.66 * # / 2 ] & ) , ColorFunctionScaling -> False ] , { h , .025 , .5 , .025 } ]

NIntegrate :: slwcon : Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration being 0, oscillatory integrand, or insufficient WorkingPrecision. If your integrand is oscillatory try using the option Method->Oscillatory in NIntegrate. More… "Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration being 0, oscillatory integrand, or insufficient WorkingPrecision. If your integrand is oscillatory try using the option Method->Oscillatory in NIntegrate. \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, ButtonData:>\\\"NIntegrate::slwcon\\\"]\\)"

NIntegrate :: slwcon : Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration being 0, oscillatory integrand, or insufficient WorkingPrecision. If your integrand is oscillatory try using the option Method->Oscillatory in NIntegrate. More… "Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration being 0, oscillatory integrand, or insufficient WorkingPrecision. If your integrand is oscillatory try using the option Method->Oscillatory in NIntegrate. \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, ButtonData:>\\\"NIntegrate::slwcon\\\"]\\)"

NIntegrate :: slwcon : Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration being 0, oscillatory integrand, or insufficient WorkingPrecision. If your integrand is oscillatory try using the option Method->Oscillatory in NIntegrate. More… "Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration being 0, oscillatory integrand, or insufficient WorkingPrecision. If your integrand is oscillatory try using the option Method->Oscillatory in NIntegrate. \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, ButtonData:>\\\"NIntegrate::slwcon\\\"]\\)"

General :: stop : Further output of NIntegrate :: slwcon will be suppressed during this calculation. More… "Further output of \\!\\(NIntegrate :: \\\"slwcon\\\"\\) will be suppressed during this calculation. \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, ButtonData:>\\\"General::stop\\\"]\\)"

[Graphics:HTMLFiles/Lecture-14_41.gif]

Out[92]=

{ ContourGraphics , ContourGraphics , ContourGraphics , ContourGraphics , ContourGraphics , ContourGraphics , ContourGraphics , ContourGraphics , ContourGraphics , ContourGraphics , ContourGraphics , ContourGraphics , ContourGraphics , ContourGraphics , ContourGraphics , ContourGraphics , ContourGraphics , ContourGraphics , ContourGraphics , ContourGraphics }

The plot above is for a relatively small height z = 1/20 so the contours reveal the triangular shape of the plate at z = 0.

Now look at a somewhat larger value of z = 1/2. The plot below shows contours that are very nearly circular, indicating that the plate is behaving approximately like an equivalent point charge;


Created by Mathematica  (October 17, 2005) Valid XHTML 1.1!