1
$\begingroup$

I have two equations with x=r+Log[-1+r] and v=(1-1/r)/r^3 forms. When I substitute r=1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, Mathematica shows x=Indeterminate and v=0. But I know that the results are x=-201.6274881834760201935832480122240502688969309993320218909328552851463896516070182607677539478846503 and v=0.9999999999999999999999999999999999999999999999999999999999999999999999999999999999999997000000000000*10^(-88). How to make Mathematica show these small and large results? I will be really thankful if someone help.

$\endgroup$
  • $\begingroup$ How did you get -201 for x ? Could you please double-check ? $\endgroup$ – Lotus Jul 5 '18 at 10:17
  • $\begingroup$ @Lotus I have obtained these results from Maple. I am sure about them. $\endgroup$ – Mehrab Jul 5 '18 at 10:28
  • 1
    $\begingroup$ See SetPrecision and here, i.e. r=SetPrecision[1.0000…01,100]. alternatively, you can also specify the precision using r=1.000…01`100 $\endgroup$ – Lukas Lang Jul 5 '18 at 10:50
  • $\begingroup$ You can also manually append more zeros to r, as in r=1.000…00100… - the more you add, the more digits the result will have. Essentially, Maple is assuming the number you gave it has infinite precision, while Mathematica accurately tracks the precision throughout the calculation. $\endgroup$ – Lukas Lang Jul 5 '18 at 10:55
  • $\begingroup$ @LukasLang Thanks for the reply, but this does not work. In Maple also it is required to specify the precision. I used "evalf(eq,100)" in Maple. But I do not know how I can solve this problem in Mathematica. $\endgroup$ – Mehrab Jul 5 '18 at 11:02
3
$\begingroup$

As Lucas Lang said in his first answer, Mathematica gives the same as Maple:

r = SetPrecision[1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, 100]    
x = r + Log[-1 + r] 
v = (1 - 1/r)/r^3

-201.62748818348

1.00000000000*10^-88

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.