SciELO - Scientific Electronic Library Online

 
vol.60 número1Radio Proper Motions of the Nearby Ultra-Cool Dwarf Binary VHS 1256-1257AB índice de autoresíndice de materiabúsqueda de artículos
Home Pagelista alfabética de revistas  

Servicios Personalizados

Revista

Articulo

Indicadores

Links relacionados

  • No hay artículos similaresSimilares en SciELO

Compartir


Revista mexicana de astronomía y astrofísica

versión On-line ISSN 3061-8649versión impresa ISSN 0185-1101

Rev. mex. astron. astrofis vol.60 no.1 Ciudad de México abr. 2024  Epub 18-Nov-2025

https://doi.org/10.22201/ia.01851101p.2024.60.01.01 

Articles

Computing Polytropic and Isothermal Models Using Monte Carlo Method

Mohamed I. Nouh1 

Essam A. Elkholy2  1 

Samah H. El-Essawy1 

1 Astronomy Department, National Research Institute of Astronomy and Geophysics(NRIAG), 11421 Helwan, Cairo, Egypt.

2 Department of Physics, College of Science, Northern Border University, Arar, Saudi Arabia.


ABSTRACT

Polytropic and isothermal gas spheres are crucial in the theory of stellar structure and evolution, galaxy cluster modeling, thermodynamics, and various other physics, chemistry, and engineering disciplines. Based on two Monte Carlo algorithms (MC1 and MC2), we introduced a numerical approach for solving the Lane-Emden (LE) equations of the polytropic and isothermal gas spheres. We found that the MC1 and MC2 models agree with each other and also with numerical and analytical models. We tested the compatibility between the MC and the numerical polytropic models by calculating the mass-radius relation and the pressure profile for the polytrope with n = 3.

Key Words: equation of state; methods: numerical; methods: statistical; stars: interiors

RESUMEN

Las esferas politrópicas e isotérmicas son importantes para la teoría de la estructura y evolución estelares, para modelar cúmulos de galaxias, en la termodinámica y en diversas disciplinas físicas, químicas e ingenieriles. Con base en dos algoritmos Monte Carlo (MC1 and MC2) presentamos un enfoque numérico para resolver las ecuaciones de Lane-Emden para la esfera politrópica e isotérmica. Encontramos que los modelos MC1 and MC2 concuerdan entre sí y también con los modelos numéricos y analíticos. Comprobamos la compatibilidad de MC con los modelos politrópicos numéricos calculando la relación masa-radio y el perfil de presión para el politropo con n = 3.

1 Introduction

The Lane-Emden equation (LE) is an initial value nonlinear ordinary differential equation describing the equilibrium density distribution of the self-gravitating sphere. LE is often employed to model many problems in physics and astrophysics, like the thermal background of a spherical cloud of gas, stellar structure, and particle currents (Chandrasekhar 1967, Horedt 2004). Polytropic and isothermal gas spheres have been the subject of many studies given their importance as fundamental models for stellar structure, (Chandrasekhar 1967, Shore 2007, Kippenhahn et al. 2012, Maciel 2016). The Lane-Emden equation for a polytropic gas sphere can be written as (Chandrasekhar 1967)

1x2ddxx2dθxdx=-θnx, (1)

where θ is called the Emden function and n is the polytropic index. The solution of equation (1) holds under the initial conditions

θ'0=0,      θ0=1. (2)

For equation (1), there are exact solutions only for the polytropic indexes n = 0, 1, and 5.

θ0x=1-x2/6,  θ1x=sinx/x,  θ5x=1/1+x2/312.                           (3)

The LE equation for the isothermal gas sphere is given by (Chandrasekhar 1967)

1x2ddxx2dθxdx=e-θx, (4)

subject to the conditions

θ'0=0,      θ0=0. (5)

The main application of isothermal gas spheres is in the context of molecular clouds, stellar cluster dynamics, and nonlinear analysis in applied mathematics (Chandrasekhar 1942, Kurth 1957, Davis 1962, Ito et al. 2018). In addition to numerical approaches (i.e., neural networks, Ahmad et al. 2017, Nouh et al. 2021), genetic algorithms (Ahmad et al. 2016), and the pattern search optimization technique (Lewis et al. 2000), various analytical methods exist to solve Lane-Emden-type equations (i.e., Chowdhury 2009, Ibrahim and Darus 2008, Podlubny 1999, Momani and Ibrahim 2008, Nouh 2004, Nouh and Saad 2013).

