Mathematica issue

• Mathematica

Main Question or Discussion Point

[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:

Related MATLAB, Maple, Mathematica, LaTeX News on Phys.org
FredGarvin
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?

alphysicist
Homework Helper
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.00004100

and then calculate

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

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.00004100

and then calculate

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