- #1
Bkkkk
- 12
- 0
Hey, I have been trying to make Mathematica integrate the following function:
[tex]r_{e}=\frac{c}{H_{0}}\int_{0}^{z}\frac{dz}{\left[\Omega_{NR}(1+z)^{3}+\Omega_n(1+z)^{3-n}+\Omega_{\Lambda}\right]^{\frac{1}{2}}}[/tex]
There are two cases for which this equation needs to be integrated, seperately;
(i) When [tex]\Omega_{\Lambda}=0[/tex]
(ii) [tex]\Omega_n=0 [/tex]
n is real, so is z and the sum of the density parameters is unity, thus if we take case (ii) [tex]\Omega_{\Lambda} = 1 - \Omega_{NR}[/tex]
However Mathematica outputs the formatted version of the input line. Next I thought I would just define a function which includes the above integral, and then plot it for varying values of [tex]\Omega_{NR}[/tex] and n, however the problem is that often times the Kernel crashes or the curves plotted have gaps in them and/or end unexpectedly.
I would of course prefer to have the integrated function as I presume it would save on plotting time as I need make plots for various values of n for case (i).
Thanks
[tex]r_{e}=\frac{c}{H_{0}}\int_{0}^{z}\frac{dz}{\left[\Omega_{NR}(1+z)^{3}+\Omega_n(1+z)^{3-n}+\Omega_{\Lambda}\right]^{\frac{1}{2}}}[/tex]
There are two cases for which this equation needs to be integrated, seperately;
(i) When [tex]\Omega_{\Lambda}=0[/tex]
(ii) [tex]\Omega_n=0 [/tex]
n is real, so is z and the sum of the density parameters is unity, thus if we take case (ii) [tex]\Omega_{\Lambda} = 1 - \Omega_{NR}[/tex]
However Mathematica outputs the formatted version of the input line. Next I thought I would just define a function which includes the above integral, and then plot it for varying values of [tex]\Omega_{NR}[/tex] and n, however the problem is that often times the Kernel crashes or the curves plotted have gaps in them and/or end unexpectedly.
I would of course prefer to have the integrated function as I presume it would save on plotting time as I need make plots for various values of n for case (i).
Thanks
Last edited: