Weird computation error when using fnInt (numerical integral) on TI-84 PlusNumerical computation stability issueNumerical iterative method, estimating errorApproximating an Integral for Numerical ComputationAbsolute error computationUsing numerical methods to calculate integralNumerical Analysis and Computation Error ProblemNumerical Integration Error BoundAP Calculus BC - Related Rates ProblemWhy doesn't my TI-84 give me an exact value when calculating scientific notations?Solving a logistic regression problem with my calculator gives “singular matrix” error. Why?

Why is this estimator biased?

What does "Scientists rise up against statistical significance" mean? (Comment in Nature)

I'm the sea and the sun

What is the evidence for the "tyranny of the majority problem" in a direct democracy context?

How do apertures which seem too large to physically fit work?

PTIJ: Haman's bad computer

Recommended PCB layout understanding - ADM2572 datasheet

Does Doodling or Improvising on the Piano Have Any Benefits?

How to explain what's wrong with this application of the chain rule?

How does a computer interpret real numbers?

Fear of getting stuck on one programming language / technology that is not used in my country

How to cover method return statement in Apex Class?

How to fade a semiplane defined by line?

Is this toilet slogan correct usage of the English language?

Is there a RAID 0 Equivalent for RAM?

Terse Method to Swap Lowest for Highest?

Using substitution ciphers to generate new alphabets in a novel

Why should universal income be universal?

Mimic lecturing on blackboard, facing audience

What should you do when eye contact makes your subordinate uncomfortable?

Hero deduces identity of a killer

How much character growth crosses the line into breaking the character

Why would a new[] expression ever invoke a destructor?

Do the primes contain an infinite almost arithmetic progression?



Weird computation error when using fnInt (numerical integral) on TI-84 Plus


Numerical computation stability issueNumerical iterative method, estimating errorApproximating an Integral for Numerical ComputationAbsolute error computationUsing numerical methods to calculate integralNumerical Analysis and Computation Error ProblemNumerical Integration Error BoundAP Calculus BC - Related Rates ProblemWhy doesn't my TI-84 give me an exact value when calculating scientific notations?Solving a logistic regression problem with my calculator gives “singular matrix” error. Why?













2












$begingroup$


Today in Calculus class I was bored so I decided to try and approximate $pi$ by evaluating $ left( displaystyle int_-a^a e^-x^2 dx right)^2$ on my calculator for larger and larger values of $a$.



However, in doing so, I noticed something peculiar. When I plugged in $a = 100$ it gave me a value of approximately $pi$, as expected. However, when I plugged in $a = 1000$ I got an answer of about $2.7 times 10^-7$. In fact, I was able to narrow it down to figure out that $a = 892.26$ and below (with reasonable assumption) gave me a correct value while $a = 892.27$ and above (with reasonable assumption) gave me some very small value like I found with $a = 1000$



What's going on here?



edit: I realize that this is a problem with the calculator's integration method. I am aware that larger values of $a$ should converge closer to $pi$.










share|cite|improve this question











$endgroup$











  • $begingroup$
    Don't know, so this isn't an answer, but sure does look like a bug. For abs(a) big enough, the calculator ought to just approximate it as + or - infinity, and use the asymptotic values of the integrated gaussian, related to the well-known "erf" function.
    $endgroup$
    – DarenW
    Apr 8 '14 at 23:06










  • $begingroup$
    I tried this on my TI-84 plus and while I got a different value, 7.36107732x$10^-14$, the value is obviously not $Pi$. This is a very interesting bug.
    $endgroup$
    – TheBluegrassMathematician
    Apr 8 '14 at 23:24











  • $begingroup$
    Related discussion.
    $endgroup$
    – user127096
    Apr 13 '14 at 22:22















2












$begingroup$


Today in Calculus class I was bored so I decided to try and approximate $pi$ by evaluating $ left( displaystyle int_-a^a e^-x^2 dx right)^2$ on my calculator for larger and larger values of $a$.



However, in doing so, I noticed something peculiar. When I plugged in $a = 100$ it gave me a value of approximately $pi$, as expected. However, when I plugged in $a = 1000$ I got an answer of about $2.7 times 10^-7$. In fact, I was able to narrow it down to figure out that $a = 892.26$ and below (with reasonable assumption) gave me a correct value while $a = 892.27$ and above (with reasonable assumption) gave me some very small value like I found with $a = 1000$



What's going on here?



edit: I realize that this is a problem with the calculator's integration method. I am aware that larger values of $a$ should converge closer to $pi$.










share|cite|improve this question











$endgroup$











  • $begingroup$
    Don't know, so this isn't an answer, but sure does look like a bug. For abs(a) big enough, the calculator ought to just approximate it as + or - infinity, and use the asymptotic values of the integrated gaussian, related to the well-known "erf" function.
    $endgroup$
    – DarenW
    Apr 8 '14 at 23:06










  • $begingroup$
    I tried this on my TI-84 plus and while I got a different value, 7.36107732x$10^-14$, the value is obviously not $Pi$. This is a very interesting bug.
    $endgroup$
    – TheBluegrassMathematician
    Apr 8 '14 at 23:24











  • $begingroup$
    Related discussion.
    $endgroup$
    – user127096
    Apr 13 '14 at 22:22













