Message Boards Message Boards

Integral's unexpected result?

I'm doing something wrong and would appreciate help finding the mistake. The last three integrations don't make sense. Ther's a note in Integrate[] documentation that says, "Substituting limits into an indefinite integral may not give the correct result for a definite integral," but doesn't say why or what to do about it.

a = Integrate[PDF[StudentTDistribution[1699], x], {x, -Infinity, 0}];
b = Integrate[PDF[StudentTDistribution[1699], x], {x, 0, Infinity}];
c = Integrate[
   PDF[StudentTDistribution[1699], x], {x, -Infinity, Infinity}];
d = Integrate[
   PDF[StudentTDistribution[1699], x], {x, -Infinity, -1.58989}];
e = Integrate[
   PDF[StudentTDistribution[1699], x], {x, -1.58989, 1.58989}];
f = Integrate[
   PDF[StudentTDistribution[1699], x], {x, 1.58989, Infinity}];
{a, b, c, d, e, f}
Show[
 RegionPlot[-1.58989 < x < 1.58989 && 
   y < PDF[StudentTDistribution[1699], x], {x, -2.5, 2.5}, {y, 
   0, .4}], 
 Plot[PDF[StudentTDistribution[1699], x], {x, -3, 3}, 
  PlotRange -> All, PlotStyle -> Red], AspectRatio -> 1/2]
Clear[a,b,c,d,e,f]
POSTED BY: Jay Gourley
2 Replies

Thanks, Eric Rimby. I should have thought to use exact limits.

POSTED BY: Jay Gourley
Posted 3 days ago

I don't know exactly why the precision here is a problem, but if you increase the precision (something like -1.58989`50) you get a result of about 0.056. And if you use an exact value (e.g. -158989/100000) then you get an exact answer, which, when you apply N, also gives 0.056.

POSTED BY: Eric Rimbey
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract