DSPRelated.com
Forums

Check my math?

Started by Tim Wescott June 20, 2009
A sphere is a three dimensional figure enclosed by the locus of all 
points that are of distance r (called the radius) away from the center 
point.  It has a volume of 4/3 pi r^3 and a surface area of 4 pi r^2.

A circle is the two-dimensional analog of a sphere.  It is a two 
dimensional figure enclosed by the locus of all points that are a 
distance of r away from the center point.  It has an area of pi r^2 and a 
circumference of 2 pi r.

A line is a one-dimensional analog of a sphere (OK, I'm reaching, but 
bear with me).  It is a one dimensional figure enclosed by the locus of 
all (two) points that are a distance of r away from the center point.  It 
has a length of 2 r and a -- uh -- oh never mind.

Now hopefully I have some momentum:  The four dimensional analog of a 
sphere (commonly called a hypersphere) is a four dimensional figure 
enclosed by the locus of all points that are a distance of r away from 
the center point.  It contains an amount of space (not a volume, 
certainly -- hypervolume?) equal to 1/2 pi^2 r^4, and has a 'surface' 
volume of 2 pi^2 r^3.

I've done the math in a way that seems obvious to me (integrate the 
volume of the sphere that forms the surface of the hypersphere as one of 
the dimensions varies from -r to r), and that pi^2 just _belongs_ there, 
no matter how much it surprises me.

So, am I right?  Wrong?  Anyone done this calculation before?

Thanks.  (and no, this isn't idle speculation; I actually need to know to 
solve a DSP problem I'm wrestling with).

-- 
http://www.wescottdesign.com
Tim Wescott <tim@seemywebsite.com> wrote:
> A sphere is a three dimensional figure enclosed by the locus of all > points that are of distance r (called the radius) away from the center > point. It has a volume of 4/3 pi r^3 and a surface area of 4 pi r^2.
(snip)
> Now hopefully I have some momentum: The four dimensional analog of a > sphere (commonly called a hypersphere) is a four dimensional figure > enclosed by the locus of all points that are a distance of r away from > the center point. It contains an amount of space (not a volume, > certainly -- hypervolume?) equal to 1/2 pi^2 r^4, and has a 'surface' > volume of 2 pi^2 r^3.
The surface volume agrees with mathworld. The hypervolume seems to be an easy integral, so I agree with that one, too. -- glen
>Now hopefully I have some momentum: The four dimensional analog of a >sphere (commonly called a hypersphere) is a four dimensional figure >enclosed by the locus of all points that are a distance of r away from >the center point. It contains an amount of space (not a volume, >certainly -- hypervolume?) equal to 1/2 pi^2 r^4, and has a 'surface' >volume of 2 pi^2 r^3. > >I've done the math in a way that seems obvious to me (integrate the >volume of the sphere that forms the surface of the hypersphere as one of
>the dimensions varies from -r to r), and that pi^2 just _belongs_ there,
>no matter how much it surprises me.
Both the formulae for S.A. & volume for a 4D sphere are correct but if ur logic of integration is followed then the pi squared term cant be accounted for (if u integrate wrt only r ) . Generally the hypervolume & the hyper surface area of a N dimensional sphere( of which urs is a N=4 case) is not calculated by the method mentioned by u but the result rather arrives thru principle of mathematical induction & the result involves beta & gamma functions which is why u get to see the powers of pi (e.g. gamma(1/2) = sqrt(pi) and the general formula involves powers of gamma(1/2)) Remarkably for a n-sphere as it is generally called , u get hyper surface area = derivative of hypervolume , again theory of beta n gamma functions is involved in this , so once u know the volume of a hypersphere , u differentiate it wrt r to get hypersurface area. The formula for a n-sphere hypervolume is Vn(r) = (gamma(1/2))^n * r^n/ gamma(1/2*n +1) & Sn(r) = d/dr(Vn(r)) Note : The above discussion applies to N dimensional Euclidean space. Regards Yogesh P. Gharote Bangalore, India
On Jun 20, 4:00&#4294967295;am, "yogesh_gharote" <yogesh_ghar...@yahoo.com> wrote:
<<<material snipped>>

> &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;Remarkably for a n-sphere as it is generally called , u get hyper > surface area = derivative of hypervolume , again theory of beta n gamma > functions is involved in this , so once u know the volume of a hypersphere > , u differentiate it wrt r to get hypersurface area. > &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; The formula for a n-sphere hypervolume is > &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;Vn(r) = (gamma(1/2))^n * r^n/ gamma(1/2*n +1) > & > &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;Sn(r) = d/dr(Vn(r))
The volume of a sphere in n-dimensional space is proportional to r^n, and, as Yogesh states, we have to use the theory of beta and gamma functions to find the value of the constant of proportionality. But the basic result asked for by Tim and stated as Sn(r) = d/dr(Vn(r)) above should be intuitively obvious even if one does not know the value of the constant of proportionality. Consider the thin shell of thickness dr formed by scooping out the sphere of radius r from the inside of of a sphere of radius r+dr. The volume of this shell is Vn(r+dr) - Vn(r). But since the shell has surface area approximately Sn(r) and thickness dr, its volume is approximately Sn(r)dr. Equate the two expressions, divide both sides by dr, take limits as dr goes to 0. Finicky epsilon-delta folks are advised to use the approach once espoused by Julius Kusuma in this newsgroup ("The most rigorous arguments shall be proved by the most vigorous hand waving") as needed to establish the result. Incidentally, I don't understand what Tim meant when he wrote
>integrate the volume of the sphere that forms the >surface of the hypersphere as one of the dimensions >varies from -r to r
The antiderivative of 2\pi r is \pi r^2, the antiderivative of 4\pi r^2 is (4/3)\pi r^3, and so on and so forth, and there is no need to let "one of the dimensions" vary from -r to + r. Hope this helps --Dilip Sarwate
On Jun 20, 7:40&#4294967295;am, "dvsarw...@yahoo.com" <dvsarw...@gmail.com> wrote:
[snip]
> Finicky epsilon-delta folks are advised to use the > approach once espoused by Julius Kusuma in > this newsgroup ("The most rigorous arguments shall > be proved by the most vigorous hand waving") as > needed to establish the result. >
[snip] Dilip, this is the most flattering citation I ever received! :-) Julius
On Sat, 20 Jun 2009 04:00:47 -0500, yogesh_gharote wrote:

>>Now hopefully I have some momentum: The four dimensional analog of a >>sphere (commonly called a hypersphere) is a four dimensional figure >>enclosed by the locus of all points that are a distance of r away from >>the center point. It contains an amount of space (not a volume, >>certainly -- hypervolume?) equal to 1/2 pi^2 r^4, and has a 'surface' >>volume of 2 pi^2 r^3. >> >>I've done the math in a way that seems obvious to me (integrate the >>volume of the sphere that forms the surface of the hypersphere as one of > >>the dimensions varies from -r to r), and that pi^2 just _belongs_ there, > >>no matter how much it surprises me. > > > Both the formulae for S.A. & volume for a 4D sphere are correct but if > ur logic of integration is followed then the pi squared term cant be > accounted for (if u integrate wrt only r ) . > Generally the hypervolume & the hyper surface area of a N > dimensional sphere( of which urs is a N=4 case) is not calculated by the > method mentioned by u but the result rather arrives thru principle of > mathematical induction & the result involves beta & gamma functions > which is why u get to see the powers of pi (e.g. gamma(1/2) = sqrt(pi) > and the general formula involves powers of gamma(1/2)) > Remarkably for a n-sphere as it is generally called , u get > hyper > surface area = derivative of hypervolume , again theory of beta n gamma > functions is involved in this , so once u know the volume of a > hypersphere , u differentiate it wrt r to get hypersurface area. > The formula for a n-sphere hypervolume is > Vn(r) = (gamma(1/2))^n * r^n/ gamma(1/2*n +1) > & > Sn(r) = d/dr(Vn(r)) > > Note : The above discussion applies to N dimensional Euclidean > space.
My choice of oddball integrals was intentional, as I want to go on to calculating various moments for the probability distributions of the surface of the hypersphere when 3D probability distributions are mapped onto it. Clearly if I map a tight Gaussian distribution onto the hypersphere with a standard deviation that's much smaller than the hypersphere radius the resulting probability distribution will be easy; it's figuring out what happens as that probability distribution opens up that's making my brain cramp. -- http://www.wescottdesign.com
On 20 Jun, 19:50, Tim Wescott <t...@seemywebsite.com> wrote:

> My choice of oddball integrals was intentional, as I want to go on to > calculating various moments for the probability distributions of the > surface of the hypersphere when 3D probability distributions are mapped > onto it. &#4294967295;Clearly if I map a tight Gaussian distribution onto the > hypersphere with a standard deviation that's much smaller than the > hypersphere radius the resulting probability distribution will be easy; > it's figuring out what happens as that probability distribution opens up > that's making my brain cramp.
I'm a bit curious about what kind of problem leads you out in such kinds of calculations? Rune
On Sat, 20 Jun 2009 11:04:38 -0700, Rune Allnor wrote:

> On 20 Jun, 19:50, Tim Wescott <t...@seemywebsite.com> wrote: > >> My choice of oddball integrals was intentional, as I want to go on to >> calculating various moments for the probability distributions of the >> surface of the hypersphere when 3D probability distributions are mapped >> onto it. &nbsp;Clearly if I map a tight Gaussian distribution onto the >> hypersphere with a standard deviation that's much smaller than the >> hypersphere radius the resulting probability distribution will be easy; >> it's figuring out what happens as that probability distribution opens >> up that's making my brain cramp. > > I'm a bit curious about what kind of problem leads you out in such kinds > of calculations?
Unscented transformations for quaternion PDFs used to represent angles in a (hopefully soon-to-be) unscented Kalman filter. The math needed to represent body rotations is quite hairy; to date unit-length quaternions seems to be the best approach, although getting this PDF stuff figured out is proving to be interesting, at best. -- http://www.wescottdesign.com
On 20 Jun, 20:14, Tim Wescott <t...@seemywebsite.com> wrote:
> On Sat, 20 Jun 2009 11:04:38 -0700, Rune Allnor wrote: > > On 20 Jun, 19:50, Tim Wescott <t...@seemywebsite.com> wrote: > > >> My choice of oddball integrals was intentional, as I want to go on to > >> calculating various moments for the probability distributions of the > >> surface of the hypersphere when 3D probability distributions are mapped > >> onto it. &#4294967295;Clearly if I map a tight Gaussian distribution onto the > >> hypersphere with a standard deviation that's much smaller than the > >> hypersphere radius the resulting probability distribution will be easy; > >> it's figuring out what happens as that probability distribution opens > >> up that's making my brain cramp. > > > I'm a bit curious about what kind of problem leads you out in such kinds > > of calculations? > > Unscented transformations for quaternion PDFs used to represent angles in > a (hopefully soon-to-be) unscented Kalman filter.
The expected value is a 4-vector pointing in some desired direction and the PDF represents the probability distribution of actual directions? Rune
On Sat, 20 Jun 2009 11:37:27 -0700, Rune Allnor wrote:

> On 20 Jun, 20:14, Tim Wescott <t...@seemywebsite.com> wrote: >> On Sat, 20 Jun 2009 11:04:38 -0700, Rune Allnor wrote: >> > On 20 Jun, 19:50, Tim Wescott <t...@seemywebsite.com> wrote: >> >> >> My choice of oddball integrals was intentional, as I want to go on >> >> to calculating various moments for the probability distributions of >> >> the surface of the hypersphere when 3D probability distributions are >> >> mapped onto it. &nbsp;Clearly if I map a tight Gaussian distribution onto >> >> the hypersphere with a standard deviation that's much smaller than >> >> the hypersphere radius the resulting probability distribution will >> >> be easy; it's figuring out what happens as that probability >> >> distribution opens up that's making my brain cramp. >> >> > I'm a bit curious about what kind of problem leads you out in such >> > kinds of calculations? >> >> Unscented transformations for quaternion PDFs used to represent angles >> in a (hopefully soon-to-be) unscented Kalman filter. > > The expected value is a 4-vector pointing in some desired direction and > the PDF represents the probability distribution of actual directions?
Yup. Given a PDF I'd _like_ to be able to solve for the expected value of the four vector elements, as well as their cross-correlation. I'd like this to be in a form that's tractable enough that I can code it into an algorithm without either making people's heads explode when they read it and without making the processor bog down. But for now I'll just settle with being able to get the element means and variances out of the thing for a variety of variances of the Gaussians, or a clear indication that if I insist on using Gaussians the math is going to be hopelessly intractable. -- http://www.wescottdesign.com