2












2








2


3



$begingroup$


Today in Calculus class I was bored so I decided to try and approximate $pi$ by evaluating $ left( displaystyle int_-a^a e^-x^2 dx right)^2$ on my calculator for larger and larger values of $a$.



However, in doing so, I noticed something peculiar. When I plugged in $a = 100$ it gave me a value of approximately $pi$, as expected. However, when I plugged in $a = 1000$ I got an answer of about $2.7 times 10^-7$. In fact, I was able to narrow it down to figure out that $a = 892.26$ and below (with reasonable assumption) gave me a correct value while $a = 892.27$ and above (with reasonable assumption) gave me some very small value like I found with $a = 1000$



What's going on here?



edit: I realize that this is a problem with the calculator's integration method. I am aware that larger values of $a$ should converge closer to $pi$.










share|cite|improve this question











$endgroup$




Today in Calculus class I was bored so I decided to try and approximate $pi$ by evaluating $ left( displaystyle int_-a^a e^-x^2 dx right)^2$ on my calculator for larger and larger values of $a$.



However, in doing so, I noticed something peculiar. When I plugged in $a = 100$ it gave me a value of approximately $pi$, as expected. However, when I plugged in $a = 1000$ I got an answer of about $2.7 times 10^-7$. In fact, I was able to narrow it down to figure out that $a = 892.26$ and below (with reasonable assumption) gave me a correct value while $a = 892.27$ and above (with reasonable assumption) gave me some very small value like I found with $a = 1000$



What's going on here?



edit: I realize that this is a problem with the calculator's integration method. I am aware that larger values of $a$ should converge closer to $pi$.







integration numerical-methods calculator






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Apr 8 '14 at 23:50







MCT

















asked Apr 8 '14 at 23:01









MCTMCT

14.5k42668




14.5k42668











  • $begingroup$
    Don't know, so this isn't an answer, but sure does look like a bug. For abs(a) big enough, the calculator ought to just approximate it as + or - infinity, and use the asymptotic values of the integrated gaussian, related to the well-known "erf" function.
    $endgroup$
    – DarenW
    Apr 8 '14 at 23:06










  • $begingroup$
    I tried this on my TI-84 plus and while I got a different value, 7.36107732x$10^-14$, the value is obviously not $Pi$. This is a very interesting bug.
    $endgroup$
    – TheBluegrassMathematician
    Apr 8 '14 at 23:24











  • $begingroup$
    Related discussion.
    $endgroup$
    – user127096
    Apr 13 '14 at 22:22
















  • $begingroup$
    Don't know, so this isn't an answer, but sure does look like a bug. For abs(a) big enough, the calculator ought to just approximate it as + or - infinity, and use the asymptotic values of the integrated gaussian, related to the well-known "erf" function.
    $endgroup$
    – DarenW
    Apr 8 '14 at 23:06










  • $begingroup$
    I tried this on my TI-84 plus and while I got a different value, 7.36107732x$10^-14$, the value is obviously not $Pi$. This is a very interesting bug.
    $endgroup$
    – TheBluegrassMathematician
    Apr 8 '14 at 23:24











  • $begingroup$
    Related discussion.
    $endgroup$
    – user127096
    Apr 13 '14 at 22:22















$begingroup$
Don't know, so this isn't an answer, but sure does look like a bug. For abs(a) big enough, the calculator ought to just approximate it as + or - infinity, and use the asymptotic values of the integrated gaussian, related to the well-known "erf" function.
$endgroup$
– DarenW
Apr 8 '14 at 23:06




$begingroup$
Don't know, so this isn't an answer, but sure does look like a bug. For abs(a) big enough, the calculator ought to just approximate it as + or - infinity, and use the asymptotic values of the integrated gaussian, related to the well-known "erf" function.
$endgroup$
– DarenW
Apr 8 '14 at 23:06












$begingroup$
I tried this on my TI-84 plus and while I got a different value, 7.36107732x$10^-14$, the value is obviously not $Pi$. This is a very interesting bug.
$endgroup$
– TheBluegrassMathematician
Apr 8 '14 at 23:24





$begingroup$
I tried this on my TI-84 plus and while I got a different value, 7.36107732x$10^-14$, the value is obviously not $Pi$. This is a very interesting bug.
$endgroup$
– TheBluegrassMathematician
Apr 8 '14 at 23:24













$begingroup$
Related discussion.
$endgroup$
– user127096
Apr 13 '14 at 22:22




$begingroup$
Related discussion.
$endgroup$
– user127096
Apr 13 '14 at 22:22










3 Answers
3






active

oldest

votes


















1












$begingroup$

