Mathematica Mathematica 6.0: Solving a Complex Math Issue

AI Thread Summary
The discussion revolves around a precision issue in Mathematica 6.0 related to calculations involving a small value, x = 0.00004. The initial calculations return results that appear to be imprecise due to the use of machine precision for x, which affects subsequent computations. It is clarified that while the N[] function is intended for arbitrary precision, the input value x defaults to machine precision, leading to inaccuracies. To achieve 100-digit precision, users are advised to define x with arbitrary precision by using the notation x = 0.00004`100. This adjustment resolves the precision problem, allowing for accurate calculations in the desired format.
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
Views
2K
Replies
2
Views
2K
Replies
1
Views
2K
Replies
5
Views
3K
Replies
12
Views
2K
Replies
2
Views
5K
Replies
1
Views
1K
Replies
3
Views
3K
Back
Top