Monte Carlo (MC) calculations first appeared in astronomy in the late 1960s (Auer 1968, Avery and House 1968, and Magnan 1968, 1970). The Markov Chains method (MCMC) is one of the most powerful Monte Carlo algorithms. The MCMC is used extensively for astrometric orbits (Tuomi & Kotiranta 2009, Otor et al. 2016), visual binary orbits (Mendez et al. 2017), and other problems (see, for instance, Hestroffer 2012, Mede & Brandt 2014).

Compared to traditional approaches to solving differential equations, the MC method has been adopted as an independent method as science, technology, and computers have improved over the last century. MC approaches were implemented to solve the initial value problems of ordinary differential equations by Zhong and Tian (2011) and Akhtar et al. (2015). Akhtar et al. (2015) effectively refined the complexities of Zhong and Tian’s algorithm. Uslu and Sari (2020) presented a Monte Carlo-based stochastic technique to solve various Lotka-Volterra equation systems. El-Essawy et al. (2023) introduced a novel numerical solution to LE equations (i.e., positive and negative index polytropes, isothermal gas spheres, and the white dwarf equation) using the MC technique.

In the present paper, we solve the LE equations of the polytropic and isothermal gas spheres using two different MC algorithms (MC1 and MC2). The results from the two MC algorithms are compared to exact and numerical solutions. As an application, we compute the physical parameters of the polytropic and isothermal gas spheres. The structure of the paper is as follows: we introduce the two MC algorithms in § 2, §3 deals with the results, and § 4 summarises the results.

2 The MC Algorithms

