[math-fun] parametrically enclosed spherical area
The plane area inside (x(t),y(t)) = ½∫x dy - y dx. E.g., the usual picture of the area under f(x), a<x<b becomes four line integrals--the three axis-aligned segments plus the actual curve of f, traversed anticlockwise: Integrate[f[x],{x,a,b}]==(Integrate[a - 0, {t, f[a], 0}] + Integrate[t*0 - 0, {t, a, b}] + Integrate[b - 0, {t, 0, f[b]}]+Integrate[t*D[f[t], t] - f[t]*D[t,t], {t, b, a}])/2 == (b f[b] - a f[a] + Integrate[t f'[t] - f[t], {t, b, a}])/2 , which follows from integration by parts. E.g., if f:=Exp, In[55]:= % /. f -> Exp Out[55]= -E^a + E^b == 1/2 ((-2 + a) E^a - a E^a - (-2 + b) E^b + b E^b) In[56]:= Simplify@% Out[56]= True What about on a sphere? Suppose we have a a unit vector X(t):=(x(t),y(t),z(t)) describing a closed curve on a sphere. (X(0)=X(1), say.) What's the area? There ought to be some nice thing analogous to ½∫x dy - y dx. --rwg
The better question: Given a point P and closed curve X(t) in 3Space, what is the solid angle at P of the generalized cone joining X to P? --rwg On Mon, Jan 26, 2015 at 9:31 PM, Bill Gosper <billgosper@gmail.com> wrote:
The plane area inside (x(t),y(t)) = ½∫x dy - y dx. E.g., the usual picture of the area under f(x), a<x<b becomes four line integrals--the three axis-aligned segments plus the actual curve of f, traversed anticlockwise: Integrate[f[x],{x,a,b}]==(Integrate[a - 0, {t, f[a], 0}] + Integrate[t*0 - 0, {t, a, b}] + Integrate[b - 0, {t, 0, f[b]}]+Integrate[t*D[f[t], t] - f[t]*D[t,t], {t, b, a}])/2 == (b f[b] - a f[a] + Integrate[t f'[t] - f[t], {t, b, a}])/2 , which follows from integration by parts. E.g., if f:=Exp, In[55]:= % /. f -> Exp
Out[55]= -E^a + E^b == 1/2 ((-2 + a) E^a - a E^a - (-2 + b) E^b + b E^b)
In[56]:= Simplify@%
Out[56]= True
What about on a sphere? Suppose we have a a unit vector X(t):=(x(t),y(t),z(t)) describing a closed curve on a sphere. (X(0)=X(1), say.) What's the area? There ought to be some nice thing analogous to ½∫x dy - y dx. --rwg
Introduce spherical coordinates with origin at P. Let A be a vector field with magnitude (1/r) tan(θ/2) pointing in the φ direction. A calculation shows that B = curl A points radially outward with magnitude 1/r^2, except along θ = π, where it is singular. The curve partitions the solid angle about the origin into two parts, one of which avoids the singularity. Consider any surface bounded by the curve. The desired solid angle is the surface integral of B.dS. Then by Stokes' theorem, it also equals the line integral of A.dl taken so that the surface lies to the left as you walk along the curve. Since div B = 0, Gauss' theorem says it doesn't matter what surface you pick, just avoid the singularity. A calculation shows that in the limit of small solid angle in the vicinity of θ = 0, this reduces to the usual line integral for the plane area enclosed by a curve. For a physical motivation, consider a semi-infinite, infinitely thin solenoid, lying along θ = π, terminating at the origin, and carrying a magnetic flux of 4π. The emerging magnetic field is the B above, and A is the vector potential. -- Gene From: Bill Gosper <billgosper@gmail.com> To: math-fun@mailman.xmission.com Sent: Thursday, January 29, 2015 1:41 PM Subject: Re: [math-fun] parametrically enclosed spherical area The better question: Given a point P and closed curve X(t) in 3Space, what is the solid angle at P of the generalized cone joining X to P? --rwg On Mon, Jan 26, 2015 at 9:31 PM, Bill Gosper <billgosper@gmail.com> wrote:
The plane area inside (x(t),y(t)) = ½∫x dy - y dx. E.g., the usual picture of the area under f(x), a<x<b becomes four line integrals--the three axis-aligned segments plus the actual curve of f, traversed anticlockwise: Integrate[f[x],{x,a,b}]==(Integrate[a - 0, {t, f[a], 0}] + Integrate[t*0 - 0, {t, a, b}] + Integrate[b - 0, {t, 0, f[b]}]+Integrate[t*D[f[t], t] - f[t]*D[t,t], {t, b, a}])/2 == (b f[b] - a f[a] + Integrate[t f'[t] - f[t], {t, b, a}])/2 , which follows from integration by parts. E.g., if f:=Exp, In[55]:= % /. f -> Exp
Out[55]= -E^a + E^b == 1/2 ((-2 + a) E^a - a E^a - (-2 + b) E^b + b E^b)
In[56]:= Simplify@%
Out[56]= True
What about on a sphere? Suppose we have a a unit vector X(t):=(x(t),y(t),z(t)) describing a closed curve on a sphere. (X(0)=X(1), say.) What's the area? There ought to be some nice thing analogous to ½∫x dy - y dx. --rwg
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
Gene Salamin (unavailable 'til Monday)> Introduce spherical coordinates with origin at P. Let A be a vector field with magnitude (1/r) tan(θ/2) pointing in the φ direction. A calculation shows that B = curl A points radially outward with magnitude 1/r^2, except along θ = π, where it is singular. The curve partitions the solid angle about the origin into two parts, one of which avoids the singularity. Consider any surface bounded by the curve. The desired solid angle is the surface integral of B.dS. Then by Stokes' theorem, it also equals the line integral of A.dl taken so that the surface lies to the left as you walk along the curve. Since div B = 0, Gauss' theorem says it doesn't matter what surface you pick, just avoid the singularity. A calculation shows that in the limit of small solid angle in the vicinity of θ = 0, this reduces to the usual line integral for the plane area enclosed by a curve. For a physical motivation, consider a semi-infinite, infinitely thin solenoid, lying along θ = π, terminating at the origin, and carrying a magnetic flux of 4π. The emerging magnetic field is the B above, and A is the vector potential. -- Gene From: Bill Gosper <billgosper@gmail.com> To: math-fun@mailman.xmission.com Sent: Thursday, January 29, 2015 1:41 PM Subject: Re: [math-fun] parametrically enclosed spherical area The better question: Given a point P and closed curve X(t) in 3Space, what is the solid angle at P of the generalized cone joining X to P? --rwg NeilB & I confirmed Gene's formula in the case of spherical caps, but were unable to get 4π/6 for the angle subtended by the top face of a cube wrt its center. Then Neil came up with the amazingly simple θ[1] - θ[0] - Integrate[D[θ[t], t]*Cos[Φ[t]], {t,0,1}] This is the contribution to the solid angle of a (generalized) cone at the origin by an arc of its edge, from (x,y,z) = (r0 sin(Φ0) cos(θ0), r0 sin(Φ0) sin(θ0), r0 cos(Φ0)) to (r1 sin(Φ1) cos(θ1), r1 sin(Φ1) sin(θ1), r1 cos(Φ1)), where r is an arbitrary positive variable. (Φ is the polar angle (co-latitude) and θ is the azimuth (longitude).) For reasons that Gene and Neil seem to understand, this formula requires -π/2 < Φ < π/2 (i.e., northern hemisphere). Example 1: For the spherical cap Φ < a, we need only one arc: θ(t) = 2π t, Φ(t) = a, 0 < t < 1, and the formula immediately gives 2π - 2π cos(a). Example 2: One edge of the top face of the axis-aligned cube of side s, centered at the origin. Converting to rectangular coordinates, rect=Simplify[Out[205] /. {θ -> (ArcTan[x[#], y[#]]&), Φ -> (ArcTan[z[#], Sqrt[x[#]^2 + y[#]^2]]&)}] ArcTan[x[1], y[1]] - ArcTan[x[0], y[0]] - Integrate[(z[t]*(x[t]*Derivative[1][y][t] - y[t]*Derivative[1][x][t]))/((x[t]^2 + y[t]^2)* Sqrt[x[t]^2 + y[t]^2 + z[t]^2]), {t, 0, 1}] Describing the top rear edge, Assuming[s>0,FullSimplify[rect/.{x->((# s)/2+(1-#)*(-s)/2&),y->(s/2&),z->(s/2&)}]] gives -π/6, so the whole square would give -4π/6, negative because I spastically described it clockwise. Example 3: The solid angle at the bottom vertex of a cube standing on the origin. This will be six times the contribution from any one of the six edges forming the zigzag "equator". After a rotate and z-shift, one such edge is described by {1/6 (-3 + Sqrt[3] - 2 Sqrt[3] #) &, 1/6 (3 + Sqrt[3] - 2 Sqrt[3] #) &, (1 + #)/Sqrt[3] &} Then Block[{x, y, z}, {x, y, z} = %; rect] // FullSimplify gives π/12 = 4 π/8/6 as expected. Mathematica bogg(l)ed down trying to find the contribution of a completely generic line segment. Example 4: Cone with knotted edge. https://twitter.com/wolframtap/status/559917026748407808/photo/1 (acknowledged 27 Jan, but somehow never archived.) {x,y,z}= {Cos[4 \[Pi] #1] (-3 + Cos[6 \[Pi] #1]) &, -(-3 + Cos[6 \[Pi] #1]) Sin[4 \[Pi] #1] &, 4 + Sin[6 \[Pi] #1] &}; Block[{x, y, z}, {x, y, z} = %; -ArcTan[x[0], y[0]] + ArcTan[x[1], y[1]] - Integrate[ (z[t]*(x[t]*Derivative[1][y][ t] - y[t]*Derivative[1][x][ t]))/((x[t]^2 + y[t]^2)* Sqrt[x[t]^2 + y[t]^2 + z[t]^2]), {t, 0, 1}]] disgorged a page of complex elliptic integrals approximating the absurd 9.95179869595218741423633284881055 + 0.80160712635024015115186633415580 I. Replacing Integrate with NIntegrate gave the much more plausible real part of this. How can it exceed 2π (planarity)? Because it double-counts the central "triangular" region. I await Gene's opinion whether Neil's formula is an immediate consequence of Gene's, but now I think I see how Neil got it-- the first formula in http://en.wikipedia.org/wiki/Solid_angle [image: d\Omega = \sin\theta\,d\theta\,d\varphi](or the 2nd formula in http://mathworld.wolfram.com/SolidAngle.html)plus Stokes' theorem?But why do both articles omit such an elegant, single-integral formula?--rwg On Mon, Jan 26, 2015 at 9:31 PM, Bill Gosper <billgosper@gmail.com> wrote: The plane area inside (x(t),y(t)) = ½∫x dy - y dx. E.g., the usual picture of the area under f(x), a<x<b becomes four line integrals--the three axis-aligned segments plus the actual curve of f, traversed anticlockwise: Integrate[f[x],{x,a,b}]==(Integrate[a - 0, {t, f[a], 0}] + Integrate[t*0 - 0, {t, a, b}] + Integrate[b - 0, {t, 0, f[b]}]+Integrate[t*D[f[t], t] - f[t]*D[t,t], {t, b, a}])/2 == (b f[b] - a f[a] + Integrate[t f'[t] - f[t], {t, b, a}])/2 , which follows from integration by parts. E.g., if f:=Exp, In[55]:= % /. f -> Exp Out[55]= -E^a + E^b == 1/2 ((-2 + a) E^a - a E^a - (-2 + b) E^b + b E^b) In[56]:= Simplify@% Out[56]= True What about on a sphere? Suppose we have a a unit vector X(t):=(x(t),y(t),z(t)) describing a closed curve on a sphere. (X(0)=X(1), say.) What's the area? There ought to be some nice thing analogous to ½∫x dy - y dx. --rwg
participants (2)
-
Bill Gosper -
Eugene Salamin