MathGroup Archive 1997

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

Search the Archive

Re: integration problem???

  • To: mathgroup at
  • Subject: [mg9306] Re: [mg9257] integration problem???
  • From: David Withoff <withoff>
  • Date: Mon, 27 Oct 1997 02:47:18 -0500
  • Sender: owner-wri-mathgroup at

> I am trying to integrate the expression: ((2*r2-r1-r).^5).*(r.^(-8))
> with respect to r, between the limits r1=4.75e-4 to r2=2.25e-4.
> If I use Mathematica I get 1.9567e10 If I use quad8 in Matlab I get
> 1.156e07
> Does anyone know what is going wrong with this, please?
> Jason

My guess is that there must be something fundamentally different between
your inputs to Matlab and your inputs to Mathematica. The result from

In[8]:= r1=4.75*10^-4

Out[8]= 0.000475

In[9]:= r2 = 2.25*10^-4

Out[9]= 0.000225

In[10]:= NIntegrate[((2*r2-r1-r)^5)*(r^(-8)), {r, r1, r2}]

Out[10]= 1.15641 10

is correct.

It would be surprising if Matlab would get the wrong answer for such an
easy integral.  Probably the Matlab result that you mentioned is
somehow the result for a different integral.

Dave Withoff
Wolfram Research

  • Prev by Date: Re: Not a machine-size real number?
  • Next by Date: Re: integration problem???
  • Previous by thread: integration problem???
  • Next by thread: Re: integration problem???