In the following subsections, we shall describe the two algorithms implemented to calculate the Emden function (θ) of the polytropes and its derivative (θ'). The first algorithm (MC1) is proposed by El-Essawy et al. (2023), and the second one is based on the algorithm proposed by Akhtar et al. (2015).

2.1 Algorithm 1 (MC 1 )

The LE polytropic equation could be written as

θ''x+2xθ'x+fx,θ=0. (6)

Now, the solutions of θ't and θt hold under the following steps:

  • 1. Assume θt=θ1t and θ't=θ2t, then, equation (6) can be reduced to a first-order differential equation as

θ'1x=θ2x,           θ'2(x)=-2xθ2(x)-f(x,θ1)=g(x,θ1,θ2). (7)

  • 2. Divide the interval 0,xfinal into small, discrete chunks with interval size dx=10-3, where xfinal is the final limit of the integration.

  • 3. Create a group that has 106 random variables from a uniform distribution xi,xi+1.

  • 4. Initialize the iteration with values xx0,  θ1θ0 and θ2θ'0.

  • 5. Compute θ2xi+1=θ2xi+xi+1-xiMk=1Mgθ2xi,  θ1xi,xk.

  • 6. The solution of θ1x yields θ1xi+1=θ1xi+θ2xi+1dx.

  • 7. Then set xi=xi+dx.

  • 8. End the iteration process, when xi=xfinal.

2.2 Algorithm 2 (MC 2 )

In the second algorithm, θ'(x) and θ(x) can be integrated according to the strategy below:

  • 1. Firstly, we have to get a solution of θ'(x) using the following steps:

    • 1.1. Write the LE equation as θ''(x)=h(x,θ,θ').

    • 1.2. Determine the positive upper and negative lower boundaries (M1 and R1) for hx,θ,θ' to classify the generated random variables.

    • 1.3. Split the specified interval 0,xfinal, xfinal being the final limit of integration, into m points with a step size dx=0.001.

    • 1.4. Simulate two groups 0,M1andR1,0 of random variables from the uniform distribution, each containing N=106.

    • 1.5. Let us consider JF1=h(xi,θi,θ'i) for i=0,1,...,m.

    • 1.6. Start with initial conditions xx0,  θθ0 and θ'θ'0.

    • 1.7. If JF10, evaluate:

      • * S1 count the numbers of random variables from 0,M1 which are smaller than or equal to JF1.

      • * Compute θ'i+1x=θ'ix+M1×S1Ndx.

      • Else, if JF0:

      • * S1 count the numbers of random variables from R1,0 which are larger than or equal to JF1.

      • * Compute θ'i+1t=θ'ix+R1×S1Ndx.

  • 2. Secondly, the solution of θx could be obtained using the following steps:

    • 2.1. Classify M 2 and R 2 as positive upper and negative lower boundaries of the solution θ'x.

    • 2.2. Generate two groups of random variables as R2,0 and 0,M2.

    • 2.3. Define JF2=θ'i+1x.

    • 2.4. If JF20, evaluate:

      • * S2 count the numbers of random variables from 0,M2 which are smaller than or equal to JF2

      • * Compute θi+1x=θix+M2×S2Ndx.

      • Else, if JF20:

      • * S2 count the numbers of random variables from R2,0 which are larger than or equal to JF2.

      • * Compute θi+1x=θix+R2×S2Ndx.

  • 3. Go to the second iteration with xi+1=xi+Δx.

  • 4. Repeat the previous steps, until xi+1=xfinal.

3 Results

To solve the LE differential equations of the polytropic and isothermal gas spheres, we coded MC 1 and MC 2 using R language. A total of 1000000 random samples were used. For the numerical solution, we used the R package function rkMethod that implements the Runge-Kutta method (RK). We used an oddly spaced spacing with 0.001 increments. We solved the LE equation (equation 1) for the polytropic indexes n = 0, 1, 1.5, 3, and 5, and the LE equation of the isothermal gas sphere (equation 4); the results are listed in Tables A1-A6 and plotted in Figure 1. The designations of the columns of Tables A1-A6 are as follows: Column 1 is the dimensionless parameter x, Column 2 is the Emden function calculated by the exact solutions (using equation (3) for n = 0,1 , and 5) or from the numerical integration for n = 1.5, 3, and the isothermal gas sphere; Column 3 is the MC solution using algorithm 1 (MC 1); Column 4 is the MC solution using algorithm 2 (MC 2); Column 5 is the absolute error such that E1=(exact/numerical-MC1); Column 6 represents the absolute error such that E2=(exact/numerical-MC2). The maximum absolute errors between the two MC algorithms and the exact/numerical solutions are listed in Table 1. As shown in Figure 1 and Table 1, the Emden functions (θ) calculated using the second MC algorithm (MC 2) have a smaller error than the first MC algorithm (MC 1) except in the two situations of the polytrope with n = 5 and the isothermal gas sphere.

Fig. 1 The distribution of the Emden function for the polytropes with n = 0, 1, 1.5, 3, 5, and the isothermal gas sphere. The color figure can be viewed online. 

Table 1: The maximum absolute error for the Emden function 

n Max E1 Max E2
0 0.0008154 0.0001992
1 0.0004015 0.0001978
1.5 0.0003410 0.0001961
3 0.0002516 0.0002220
5 0.0001984 0.0009020
iso 0.0004567 0.0070129

Similar to the scheme we applied in a previous paper (MC1, El-Essawy et al., 2023), we determined the absolute errors between the MC2 solution and several numerical techniques to assess the effect of the MC calculations on the accuracy of the computed Emden function (θ). For the polytropes with n = 1, we used the active-set algorithm-based neural networks (AST-NN, Ahmad et al. 2017), Chebyshev neural networks (Ch-NN, Mall and Chakraverty 2014), the Pattern Search Optimization Technique (PS, Lewis et al. 2000), and genetic algorithms (GA, Ahmad et al. 2016).

For n = 3, we compared our results with the Homotopy Analysis Method (HAM), Padé approximants (PA) of an order [4; 4], and the numerical solution with the Simpson rule (SIMP); Al-Hayani et al. (2017). Tables 2 and 3 compare θ computed by the MC2 and by different numerical methods. Figures 2 and 3 plot the absolute errors between the MC2 values and the above mentioned numerical methods. For the polytrope with n = 1, the maximum absolute error between the exact solution and MC2 is the smallest, while for the polytrope with n = 3, the maximum absolute error between the Simpson rule and MC2 is the smallest.

Table 2: Comparison of θ computed by different numerical methods and the MC2 algorithm for n = 1 

x The Emden function (θ)
Exact MC2 AST-NN Ch-NN PS GA
0 1 1 1.000000 1 0.99998 0.99999
0.1 0.998334 0.998319 0.998337 1.00180 0.99805 0.99828
0.2 0.993346 0.993315 0.993364 0.99050 0.99278 0.99346
0.3 0.985067 0.985030 0.985138 0.98390 0.98470 0.98542
0.4 0.973545 0.973492 0.973757 0.97340 0.97343 0.97418
0.5 0.958851 0.958788 0.959355 0.95980 0.95891 0.95983
0.6 0.941070 0.940996 0.942096 0.94170 0.94169 0.94255
0.7 0.920310 0.920217 0.922172 0.92100 0.92187 0.92256
0.8 0.896695 0.896574 0.899800 0.89250 0.89943 0.90019
0.9 0.870363 0.870221 0.875212 0.87000 0.87489 0.87544
0.0 0.841470 0.841319 0.848656 0.84300 0.84832 0.84868

Table 3: Comparison of θ computed by different numerical methods and the MC2 algorithm n = 3 

x The Emden function (θ)
MC2 HAM PA SIMP
0 1 1 1 1
0.1 0.998317 0.998335 0.998335 0.998335
0.2 0.993324 0.993373 0.993373 0.993373
0.3 0.985109 0.985199 0.985199 0.985199
0.4 0.973842 0.973958 0.973958 0.973958
0.5 0.959710 0.959839 0.959839 0.959839
0.6 0.942935 0.943073 0.943073 0.943073
0.7 0.923775 0.923925 0.923922 0.923924
0.8 0.902508 0.902680 0.902672 0.902679
0.9 0.879436 0.879643 0.879617 0.879641
0.0 0.854852 0.855132 0.855057 0.855125

Fig. 2 Comparative study based on values of absolute errors for the polytrope with n = 1. The color figure can be viewed online. 

Fig. 3: Comparative study based on values of absolute errors for the polytrope with n = 3. The color figure can be viewed online. 

Polytropic stellar models may be constructed using the polytropic index n = 0-1 for neutron stars, n = 1.5 for white dwarfs, and n = 3 for solar-type stars. The mass contained in a radius R0 is given by

M0=4 πK(n+1)4πG32  ρc3-n2n-x2  θ' x=x1. (8)

The radius of the polytrope is given by

R0=K(n+1)4πG12  ρc1-n2n x1. (9)

The pressure is provided by

P=Pc  θn+1. (10)

The central density is computed from the equation

ρc=  -x12M04 π R03θ'x=x1, (11)

and finally, the ratio of central density to mean density is

ρcρm=x133-x2θ'x=x1. (12)

Table 4 compares the density ratio ρc/ρm (equation 12) computed from the three methods (ex/num,MC1,MC2). The table shows that the ratio calculated from the two MC algorithms agrees with the exact/numerical values.

Table 4: The mean density for the polytropic gas spheres  

n ρc/ ρm
ex/num MC1 MC2
0 1.0 0.999 0.999
1 2.895 2.896 2.894
1.5 5.735 5.738 5.733
3 54.138 54.165 54.140

We construct mass-radius relation and pressure profiles for the model with a polytropic index n = 3; the zero of the Emden function (x1) and the first derivative of the Emden function (θ'). The results are listed in Tables 5 and 6 for the mass-radius relation and the pressure profile, respectively. Based on the two tables with absolute errors in Columns 5 and 6, one can demonstrate an excellent agreement between the numerical and MC calculations.

Table 5: The mass-radius relation for the polytrope with n = 3 calculated by RK, MC1, and MC2 methods 

R/R0 (M/M0)num (M/M0)MC1 (M/M0)MC2 E1 E2
0 0 0 0 0 0
0.0581581 0.003345 0.003343 0.003344 1.61E-06 1.23E-07
0.1741842 0.030005 0.029991 0.030004 1.45E-05 1.10E-06
0.2902103 0.083293 0.083253 0.083290 4.02E-05 3.06E-06
0.4062364 0.163208 0.163129 0.163202 7.89E-05 6.01E-06
0.5222625 0.269750 0.269620 0.269741 0.000130 9.93E-06
0.6382886 0.402920 0.402725 0.402905 0.000194 1.48E-05
0.7543147 0.562717 0.562445 0.562696 0.000272 2.07E-05
0.8703408 0.749141 0.748779 0.749114 0.000362 2.75E-05
0.9863669 0.962193 0.961727 0.962157 0.000465 3.54E-05
1 0.988975 0.988496 0.988938 0.000478 3.64E-05

Table 6: The pressure profile for the polytrope with n = 3 calculated by RK, MC1, and MC2 methods  

R/R0 (P/Pc)ex (P/Pc)MC1 (P/Pc)MC2 E1 E2
1 1 1 0 0
0.0581581 0.8993613 0.8988963 0.8989328 0.0005170 0.0004763
0.1741842 0.4143745 0.4138576 0.4139165 0.0012472 0.0011053
0.2902103 0.1151991 0.1150371 0.1150835 0.0014060 0.0010027
0.4062364 0.0249381 0.0249105 0.0249141 0.0011037 0.0009609
0.5222625 0.0046797 0.0046777 0.0046843 0.0004266 0.0009684
00.6382886 0.0007399 0.0007405 0.0007425 0.0007568 0.0035407
0.7543147 0.0000825 0.0000827 0.0000827 0.0030840 0.0029091
0.8703408 0.0000036 0.0000036 0.0000036 0.0096212 0.0001153
0.9863669 2.900E-010 3.3E-010 2.8E-010 0.1379310 0.0344827
1 0 0 0 0 0

4 Conclusion

This paper employed two Monte Carlo (MC) approaches to solve Lane-Emden equations of the polytropic and isothermal gas spheres. We wrote R codes to implement the two MC algorithms, where 106 random samples were used in each integration procedure. The numerical solution of the differential equations is performed using the R package function rkMethod, which is based on the Runge-Kutta technique (RK) for solving ordinary differential equations. An oddly spaced interval with 0.001 increments was chosen.

The MC results were compared to the exact and numerical solutions to determine the accuracy and efficiency of the proposed approach. When the MC and numerical/analytical models are compared, they agree well for the polytropic indexes n = 0, 1, 1.5, 3, while there are significant discrepancies from the models with n = 5 and the isothermal gas sphere.

For the polytropic indexes n = 1 and 3, we compared MC solutions and other numerical approaches like active-set algorithm-based neural networks, Chebyshev neural networks, the Pattern Search Optimization Technique, and genetic algorithms. We may infer that the MC algorithms have the advantage of needing no data training like neural network methods. Based on absolute error, the MC solutions are consistent with solutions from different numerical methods. Moreover, we found that the second algorithm (MC2) is faster than the first one (MC1) and more accurate. We computed the mass-radius relation and the pressure profile for the polytrope with n = 3, and we found good agreement between the MC models and the numerical one.

Acknowledgements

The authors extend their appreciation to the Deanship of Scientific Research at Northern Border University, Arar, KSA for funding this research work through the project number NBU-FFR-2024-194-01.

References

Ahmad, I., Raja, M., Bilal, M., & Ashraf, F. 2016, SpringerPlus, 5, 1866, https://doi.org/10.1186/s40064-016-3517-2 [ Links ]

Ahmad, I., Raja, M. A., Bilal, M., & Ashraf, F. 2017, Neural Comput & Applic, 28 (Suppl. 1): S929-S944 [ Links ]

Akhtar, M. N., Durad, M. H., & Ahmed, A. 2015, Proc. IAM, 4, 149 [ Links ]

Al-Hayani, W., Alzubaidy, L., & Entesar, A. 2017, Amat, 11, 407, https://doi.org/10.18576/amis/110208 [ Links ]

Auer, L. H. 1968, ApJ, 153, 783, https://doi.org/10.1086/149705 [ Links ]

Avery, L. W, House, L. L. 1968, ApJ, 152, 493, https://doi.org/10.1086/149566 [ Links ]

Chandrasekhar, S. 1942, Principles of stellar dynamics (Chicago, IL: UCP) [ Links ]

______, 1967, An introduction to the study of stellar structure (New York, NY: Dover) [ Links ]

Chowdhury, M. & Hashim, I. 2009, Nonlinear Analysis Real World Applications, 10, 104, https://doi.org/10.1016/j.nonrwa.2007.08.017 [ Links ]

Davis, H. T. 1962, Introduction to Nonlinear Differential and Integral Equations (New York, NY: Dover ) [ Links ]

El-Essawy, S. H., Nouh, M. I., Soliman, A. A., Abdel Rahman, H. I., & Abd-Elmougod, G. A. 2023, A&C, 42, 100665, https://doi.org/10.1016/j.ascom.2022.100665 [ Links ]

Hestroffer, D. 2012, In Proceedings of the workshop “Orbital Couples: Pas de deus in the Solay Systems and the Milky Way”, ed. F. Arenou & D. Hestroffer, 113 [ Links ]

Horedt, G. P. 2004, Polytropes-Applications in Astrophysics and Related Fields, Volume 306 (Dordrecht: Kluwer Academic Publishers), https://doi.org/10.1007/978-1-4020-2351-4 [ Links ]

Ibrahim, R. W. & Darus, M. 2008, JMAA, 345, 871, https://doi.org/10.1016/j.jmaa.2008.05.017 [ Links ]

Ito, Y., Poje, A., & Lancellotti, C. 2018, NewA, 58, 15, https://doi.org/10.1016/j.newast.2017.07.003 [ Links ]

Kippenhahn, R., Weigert, A., & Weiss, A. 2013, Stellar Structure and Evolution, (Berlin: Springer), https://doi.org/10.1007/978-3-642-30304-3 [ Links ]

Kurth, R. 1957, Introduction to the mechanics of stellar systems (London: Pergamon Press) [ Links ]

Lewis, R. M. & Torczon, V. 2000, SIAM Journal on Optimization, 10, 917, https://doi.org/10.1137/S1052623497331373 [ Links ]

Maciel, J. W. 2016, Introduction to Stellar Structure (Switzerland: Springer Nature Switzerland), https://doi.org/10.1007/978-3-319-16142-6 [ Links ]

Magnan, C. 1968, ApL, 2, 213 [ Links ]

______, 1970, JQSRT, 10, 1, https://doi.org/10.1016/0022-4073(70)90124-X [ Links ]

Mall, S. & Chakraverty, S. 2014, Applied Mathematics and Computation, 247, 100, https://doi.org/10.1016/j.amc.2014.08.085 [ Links ]

Mede, K. & Brandt, T. D. 2014, IAUS 299, Exploring the Formation and Evolution of Planetary Systems, 52, https://doi.org/10.1017/S1743921313007837 [ Links ]

Mendez, R. A., Claveria, R. M., Orchard, M. E., & Silva, J. F., 2017, AJ, 154, 187, https://doi.org/10.3847/1538-3881/aa8d6f [ Links ]

Momani, S. & Ibrahim, R. W. 2008, JMAA , 339, 1210, https://doi.org/10.1016/j.jmaa.2007.08.001 [ Links ]

Nouh, M. I. 2004, NewA, 9, 467, https://doi.org/10.1016/j.newast.2004.02.003 [ Links ]

Nouh, M. I. & Saad, A. S. 2013, International Review of Physics, 7, 1, https://doi.org/10.48550/arXiv.1406.1455 [ Links ]

Nouh, M., Azzam, Y. A., & Abdel-Salam, E. A. 2021, Neural Computing and Applications, 33, 4533, https://doi.org/10.1007/s00521-020-05277-9 [ Links ]

Otor, O. J., Montet, B. T., Johnson, J. A. et al. 2016, AJ, 152, 165, https://doi.org/10.3847/0004-6256/152/6/165 [ Links ]

Podlubny, I. 1998, Fractional Differential Equations (SanDiego, CA: Academic Press) [ Links ]

Tuomi, M. & Kotiranta, S. 2009, A&A, 496, 13, https://doi.org/10.1051/0004-6361/200811531 [ Links ]

Uslu, H., Sari, M., & Cosgun, T. 2020, IJOCTA, 10, 181, https://doi.org/10.11121/ijocta.01.2020.00829 [ Links ]

APPENDIX

A. Numerical Results

We list in the following tables the numerical results obtained for the polytropes with n = 0, 1, 1.5, 3, and 5, and the isothermal gas sphere. The designation of the columns is as follows:

Column 1: The dimensionless distance (x).

Column 2: The Emden function calculated by the exact solution (θEx), or RK solution θRK.

Column 3: The Emden function calculated by the first MC algorithm solution (θMC1).

Column 4: The Emden function calculated by the second MC algorithm solution (θMC2).

Column 5: The absolute error computed for the first MC algorithm and exact/RK solutions (E 1).

Column 6: The absolute error computed for the second MC algorithm and exact/RK solutions (E 2).

Table A1: Emden function for the polytrope with n = 0 calculated by exact, MC1, and MC2 methods 

x θex θMC1 θMC2 E1 E2
0 1 1 1 0 0
0.1 0.9982998 0.9982666 0.9982852 0.0000332 0.0000146
0.3 0.9848998 0.9848000 0.9848676 0.0000998 0.0000322
0.5 0.9581665 0.9580000 0.9581617 0.0001665 0.0000048
0.7 0.9180998 0.9178667 0.9181047 0.0002331 0.0000048
0.9 0.8646998 0.8644000 0.8646706 0.0002998 0.0000291
1.1 0.7979665 0.7976000 0.7979056 0.0003664 0.0000609
1.3 0.7178999 0.7174667 0.717881 0.0004331 0.0000188
1.5 0.6244999 0.6240001 0.6245375 0.0004997 0.0000377
1.7 0.5177665 0.5172001 0.517882 0.0005664 0.0001154
1.9 0.3976998 0.3970667 0.397868 0.0006330 0.0001681
2.1 0.2642998 0.2636001 0.2644961 0.0006997 0.0001963
2.3 0.1175665 0.1168001 0.1177642 0.0007664 0.0001976
2.44 0.0077333 0.0069205 0.0079122 0.0008127 0.0001789

Table A2: Emden function for the polytrope with n =1 calculated by exact, MC1, and MC2 methods 

x θex θMC1 θMC2 E1 E2
0 1 1 1 0 0
0.2 0.9932801 0.9932138 0.9932491 0.0000662 0.0000309
0.4 0.9734145 0.9732838 0.9733613 0.0001306 0.0000532
0.6 0.9408777 0.9406862 0.9408034 0.0001915 0.0000743
0.8 0.896445 0.896198 0.8963242 0.0002470 0.0001207
1.0 0.8411697 0.840874 0.8410183 0.0002956 0.0001514
1.2 0.7763538 0.7760176 0.7761794 0.0003362 0.0001744
1.4 0.7035112 0.7031437 0.7033138 0.0003675 0.0001974
1.6 0.6243247 0.6239358 0.6241356 0.0003889 0.0001891
1.8 0.5405996 0.5401996 0.5404353 0.0004000 0.0001643
2.0 0.4542133 0.4538128 0.4540692 0.0004005 0.0001441
2.2 0.3670638 0.3666731 0.3669389 0.0003907 0.0001249
2.4 0.2810185 0.2806475 0.2809185 0.0003710 0.0001000
2.6 0.197864 0.1975216 0.1977996 0.0003423 0.0000644
2.8 0.1192595 0.1189537 0.1192175 0.0003057 0.0000419
3.0 0.0466944 0.0464320 0.0466540 0.0002623 0.0000403
3.14 0.0005072 0.00046958 0.00000003 0.0002290 0.0000376

Table A3: Emden function for the polytrope with n =1.5 calculated by RK, MC1, and MC2 methods 

x θRK θMC1 θMC2 E1 E2
0 1 1 1 0 0
0.2 0.9932868 0.9932207 0.9932323 0.0000660 0.0000545
0.4 0.9735202 0.9733907 0.9734014 0.0001294 0.0001187
0.6 0.9413984 0.9412109 0.9412647 0.0001875 0.0001336
0.8 0.898034 0.8977959 0.8978935 0.0002381 0.0001404
1.0 0.8448824 0.8446029 0.8447165 0.0002795 0.000165
1.2 0.7836536 0.7833431 0.7834578 0.0003105 0.0001958
1.4 0.7162136 0.7158829 0.7160285 0.0003307 0.0001851
1.6 0.6444837 0.6441436 0.6443238 0.0003401 0.0001599
1.8 0.5703465 0.5700071 0.5702177 0.0003393 0.0001287
2.0 0.4955639 0.4952345 0.4954593 0.0003294 0.0001045
2.2 0.4217124 0.4214007 0.4216416 0.0003116 0.0000708
2.4 0.3501363 0.3498488 0.3500921 0.0002875 0.0000441
2.6 0.2819211 0.2816624 0.2818889 0.0002587 0.0000322
2.8 0.2178831 0.2176564 0.2178339 0.0002266 0.0000491
3.0 0.1585734 0.1583805 0.1584807 0.0001929 0.0000927
33.2 0.1042928 0.1041342 0.1041704 0.0001586 0.0001223
.4 0.0551108 0.0549859 0.0549570 0.0001249 0.0001538
3.6 0.0108816 0.0107889 0.0107135 0.0000927 0.0001681
3.65 0.0003567 0.00027 0.0001852 0.00008486 0.0001714

Table A4: Emden function for the polytrope with n=3 calculated by RK, MC1, and MC2 methods 

x θRK θMC1 θMC2 E1 E2
0 1 1 1 0 0
0.4 0.9738309 0.973705 0.9737149 0.000125 0.000163
0.8 0.90245 0.9022354 0.9022865 0.000214 0.000221
1.2 0.8023212 0.8020709 0.8020994 0.000250 0.000196
1.6 0.6912652 0.6910239 0.6910683 0.00024 0.0001461
2.0 0.582589 0.5823841 0.5824429 0.000204 0.0001377
2.4 0.4836957 0.4835379 0.4835579 0.000157 0.0000954
2.8 0.397389 0.3972793 0.3972935 0.000109 0.0000190
3.2 0.3237452 0.3236793 0.3237261 0.000065 0.0000632
3.6 0.2615509 0.261523 0.2616142 0.000027 0.0001253
4.0 0.2091615 0.2091657 0.2092868 0.000004 0.0001458
4.4 0.1649313 0.1649625 0.1650771 0.000031 0.0001152
4.8 0.1273938 0.1274478 0.1275091 0.000054 0.0000692
5.2 0.0953137 0.0953871 0.0953829 0.000073 0.0000183
5.6 0.0676807 0.0677708 0.0676991 0.000090 0.0000012
6.0 0.0436819 0.0437866 0.043680 0.000104 0.0000254
6.4 0.0226683 0.0227859 0.022642 0.000117 0.0000480
6.8 0.0041241 0.00425330 0.0040761 0.000129 0.0001159
6.89 0.0000784 0.0002101 0.0000214 0.000131 0.0000569

Table A5: Emden function for the polytrope with n=5 calculated by exact, MC1, and MC2 methods 

x θex θMC1 θMC2 E1 E2
0 1 1 1 0 0
0.4 0.9742312 0.9741098 0.9742616 0.0001214 0.00009308
0.8 0.9076417 0.9074531 0.9076896 0.0001885 0.00015167
1.2 0.8217728 0.8215775 0.82183608 0.0001951 0.00015884
1.6 0.7343418 0.7341757 0.73442448 0.0001660 0.00012867
2.0 0.6544667 0.6543421 0.65456681 0.0001245 0.00008685
2.4 0.5850455 0.5849621 0.58516507 0.0000833 0.00004065
2.8 0.5259371 0.52589 0.52607689 0.0000471 0.00000392
3.2 0.4758956 0.4758787 0.47604990 0.0000169 0.00003929
3.6 0.4334572 0.4334649 0.43361973 0.0000077 0.00006475
4.0 0.3972761 0.3973038 0.39744423 0.0000277 0.00008453
4.4 0.3662176 0.3662617 0.36640865 0.0000440 0.00011893
4.8 0.3393596 0.339417 0.33957048 0.0000574 0.00014836
5.2 0.3159625 0.3160309 0.31619215 0.0000684 0.00017500
5.6 0.2954359 0.2955135 0.29567122 0.0000775 0.00018717
6.0 0.2773074 0.2773926 0.27754826 0.0000851 0.00019816
6.4 0.2611972 0.2612889 0.26144877 0.0000916 0.00021352
6.8 0.246798 0.2468951 0.24706752 0.0000970 0.00023544
7.2 0.2338594 0.2339612 0.23416162 0.0001017 0.00027148
7.6 0.2221761 0.222282 0.22252748 0.0001058 0.00032355
8.0 0.2115784 0.2116877 0.21197515 0.0001093 0.00037146

Table A6: Emden function for the isothermal gas sphere calculated by RK, MC1, and MC2 methods 

x θRK θMC1 θMC2 E1 E2
0 1 1 1 0 0
2.0 0.560384 0.560827 0.560931 0.0004424 0.0005470
4.0 1.572729 1.573106 1.572747 0.0003773 0.0000182
6.0 2.467576 2.467785 2.467481 0.0002089 0.0000952
8.0 3.175668 3.175745 3.176027 0.0000773 0.0003593
10.0 3.736768 3.736756 3.737987 0.0000121 0.0012184
12.0 4.191345 4.191273 4.193481 0.0000717 0.0021360
14.0 4.568391 4.56828 4.571572 0.0001112 0.0031808
16.0 4.887732 4.887594 4.891850 0.0001374 0.0041183
18.0 5.163044 5.162889 5.167944 0.0001544 0.0049003
20.0 5.403978 5.403813 5.409809 0.0001652 0.0058305
22.0 5.617513 5.617342 5.623992 0.0001715 0.0064794
24.0 5.808813 5.808638 5.815527 0.0001746 0.0067146
26.0 5.981783 5.981607 5.988679 0.0001755 0.0068959
28.0 6.139433 6.139258 6.146420 0.0001746 0.0069863
30.0 6.284123 6.283951 6.291093 0.0001726 0.0069699
32.0 6.417731 6.417562 6.424744 0.0001696 0.0070128
34.0 6.541771 6.541605 6.548700 0.0001660 0.0069288
35 6.600541 6.600377 6.607436 0.0001640 0.0068956

Received: March 29, 2023; Accepted: September 07, 2023

Creative Commons License This is an open-access article distributed under the terms of the Creative Commons Attribution License