First, it doesn't recognize your input as the error function, but just as a function to be integrated numerically. When it does so, probably what is happening is that the calculator starts by evaluating the integrand at a series of points between the upper and lower limits of integration, using something like the trapezoid rule to approximate the integral. Then it cuts the interval in half and computes it again. If they agree (closely enough) it believes it has converged and reports the result. If they disagree, it keeps working on smaller and smaller pieces (maybe changing the spacing to put lots of points where the function is changing rapidly) until it converges. When the interval becomes long enough, the spacing between the points gets wide enough that it misses the hump around $x=0$ completely, which is why it reports such a small number. You might find that if you set $a$ even larger, it returns exactly zero because the value of the integrand is so small at all the points it samples.






share|cite|improve this answer









$endgroup$












  • $begingroup$
    The TI doesn't really know how to do integrals exactly, but instead probably uses this approach. You can try doing $int_0^1textrand dx$. It will spit out different values ~$0.5$. Sometimes it will take a while to think it converged to a value, and sometimes it will determine that it never converges.
    $endgroup$
    – user137794
    Apr 8 '14 at 23:33







  • 1




    $begingroup$
    Search results suggest that TI-84+ uses Gauss-Kronrod quadrature, but I could not find the details such as the number of nodes.
    $endgroup$
    – user127096
    Apr 13 '14 at 22:23


















1












$begingroup$

TI-84 integration algorithm is an adaptive Gauss-Kronrod 15-point rule, with apparently an absolute error threshold of $10^-5$ (TI-84 Plus and TI-84 Plus Silver Edition Guidebook, 2010, p. 41). When the absolute error estimate from the rule is greater than the threshold, the interval is subdivided and the integral recalculated over the intervals. The intervals are recursively subdivided until the error estimate is within the threshold.



For $a le 892.26$, the initial error estimate is greater than the threshold,
and recursive subdivision is applied.
For $a ge 892.27$, the initial error estimate is less than the threshold,
and no subdivision is applied.



Below is the equivalent computation done with Mathematica. For the OP's integral, to reproduce the integral, I had, surprisingly, to apply a common strategy used to cancel out odd functions when integrating over symmetric intervals:
$$int_-a^a f(x) ; dx = int_0^a left(f(x) + f(-x)right) ; dx$$
Here is the code:



