[Date Index]
[Thread Index]
[Author Index]
Integration problem
*To*: mathgroup at smc.vnet.net
*Subject*: [mg35496] Integration problem
*From*: Arnold Gregory Civ AFRL/SNAT <Gregory.Arnold at wpafb.af.mil>
*Date*: Tue, 16 Jul 2002 04:50:05 -0400 (EDT)
*Sender*: owner-wri-mathgroup at wolfram.com
On Mathematica 4.1 w/ Win2000, I'm having the following problem with an integral:
In[1]:= expr1 = (t)^2* UnitStep[1 - t^2 - 81. t^4]
Out[1]= t^2 UnitStep[1 - t^2 - 81. t^4]
In[2]:= expr2 = (0.+ t)^2 UnitStep[1 - t^2 - 81. * t^4]
Out[2]= (0.+ t)^2 UnitStep[1 - t^2 - 81. * t^4]
In[3]:= Integrate[Evaluate[expr1],{t,-1,1}]
Out[3]= 0.0227181
In[4]:= Integrate[Evaluate[expr2],{t,-1,1}]
Out[4]=0.666667
In[5]:= Integrate[Evaluate[Rationalize[expr2]],{t,-1,1}]
Out[5]= (10*Sqrt[26*(-1 + 5*Sqrt[13])] -
2*Sqrt[-2 + 10*Sqrt[13]])/8748
In[6]:= N[%]
Out[6]= 0.0227181
In[7]:= NIntegrate[Evaluate[Rationalize[expr2]],{t,-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.
NIntegrate::ncvb: NIntegrate failed to converge to prescribed accuracy after \
7 recursive bisections in t near t = -0.320313.
Out[7]= 0.0225802
It doesn't matter if I put the expression directly into the integrals. I can remove the difference by rationalizing either the expression t+0. or UnitStep[...] & both cases give the correct result. I can also change to (t+eps) and then evaluate eps->0. and get the correct result. In short, it looks like this particular form yields an unstable result & I'm looking for advice on approaches to mitigate this happening within a sequence of long & complex calculations. It isn't clear to me that Rationalize is the best approach or that it will always guarantee correcting the problem.
Thanks!
Greg
Prev by Date:
**simplifying operator experessions with Dot, Times and Plus**
Next by Date:
**How to select all polynomials which have degree greater than a give number out of a list of polynomials!**
Previous by thread:
**Re: MathLink and Serial Ports**
Next by thread:
**Re: Integration problem**
| |