2
$\begingroup$

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

$\endgroup$
1

2 Answers 2

4
$\begingroup$
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 .

$\endgroup$
1
  • $\begingroup$ thank you so much sir. You have been very helpful. $\endgroup$ Jan 9, 2016 at 18:56
3
$\begingroup$
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

$\endgroup$
1
  • $\begingroup$ apparently, the question was first posted with dr=10^-4. Now it is 10^-8 $\endgroup$
    – andre314
    Jan 9, 2016 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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