nodes, (* vector of nodes for the interval 0, 1 *)
wts, (* weights vector *)
errwts = (* error weights vector *)
NIntegrate`GaussKronrodRuleData[7, MachinePrecision];
Length@nodes
(* 15 *)


The following shows that $10^-5$ is the threshold:



fvec = Exp[-Rescale[nodes, 0, 1, 0, 892.26]^2]; (* vector of function values *)
fvec.wts (2 * 892.26) (* Dot product of function values and nodes scaled by
interval length yields the integral *)
fvec.errwts (2 * 892.26) (* Scaled dot product with the error weights estimates the error *)
(*
0.0000100015 integral estimate
0.0000100015 error estimate
*)

fvec = Exp[-Rescale[nodes, 0, 1, 0, 892.27]^2];
fvec.wts (2 * 892.27)
fvec.errwts (2 * 892.27)
(*
9.99831*10^-6 integral estimate
9.99831*10^-6 error estimate
*)


The following calculates the integral and error estimate. The integral agrees with the OP's:



fvec = Exp[-Rescale[nodes, 0, 1, 0, 1000]^2];
fvec.wts (2000)
fvec.errwts (2000)
(*
2.71313*10^-7 integral estimate
2.71313*10^-7 error estimate
*)





share|cite|improve this answer











$endgroup$












  • $begingroup$
    If you have a reference for the algorithm used by TI-86, then please add it to your answer as this type of information can be hard to track down. Kind regards
    $endgroup$
    – Carl Christian
    Mar 15 at 9:31






  • 1




    $begingroup$
    @CarlChristian I added the reference for the TI-84. The Guidebooks can be found here, but the one for the TI-86 does not seem to indicate the method(s) used.
    $endgroup$
    – Michael E2
    Mar 15 at 14:15






  • 1




    $begingroup$
    @CarlChristian I found this resource at TI.com (it downloads a PDF). It indicates that the TI-86 uses a 7-node rule, which would not give the same results as OP observes (or that I have observed) on the TI-84. I don't have a TI-86 to test.
    $endgroup$
    – Michael E2
    Mar 15 at 14:29










  • $begingroup$
    Thank you! You have already given me more information than I could hope for.
    $endgroup$
    – Carl Christian
    Mar 15 at 15:16



















0












$begingroup$

We know that
$$lim_atoinftyleft(int^a_-ae^-x^2dxright)^2=lim_atoinftydfrac14pileft(operatornameerf(a)^2+operatornameerf(-a)^2-2operatornameerf(a)operatornameerf(-a)right)=\
dfracpi4(1+1-(-2))=pi$$
Hence, I am led to believe that this is a bug in the calculator itself, since the value should be getting closer to $pi$.






share|cite|improve this answer









$endgroup$












    Your Answer





    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "69"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f745890%2fweird-computation-error-when-using-fnint-numerical-integral-on-ti-84-plus%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1












    $begingroup$

    First, it doesn't recognize your input as the error function, but just as a function to be integrated numerically. When it does so, probably what is happening is that the calculator starts by evaluating the integrand at a series of points between the upper and lower limits of integration, using something like the trapezoid rule to approximate the integral. Then it cuts the interval in half and computes it again. If they agree (closely enough) it believes it has converged and reports the result. If they disagree, it keeps working on smaller and smaller pieces (maybe changing the spacing to put lots of points where the function is changing rapidly) until it converges. When the interval becomes long enough, the spacing between the points gets wide enough that it misses the hump around $x=0$ completely, which is why it reports such a small number. You might find that if you set $a$ even larger, it returns exactly zero because the value of the integrand is so small at all the points it samples.






    share|cite|improve this answer









    $endgroup$












    • $begingroup$
      The TI doesn't really know how to do integrals exactly, but instead probably uses this approach. You can try doing $int_0^1textrand dx$. It will spit out different values ~$0.5$. Sometimes it will take a while to think it converged to a value, and sometimes it will determine that it never converges.
      $endgroup$
      – user137794
      Apr 8 '14 at 23:33







    • 1




      $begingroup$
      Search results suggest that TI-84+ uses Gauss-Kronrod quadrature, but I could not find the details such as the number of nodes.
      $endgroup$
      – user127096
      Apr 13 '14 at 22:23















    1












    $begingroup$

    First, it doesn't recognize your input as the error function, but just as a function to be integrated numerically. When it does so, probably what is happening is that the calculator starts by evaluating the integrand at a series of points between the upper and lower limits of integration, using something like the trapezoid rule to approximate the integral. Then it cuts the interval in half and computes it again. If they agree (closely enough) it believes it has converged and reports the result. If they disagree, it keeps working on smaller and smaller pieces (maybe changing the spacing to put lots of points where the function is changing rapidly) until it converges. When the interval becomes long enough, the spacing between the points gets wide enough that it misses the hump around $x=0$ completely, which is why it reports such a small number. You might find that if you set $a$ even larger, it returns exactly zero because the value of the integrand is so small at all the points it samples.






    share|cite|improve this answer









    $endgroup$












    • $begingroup$
      The TI doesn't really know how to do integrals exactly, but instead probably uses this approach. You can try doing $int_0^1textrand dx$. It will spit out different values ~$0.5$. Sometimes it will take a while to think it converged to a value, and sometimes it will determine that it never converges.
      $endgroup$
      – user137794
      Apr 8 '14 at 23:33







    • 1




      $begingroup$
      Search results suggest that TI-84+ uses Gauss-Kronrod quadrature, but I could not find the details such as the number of nodes.
      $endgroup$
      – user127096
      Apr 13 '14 at 22:23













    1












    1








    1





    $begingroup$

    First, it doesn't recognize your input as the error function, but just as a function to be integrated numerically. When it does so, probably what is happening is that the calculator starts by evaluating the integrand at a series of points between the upper and lower limits of integration, using something like the trapezoid rule to approximate the integral. Then it cuts the interval in half and computes it again. If they agree (closely enough) it believes it has converged and reports the result. If they disagree, it keeps working on smaller and smaller pieces (maybe changing the spacing to put lots of points where the function is changing rapidly) until it converges. When the interval becomes long enough, the spacing between the points gets wide enough that it misses the hump around $x=0$ completely, which is why it reports such a small number. You might find that if you set $a$ even larger, it returns exactly zero because the value of the integrand is so small at all the points it samples.






    share|cite|improve this answer









    $endgroup$



    First, it doesn't recognize your input as the error function, but just as a function to be integrated numerically. When it does so, probably what is happening is that the calculator starts by evaluating the integrand at a series of points between the upper and lower limits of integration, using something like the trapezoid rule to approximate the integral. Then it cuts the interval in half and computes it again. If they agree (closely enough) it believes it has converged and reports the result. If they disagree, it keeps working on smaller and smaller pieces (maybe changing the spacing to put lots of points where the function is changing rapidly) until it converges. When the interval becomes long enough, the spacing between the points gets wide enough that it misses the hump around $x=0$ completely, which is why it reports such a small number. You might find that if you set $a$ even larger, it returns exactly zero because the value of the integrand is so small at all the points it samples.







    share|cite|improve this answer












    share|cite|improve this answer



    share|cite|improve this answer










    answered Apr 8 '14 at 23:24









    Ross MillikanRoss Millikan

    300k24200374




    300k24200374











    • $begingroup$
      The TI doesn't really know how to do integrals exactly, but instead probably uses this approach. You can try doing $int_0^1textrand dx$. It will spit out different values ~$0.5$. Sometimes it will take a while to think it converged to a value, and sometimes it will determine that it never converges.
      $endgroup$
      – user137794
      Apr 8 '14 at 23:33







    • 1




      $begingroup$
      Search results suggest that TI-84+ uses Gauss-Kronrod quadrature, but I could not find the details such as the number of nodes.
      $endgroup$
      – user127096
      Apr 13 '14 at 22:23
















    • $begingroup$
      The TI doesn't really know how to do integrals exactly, but instead probably uses this approach. You can try doing $int_0^1textrand dx$. It will spit out different values ~$0.5$. Sometimes it will take a while to think it converged to a value, and sometimes it will determine that it never converges.
      $endgroup$
      – user137794
      Apr 8 '14 at 23:33







    • 1




      $begingroup$
      Search results suggest that TI-84+ uses Gauss-Kronrod quadrature, but I could not find the details such as the number of nodes.
      $endgroup$
      – user127096
      Apr 13 '14 at 22:23















    $begingroup$
    The TI doesn't really know how to do integrals exactly, but instead probably uses this approach. You can try doing $int_0^1textrand dx$. It will spit out different values ~$0.5$. Sometimes it will take a while to think it converged to a value, and sometimes it will determine that it never converges.
    $endgroup$
    – user137794
    Apr 8 '14 at 23:33





    $begingroup$
    The TI doesn't really know how to do integrals exactly, but instead probably uses this approach. You can try doing $int_0^1textrand dx$. It will spit out different values ~$0.5$. Sometimes it will take a while to think it converged to a value, and sometimes it will determine that it never converges.
    $endgroup$
    – user137794
    Apr 8 '14 at 23:33





    1




    1




    $begingroup$
    Search results suggest that TI-84+ uses Gauss-Kronrod quadrature, but I could not find the details such as the number of nodes.
    $endgroup$
    – user127096
    Apr 13 '14 at 22:23




    $begingroup$
    Search results suggest that TI-84+ uses Gauss-Kronrod quadrature, but I could not find the details such as the number of nodes.
    $endgroup$
    – user127096
    Apr 13 '14 at 22:23











    1












    $begingroup$

    TI-84 integration algorithm is an adaptive Gauss-Kronrod 15-point rule, with apparently an absolute error threshold of $10^-5$ (TI-84 Plus and TI-84 Plus Silver Edition Guidebook, 2010, p. 41). When the absolute error estimate from the rule is greater than the threshold, the interval is subdivided and the integral recalculated over the intervals. The intervals are recursively subdivided until the error estimate is within the threshold.



    For $a le 892.26$, the initial error estimate is greater than the threshold,
    and recursive subdivision is applied.
    For $a ge 892.27$, the initial error estimate is less than the threshold,
    and no subdivision is applied.



    Below is the equivalent computation done with Mathematica. For the OP's integral, to reproduce the integral, I had, surprisingly, to apply a common strategy used to cancel out odd functions when integrating over symmetric intervals:
    $$int_-a^a f(x) ; dx = int_0^a left(f(x) + f(-x)right) ; dx$$
    Here is the code:



    nodes, (* vector of nodes for the interval 0, 1 *)
    wts, (* weights vector *)
    errwts = (* error weights vector *)
    NIntegrate`GaussKronrodRuleData[7, MachinePrecision];
    Length@nodes
    (* 15 *)


    The following shows that $10^-5$ is the threshold:



    fvec = Exp[-Rescale[nodes, 0, 1, 0, 892.26]^2]; (* vector of function values *)
    fvec.wts (2 * 892.26) (* Dot product of function values and nodes scaled by
    interval length yields the integral *)
    fvec.errwts (2 * 892.26) (* Scaled dot product with the error weights estimates the error *)
    (*
    0.0000100015 integral estimate
    0.0000100015 error estimate
    *)

    fvec = Exp[-Rescale[nodes, 0, 1, 0, 892.27]^2];
    fvec.wts (2 * 892.27)
    fvec.errwts (2 * 892.27)
    (*
    9.99831*10^-6 integral estimate
    9.99831*10^-6 error estimate
    *)


    The following calculates the integral and error estimate. The integral agrees with the OP's:



    fvec = Exp[-Rescale[nodes, 0, 1, 0, 1000]^2];
    fvec.wts (2000)
    fvec.errwts (2000)
    (*
    2.71313*10^-7 integral estimate
    2.71313*10^-7 error estimate
    *)





    share|cite|improve this answer











    $endgroup$












    • $begingroup$
      If you have a reference for the algorithm used by TI-86, then please add it to your answer as this type of information can be hard to track down. Kind regards
      $endgroup$
      – Carl Christian
      Mar 15 at 9:31






    • 1




      $begingroup$
      @CarlChristian I added the reference for the TI-84. The Guidebooks can be found here, but the one for the TI-86 does not seem to indicate the method(s) used.
      $endgroup$
      – Michael E2
      Mar 15 at 14:15






    • 1




      $begingroup$
      @CarlChristian I found this resource at TI.com (it downloads a PDF). It indicates that the TI-86 uses a 7-node rule, which would not give the same results as OP observes (or that I have observed) on the TI-84. I don't have a TI-86 to test.
      $endgroup$
      – Michael E2
      Mar 15 at 14:29










    • $begingroup$
      Thank you! You have already given me more information than I could hope for.
      $endgroup$
      – Carl Christian
      Mar 15 at 15:16
















    1












    $begingroup$

    TI-84 integration algorithm is an adaptive Gauss-Kronrod 15-point rule, with apparently an absolute error threshold of $10^-5$ (TI-84 Plus and TI-84 Plus Silver Edition Guidebook, 2010, p. 41). When the absolute error estimate from the rule is greater than the threshold, the interval is subdivided and the integral recalculated over the intervals. The intervals are recursively subdivided until the error estimate is within the threshold.



    For $a le 892.26$, the initial error estimate is greater than the threshold,
    and recursive subdivision is applied.
    For $a ge 892.27$, the initial error estimate is less than the threshold,
    and no subdivision is applied.



    Below is the equivalent computation done with Mathematica. For the OP's integral, to reproduce the integral, I had, surprisingly, to apply a common strategy used to cancel out odd functions when integrating over symmetric intervals:
    $$int_-a^a f(x) ; dx = int_0^a left(f(x) + f(-x)right) ; dx$$
    Here is the code:



    nodes, (* vector of nodes for the interval 0, 1 *)
    wts, (* weights vector *)
    errwts = (* error weights vector *)
    NIntegrate`GaussKronrodRuleData[7, MachinePrecision];
    Length@nodes
    (* 15 *)


    The following shows that $10^-5$ is the threshold:



    fvec = Exp[-Rescale[nodes, 0, 1, 0, 892.26]^2]; (* vector of function values *)
    fvec.wts (2 * 892.26) (* Dot product of function values and nodes scaled by
    interval length yields the integral *)
    fvec.errwts (2 * 892.26) (* Scaled dot product with the error weights estimates the error *)
    (*
    0.0000100015 integral estimate
    0.0000100015 error estimate
    *)

    fvec = Exp[-Rescale[nodes, 0, 1, 0, 892.27]^2];
    fvec.wts (2 * 892.27)
    fvec.errwts (2 * 892.27)
    (*
    9.99831*10^-6 integral estimate
    9.99831*10^-6 error estimate
    *)


    The following calculates the integral and error estimate. The integral agrees with the OP's:



    fvec = Exp[-Rescale[nodes, 0, 1, 0, 1000]^2];
    fvec.wts (2000)
    fvec.errwts (2000)
    (*
    2.71313*10^-7 integral estimate
    2.71313*10^-7 error estimate
    *)





    share|cite|improve this answer











    $endgroup$












    • $begingroup$
      If you have a reference for the algorithm used by TI-86, then please add it to your answer as this type of information can be hard to track down. Kind regards
      $endgroup$
      – Carl Christian
      Mar 15 at 9:31






    • 1




      $begingroup$
      @CarlChristian I added the reference for the TI-84. The Guidebooks can be found here, but the one for the TI-86 does not seem to indicate the method(s) used.
      $endgroup$
      – Michael E2
      Mar 15 at 14:15






    • 1




      $begingroup$
      @CarlChristian I found this resource at TI.com (it downloads a PDF). It indicates that the TI-86 uses a 7-node rule, which would not give the same results as OP observes (or that I have observed) on the TI-84. I don't have a TI-86 to test.
      $endgroup$
      – Michael E2
      Mar 15 at 14:29










    • $begingroup$
      Thank you! You have already given me more information than I could hope for.
      $endgroup$
      – Carl Christian
      Mar 15 at 15:16














    1












    1








    1





    $begingroup$

    TI-84 integration algorithm is an adaptive Gauss-Kronrod 15-point rule, with apparently an absolute error threshold of $10^-5$ (TI-84 Plus and TI-84 Plus Silver Edition Guidebook, 2010, p. 41). When the absolute error estimate from the rule is greater than the threshold, the interval is subdivided and the integral recalculated over the intervals. The intervals are recursively subdivided until the error estimate is within the threshold.



    For $a le 892.26$, the initial error estimate is greater than the threshold,
    and recursive subdivision is applied.
    For $a ge 892.27$, the initial error estimate is less than the threshold,
    and no subdivision is applied.



    Below is the equivalent computation done with Mathematica. For the OP's integral, to reproduce the integral, I had, surprisingly, to apply a common strategy used to cancel out odd functions when integrating over symmetric intervals:
    $$int_-a^a f(x) ; dx = int_0^a left(f(x) + f(-x)right) ; dx$$
    Here is the code:



    nodes, (* vector of nodes for the interval 0, 1 *)
    wts, (* weights vector *)
    errwts = (* error weights vector *)
    NIntegrate`GaussKronrodRuleData[7, MachinePrecision];
    Length@nodes
    (* 15 *)


    The following shows that $10^-5$ is the threshold:



    fvec = Exp[-Rescale[nodes, 0, 1, 0, 892.26]^2]; (* vector of function values *)
    fvec.wts (2 * 892.26) (* Dot product of function values and nodes scaled by
    interval length yields the integral *)
    fvec.errwts (2 * 892.26) (* Scaled dot product with the error weights estimates the error *)
    (*
    0.0000100015 integral estimate
    0.0000100015 error estimate
    *)

    fvec = Exp[-Rescale[nodes, 0, 1, 0, 892.27]^2];
    fvec.wts (2 * 892.27)
    fvec.errwts (2 * 892.27)
    (*
    9.99831*10^-6 integral estimate
    9.99831*10^-6 error estimate
    *)


    The following calculates the integral and error estimate. The integral agrees with the OP's:



    fvec = Exp[-Rescale[nodes, 0, 1, 0, 1000]^2];
    fvec.wts (2000)
    fvec.errwts (2000)
    (*
    2.71313*10^-7 integral estimate
    2.71313*10^-7 error estimate
    *)





    share|cite|improve this answer











    $endgroup$



    TI-84 integration algorithm is an adaptive Gauss-Kronrod 15-point rule, with apparently an absolute error threshold of $10^-5$ (TI-84 Plus and TI-84 Plus Silver Edition Guidebook, 2010, p. 41). When the absolute error estimate from the rule is greater than the threshold, the interval is subdivided and the integral recalculated over the intervals. The intervals are recursively subdivided until the error estimate is within the threshold.



    For $a le 892.26$, the initial error estimate is greater than the threshold,
    and recursive subdivision is applied.
    For $a ge 892.27$, the initial error estimate is less than the threshold,
    and no subdivision is applied.



    Below is the equivalent computation done with Mathematica. For the OP's integral, to reproduce the integral, I had, surprisingly, to apply a common strategy used to cancel out odd functions when integrating over symmetric intervals:
    $$int_-a^a f(x) ; dx = int_0^a left(f(x) + f(-x)right) ; dx$$
    Here is the code:



    nodes, (* vector of nodes for the interval 0, 1 *)
    wts, (* weights vector *)
    errwts = (* error weights vector *)
    NIntegrate`GaussKronrodRuleData[7, MachinePrecision];
    Length@nodes
    (* 15 *)


    The following shows that $10^-5$ is the threshold:



    fvec = Exp[-Rescale[nodes, 0, 1, 0, 892.26]^2]; (* vector of function values *)
    fvec.wts (2 * 892.26) (* Dot product of function values and nodes scaled by
    interval length yields the integral *)
    fvec.errwts (2 * 892.26) (* Scaled dot product with the error weights estimates the error *)
    (*
    0.0000100015 integral estimate
    0.0000100015 error estimate
    *)

    fvec = Exp[-Rescale[nodes, 0, 1, 0, 892.27]^2];
    fvec.wts (2 * 892.27)
    fvec.errwts (2 * 892.27)
    (*
    9.99831*10^-6 integral estimate
    9.99831*10^-6 error estimate
    *)


    The following calculates the integral and error estimate. The integral agrees with the OP's:



    fvec = Exp[-Rescale[nodes, 0, 1, 0, 1000]^2];
    fvec.wts (2000)
    fvec.errwts (2000)
    (*
    2.71313*10^-7 integral estimate
    2.71313*10^-7 error estimate
    *)






    share|cite|improve this answer














    share|cite|improve this answer



    share|cite|improve this answer








    edited Mar 15 at 14:11

























    answered Mar 15 at 2:43









    Michael E2Michael E2

    1,2521216




    1,2521216











    • $begingroup$
      If you have a reference for the algorithm used by TI-86, then please add it to your answer as this type of information can be hard to track down. Kind regards
      $endgroup$
      – Carl Christian
      Mar 15 at 9:31






    • 1




      $begingroup$
      @CarlChristian I added the reference for the TI-84. The Guidebooks can be found here, but the one for the TI-86 does not seem to indicate the method(s) used.
      $endgroup$
      – Michael E2
      Mar 15 at 14:15






    • 1




      $begingroup$
      @CarlChristian I found this resource at TI.com (it downloads a PDF). It indicates that the TI-86 uses a 7-node rule, which would not give the same results as OP observes (or that I have observed) on the TI-84. I don't have a TI-86 to test.
      $endgroup$
      – Michael E2
      Mar 15 at 14:29










    • $begingroup$
      Thank you! You have already given me more information than I could hope for.
      $endgroup$
      – Carl Christian
      Mar 15 at 15:16

















    • $begingroup$
      If you have a reference for the algorithm used by TI-86, then please add it to your answer as this type of information can be hard to track down. Kind regards
      $endgroup$
      – Carl Christian
      Mar 15 at 9:31






    • 1




      $begingroup$
      @CarlChristian I added the reference for the TI-84. The Guidebooks can be found here, but the one for the TI-86 does not seem to indicate the method(s) used.
      $endgroup$
      – Michael E2
      Mar 15 at 14:15






    • 1




      $begingroup$
      @CarlChristian I found this resource at TI.com (it downloads a PDF). It indicates that the TI-86 uses a 7-node rule, which would not give the same results as OP observes (or that I have observed) on the TI-84. I don't have a TI-86 to test.
      $endgroup$
      – Michael E2
      Mar 15 at 14:29










    • $begingroup$
      Thank you! You have already given me more information than I could hope for.
      $endgroup$
      – Carl Christian
      Mar 15 at 15:16
















    $begingroup$
    If you have a reference for the algorithm used by TI-86, then please add it to your answer as this type of information can be hard to track down. Kind regards
    $endgroup$
    – Carl Christian
    Mar 15 at 9:31




    $begingroup$
    If you have a reference for the algorithm used by TI-86, then please add it to your answer as this type of information can be hard to track down. Kind regards
    $endgroup$
    – Carl Christian
    Mar 15 at 9:31




    1




    1




    $begingroup$
    @CarlChristian I added the reference for the TI-84. The Guidebooks can be found here, but the one for the TI-86 does not seem to indicate the method(s) used.
    $endgroup$
    – Michael E2
    Mar 15 at 14:15




    $begingroup$
    @CarlChristian I added the reference for the TI-84. The Guidebooks can be found here, but the one for the TI-86 does not seem to indicate the method(s) used.
    $endgroup$
    – Michael E2
    Mar 15 at 14:15




    1




    1




    $begingroup$
    @CarlChristian I found this resource at TI.com (it downloads a PDF). It indicates that the TI-86 uses a 7-node rule, which would not give the same results as OP observes (or that I have observed) on the TI-84. I don't have a TI-86 to test.
    $endgroup$
    – Michael E2
    Mar 15 at 14:29




    $begingroup$
    @CarlChristian I found this resource at TI.com (it downloads a PDF). It indicates that the TI-86 uses a 7-node rule, which would not give the same results as OP observes (or that I have observed) on the TI-84. I don't have a TI-86 to test.
    $endgroup$
    – Michael E2
    Mar 15 at 14:29












    $begingroup$
    Thank you! You have already given me more information than I could hope for.
    $endgroup$
    – Carl Christian
    Mar 15 at 15:16





    $begingroup$
    Thank you! You have already given me more information than I could hope for.
    $endgroup$
    – Carl Christian
    Mar 15 at 15:16












    0












    $begingroup$

    We know that
    $$lim_atoinftyleft(int^a_-ae^-x^2dxright)^2=lim_atoinftydfrac14pileft(operatornameerf(a)^2+operatornameerf(-a)^2-2operatornameerf(a)operatornameerf(-a)right)=\
    dfracpi4(1+1-(-2))=pi$$
    Hence, I am led to believe that this is a bug in the calculator itself, since the value should be getting closer to $pi$.






    share|cite|improve this answer









    $endgroup$

















      0












      $begingroup$

      We know that
      $$lim_atoinftyleft(int^a_-ae^-x^2dxright)^2=lim_atoinftydfrac14pileft(operatornameerf(a)^2+operatornameerf(-a)^2-2operatornameerf(a)operatornameerf(-a)right)=\
      dfracpi4(1+1-(-2))=pi$$
      Hence, I am led to believe that this is a bug in the calculator itself, since the value should be getting closer to $pi$.






      share|cite|improve this answer









      $endgroup$















        0












        0








        0





        $begingroup$

        We know that
        $$lim_atoinftyleft(int^a_-ae^-x^2dxright)^2=lim_atoinftydfrac14pileft(operatornameerf(a)^2+operatornameerf(-a)^2-2operatornameerf(a)operatornameerf(-a)right)=\
        dfracpi4(1+1-(-2))=pi$$
        Hence, I am led to believe that this is a bug in the calculator itself, since the value should be getting closer to $pi$.






        share|cite|improve this answer









        $endgroup$



        We know that
        $$lim_atoinftyleft(int^a_-ae^-x^2dxright)^2=lim_atoinftydfrac14pileft(operatornameerf(a)^2+operatornameerf(-a)^2-2operatornameerf(a)operatornameerf(-a)right)=\
        dfracpi4(1+1-(-2))=pi$$
        Hence, I am led to believe that this is a bug in the calculator itself, since the value should be getting closer to $pi$.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Apr 8 '14 at 23:12







        user122283


































            draft saved

            draft discarded
















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f745890%2fweird-computation-error-when-using-fnint-numerical-integral-on-ti-84-plus%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How should I support this large drywall patch? Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?How do I cover large gaps in drywall?How do I keep drywall around a patch from crumbling?Can I glue a second layer of drywall?How to patch long strip on drywall?Large drywall patch: how to avoid bulging seams?Drywall Mesh Patch vs. Bulge? To remove or not to remove?How to fix this drywall job?Prep drywall before backsplashWhat's the best way to fix this horrible drywall patch job?Drywall patching using 3M Patch Plus Primer

            random experiment with two different functions on unit interval Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)Random variable and probability space notionsRandom Walk with EdgesFinding functions where the increase over a random interval is Poisson distributedNumber of days until dayCan an observed event in fact be of zero probability?Unit random processmodels of coins and uniform distributionHow to get the number of successes given $n$ trials , probability $P$ and a random variable $X$Absorbing Markov chain in a computer. Is “almost every” turned into always convergence in computer executions?Stopped random walk is not uniformly integrable

            Lowndes Grove History Architecture References Navigation menu32°48′6″N 79°57′58″W / 32.80167°N 79.96611°W / 32.80167; -79.9661132°48′6″N 79°57′58″W / 32.80167°N 79.96611°W / 32.80167; -79.9661178002500"National Register Information System"Historic houses of South Carolina"Lowndes Grove""+32° 48' 6.00", −79° 57' 58.00""Lowndes Grove, Charleston County (260 St. Margaret St., Charleston)""Lowndes Grove"The Charleston ExpositionIt Happened in South Carolina"Lowndes Grove (House), Saint Margaret Street & Sixth Avenue, Charleston, Charleston County, SC(Photographs)"Plantations of the Carolina Low Countrye