Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum > General > > "numerical integration and limits of integration"

Post Reply:
Name:
Email Address:

Please send email when my message is replied to.

Url (optional):
Subject:
Message: view original message?
Attachment (optional):
Please answer this:4+5 =



Original Message (ID '130435') By Peter Pein:
In Response To 'Re: numerical integration and limits of integra...' --------- Hi, this is a possibility when one knows the range of integration. To write a little function that does a correct job in any case is simple: nintval[r_] := NIntegrate[f[x], {x, -r, r}, AccuracyGoal -> 8,(*(*either*)Method-> "LocalAdaptive",(*or sth. like*)*) MinRecursion -> Ceiling@Log[1 + Abs@r]] but in this case I would do Integrate[f[x],{x,-r,r}] to get 7 Sqrt[Pi/5] Erf[Sqrt[5] r] and then write a function like: intval[r_] := N[(7 Sqrt[\[Pi]/5] Erf[Sqrt[5] r]), {Infinity, 8}] to get an accuracy of 8 digits. hth, Peter