login
A254037
Decimal expansion of the positive solution to the equation chi_2(r) = 0, where chi_2(r) is solution to the Lane-Emden pressure equation of index 2.
0
4, 3, 5, 2, 8, 7, 4, 5, 9, 5, 9, 4, 6, 1, 2, 4, 6, 7, 6, 9, 7, 3, 5, 7, 0
OFFSET
1,1
FORMULA
chi(0) = 0, chi'(0) = 1, r*chi''(r) = -chi(r)^2.
EXAMPLE
4.352874595946124676973570...
MATHEMATICA
digits = 25; d = 70; eps = 10^-digits; z[r_] = chi[r] /. NDSolve[chi[eps] == eps && chi'[eps] == 1 && r*chi''[r] == -chi[r]^2, chi[r], {r, eps, 5}, WorkingPrecision -> digits + d, MaxSteps -> 5*10^4] // First; r0 = r /. FindRoot[z[r] == 0, {r, 4}, WorkingPrecision -> digits + d]; RealDigits[r0][[1, 1 ;; digits]]
(* Second program using a rational function approximant *)
digits = 25; Clear[f]; f[kmax_?EvenQ] := f[kmax] = Module[{chi, a, r, r0, coes, sol, z}, chi[r_] = (r + Sum[a[k]*r^k, {k, 3, kmax-1, 2}])/(1 + Sum[a[k]*r^k, {k, 2, kmax, 2}]); coes = r*chi''[r] + chi[r]^2 // Together // Numerator //
CoefficientList[#, r]& // DeleteCases[#, 0]&; sol = Solve[Thread[coes == 0][[1 ;; kmax-1]], Table[a[k], {k, 2, kmax}]]; z[r_] = chi[r] /. sol // First; r0 = r /. FindRoot[z[r] == 0, {r, 4}, WorkingPrecision -> digits + 5]; RealDigits[r0][[1]][[1 ;; digits]]]; f[20]; f[kmax = 24]; While[f[kmax] != f[kmax-4], Print[kmax]; kmax = kmax+4]; f[kmax]
CROSSREFS
Sequence in context: A339579 A081665 A131911 * A321154 A011206 A326768
KEYWORD
nonn,cons
AUTHOR
STATUS
approved