Page 2 of 2 FirstFirst 12
Results 31 to 36 of 36

Thread: value of pi

  1. #31
    Quote Originally Posted by Copernicus View Post
    When using Wolframalpha, between -1 to 1, I get some values to be complex numbers and some numbers to be close to . I am wondering if Wolframalpha is spitting out some wrong answers, or if this is actually what is happening.

    For example the following yields

    n = .9991 ; integrate (x/n)\frac{(x/n)^2 - ((x-1)/n)^2}{(1-(x/n)^2)^{.5}} from x=-n to x=n

    3.14159 - 3.2300910^-16 i

    I think it might have something to do with significant digits.
    I think what is going on here is we are seeing some loss of accuracy, given that computers only represent numbers to a finite level of precision. The imaginary part has to be zero, since the integrand is real, and the variable of integration takes values on a real interval.

    Original problem (after rearranging the integrand a bit),

    .

    Split the integral into two,

    .

    Making the substitution ,

    .

    Evaluating the integrals,

    .

  2. #32
    Join Date
    Jan 2010
    Location
    Wisconsin USA
    Posts
    2,837
    Quote Originally Posted by 21st Century Schizoid Man View Post
    I think what is going on here is we are seeing some loss of accuracy, given that computers only represent numbers to a finite level of precision. The imaginary part has to be zero, since the integrand is real, and the variable of integration takes values on a real interval.

    Original problem (after rearranging the integrand a bit),

    .

    Split the integral into two,

    .

    Making the substitution ,

    .

    Evaluating the integrals,

    .
    Makes total sense! I wonder if the purchased version of wolframalpha would have done things correctly?
    The moment an instant lasted forever, we were destined for the leading edge of eternity.

  3. #33
    Join Date
    Oct 2009
    Posts
    1,744
    Quote Originally Posted by Copernicus View Post
    Makes total sense! I wonder if the purchased version of wolframalpha would have done things correctly?
    When you ask a computer to evaluate an expression numerically, it is all but inevitable that finite-precision issues will arise. Here, you are bothered by a residual imaginary part that is 16 or 17 orders of magnitude smaller than the real part. That's like complaining that you have been given the incorrect radius of the earth because it is about one nanometer off.

    This issue will not go away with the paid version. You can hide it in many cases by setting the various precision parameters that Wolfram supports, but numerical methods are...numerical. Computers have finite word lengths, so exactness is not to be expected in general. Special heuristics (at which Wolfram does well) can give the appearance of "doing things correctly", but cannot work 100% of the time.

  4. #34
    Join Date
    Feb 2010
    Posts
    744
    IIRC, there is software which can represent reals to an arbitrary number of digits (memory limited, of course); not sure if it is free, nor what OS, but very likely is as its origin is academia.

  5. #35
    Join Date
    Jan 2010
    Location
    Wisconsin USA
    Posts
    2,837
    Quote Originally Posted by Geo Kaplan View Post
    When you ask a computer to evaluate an expression numerically, it is all but inevitable that finite-precision issues will arise. Here, you are bothered by a residual imaginary part that is 16 or 17 orders of magnitude smaller than the real part. That's like complaining that you have been given the incorrect radius of the earth because it is about one nanometer off.

    This issue will not go away with the paid version. You can hide it in many cases by setting the various precision parameters that Wolfram supports, but numerical methods are...numerical. Computers have finite word lengths, so exactness is not to be expected in general. Special heuristics (at which Wolfram does well) can give the appearance of "doing things correctly", but cannot work 100% of the time.
    I just have a hard time picturing complex numbers and knowing if any part of it can be ignored.
    The moment an instant lasted forever, we were destined for the leading edge of eternity.

  6. #36
    Join Date
    Jan 2010
    Location
    Wisconsin USA
    Posts
    2,837
    Quote Originally Posted by Copernicus View Post
    Makes total sense! I wonder if the purchased version of wolframalpha would have done things correctly?
    Your equation looks a little like a stress energy tensor.
    The moment an instant lasted forever, we were destined for the leading edge of eternity.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •