2

I want to see first 15 digits for the values in the table computed below.

n = 0; a = 1; L = 3; m = 1/2; b = 1; g = (2 m a r)/(n + L + 1);

Fi[r_] = (r)^(L + 1)Exp[-((  m a)/(n + L + 1)) r] LaguerreL[n, 2 L + 1, g];

f[r_] = AiryAi[(2 m b)^(1/3) (r)];

ψ[r_] = Fi[r] f[r];

Plot[{r^(L + 1) f[r], Fi[r] f[r]}, {r, 0, 5}]

plot

dr = 0.00000001;

ε1 = (a/(L + 1) - (L + 1)/(m r)) f'[r]/f[r] + (-m a^2)/(2 (n + L + 1)^2);
ε2 = -ψ''[r]/((2 m) ψ[r]) + (-(a/r) + b r + (L (L + 1))/(2 m r^2));

data = Table[{r, r^(L + 1) f[r], ψ[r], ε1, ε2}, {r, 2.647, 2.648, dr}];

TableForm[data, 
  TableHeadings -> {None, {"r", "r^(L+1) f[r]", "Fi[r] f[r]", "ε1", "ε2"}}]

table

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
  • Possible duplicate: https://mathematica.stackexchange.com/questions/3736/annoying-display-truncation-of-numerical-results – Michael E2 Aug 04 '18 at 13:44

2 Answers2

4
TableForm[Take[data, 5], 
  TableHeadings -> {None, {"r", "r^(L+1) f[r]", "Fi[r] f[r]", 
     "\[CurlyEpsilon]1", "\[CurlyEpsilon]2"}}] //
 Style[#, PrintPrecision -> 15] &

enter image description here

EDIT

PrintPrecision -> 15 can be set at the Notebook level.
See this link .

andre314
  • 18,474
  • 1
  • 36
  • 69
3
NumberForm[TableForm[data,
  TableHeadings -> {None, {"r", "r^(L+1) f[r]", "Fi[r] f[r]", 
     "\[CurlyEpsilon]1", "\[CurlyEpsilon]2"}}],
 {15, 15}]

enter image description here

Update

With dr = 0.00000001 the first 10 items would be

enter image description here

eldo
  • 67,911
  • 5
  • 60
  • 168