Mathematica 6.0: Solving a Complex Math Issue

  • Context: Mathematica 
  • Thread starter Thread starter ehrenfest
  • Start date Start date
  • Tags Tags
    Complex Mathematica
Click For Summary

Discussion Overview

The discussion revolves around a potential issue with Mathematica 6.0 related to precision in calculations involving a small value for x. Participants explore whether the behavior observed is due to a bug or a misunderstanding of how Mathematica handles precision in numerical computations.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant suggests that the issue may be related to machine precision due to how the equation is entered.
  • Another participant questions whether the N[ ] function indeed causes the expression to be evaluated in arbitrary precision mode and seeks clarification on how to achieve that.
  • A participant proposes that the problem arises from assigning a machine precision value to x, which affects subsequent calculations, and suggests using a specific syntax to ensure arbitrary precision.
  • There is a repeated suggestion that using x=0.00004`100 could resolve the precision issue, indicating a possible solution.

Areas of Agreement / Disagreement

Participants express differing views on whether the observed behavior is a bug or a result of how precision is handled in Mathematica. There is no consensus on the nature of the issue, but multiple suggestions for addressing it are presented.

Contextual Notes

The discussion highlights limitations in understanding how Mathematica manages precision, particularly when transitioning between machine and arbitrary precision. Specific assumptions about input values and their impact on calculations are noted but remain unresolved.

ehrenfest
Messages
2,001
Reaction score
1
[SOLVED] mathematica issue

This is from Mathematica 6.0. Is this a bug in Mathematica? Supposedly the second output is precise to 100 digits!

In[46]:= x = 0.00004

Out[46]= 0.00004

In[45]:= N[(1 + x)^(1/3) - 1 - x/3 + (x^2)/9 - 5 (x^3)/81, 100]

Out[45]= 1.18826*10^-16

In[44]:= FullSimplify[(1 + y)^(1/3) - 1 - y/3 + y^2/9 < 5 y^3/81,
Assumptions -> y > 0]

Out[44]= True
 
Last edited:
Physics news on Phys.org
I think you are running into a machine precision issue with the way your equation is entered. Take a look in the help files in 3.1.6.

When you do calculations with arbitrary‐precision numbers, as discussed in the previous section, Mathematica always keeps track of the precision of your results, and gives only those digits which are known to be correct, given the precision of your input. When you do calculations with machine‐precision numbers, however, Mathematica always gives you a machine‐precision result, whether or not all the digits in the result can, in fact, be determined to be correct on the basis of your input.
 
Hmmm...I thought the N[ ] function caused the expression to be evaluated in arbitrary precision mode. How can I get that expression in arbitrary precision mode?
 
Hi ehrenfest,

I believe the problem occurs when you give the value to x; at that point machine precision is used for x which carries over to the rest of the calculation. If you want 100 digits in arbitrary precision, you could use:

x=0.00004`100

and then calculate

N[(1 + x)^(1/3) - 1 - x/3 + (x^2)/9 - 5 (x^3)/81, 100]
 
alphysicist said:
Hi ehrenfest,

I believe the problem occurs when you give the value to x; at that point machine precision is used for x which carries over to the rest of the calculation. If you want 100 digits in arbitrary precision, you could use:

x=0.00004`100

and then calculate

N[(1 + x)^(1/3) - 1 - x/3 + (x^2)/9 - 5 (x^3)/81, 100]

problem solved!
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K