Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Definite integrals in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg72257] Re: [mg72145] Definite integrals in Mathematica
  • From: Darren Glosemeyer <darreng at wolfram.com>
  • Date: Sat, 16 Dec 2006 05:18:32 -0500 (EST)
  • References: <200612131140.GAA23742@smc.vnet.net>

As Dimitris pointed out, Integrate gives a correct result. However, I 
think the integral you have computed is not the integral of interest. I 
think what you want is the integral of f(r) over the volume of the 
sphere. Writing this as an integration with respect to r gives the 
result from the literature.

In[2]:= dVdr = D[4/3Pi*r^3, r]

Out[2]//InputForm= 4*Pi*r^2

In[3]:= f[r_] = (h^2 - r^2)^3

Out[3]//InputForm= (h^2 - r^2)^3

In[4]:= Integrate[f[r]*dVdr, {r, 0, h}]

Out[4]//InputForm= (64*h^9*Pi)/315


Darren Glosemeyer
Wolfram Research


some guy named Dave wrote:
> Hey all,
>
> Hmm, I tried posting this yesterday, but it hasn't shown up yet. So, 
> appologies if this gets double-posted.
>
> I'm a newbie to Mathematica, and I have a function that I want to integrate. 
> It's basically a smoothing function over a vector space, and I want to 
> normalize it. The function itself looks like this:
>
>    f(r) = (h^2 - r^2)^3
>
> where r is the scalar length ||x|| of some displacement vector x, and h is a 
> constant. We are really only interested in values of r in [0,h], and for 2D 
> vectors. However, I have some research literature involving 3D vectors that I 
> want to compare against, just for sanity.
>
> So, if x is a 3D vector, then the surface of the sphere at radius r should be 
> (4/3)(f(r))^3.  We should then be able to get the definite integral from 
> Mathematica by doing something like:
>
>    Integrate[ 4/3 * Pi( (h^2 - r^2)^3 )^3, {r, 0, h}]
>
> When I do so, I get back
>
>    262144 pi h^19 / 692835
>
> However, the literature I have says that the integral should yield
>
>    64 pi h^9 / 315
>
> So, have I screwed something up? Is the literature wrong, perhaps?
>
> Thanks.
>
> Dave
>   


  • Prev by Date: A problem in mathematical logic
  • Next by Date: Re: Please help overcome problems with integration
  • Previous by thread: Definite integrals in Mathematica
  • Next by thread: Combining ListPlot3D with Show[]