Mathematica 6.0: Solving a Complex Math Issue

  • #1
2,020
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:
  • #2
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.
 
  • #3
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?
 
  • #4
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]
 
  • #5
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!
 

Suggested for: Mathematica 6.0: Solving a Complex Math Issue

Replies
1
Views
463
Replies
2
Views
845
Replies
1
Views
904
Replies
3
Views
1K
Replies
2
Views
942
Replies
6
Views
928
Replies
1
Views
692
Back
Top