       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:= expr1 = (t)^2* UnitStep[1 - t^2 - 81. t^4]
Out= t^2 UnitStep[1 - t^2 - 81. t^4]

In:= expr2 = (0.+ t)^2 UnitStep[1 - t^2 - 81. * t^4]
Out= (0.+ t)^2 UnitStep[1 - t^2 - 81. * t^4]

In:= Integrate[Evaluate[expr1],{t,-1,1}]
Out= 0.0227181

In:= Integrate[Evaluate[expr2],{t,-1,1}]
Out=0.666667

In:= Integrate[Evaluate[Rationalize[expr2]],{t,-1,1}]
Out= (10*Sqrt[26*(-1 + 5*Sqrt)] -
2*Sqrt[-2 + 10*Sqrt])/8748

In:= N[%]
Out= 0.0227181

In:= 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= 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!