Se hará una integración del modelo FLRW en 5D con el método de Series de Taylor.

· Utilizando el paquete TaylorSeries de julia

Tengo la ecuación $$\dfrac{da}{d\tau}=\sqrt{\Omega_m a^{-1} + \Omega_p a^{7/2} + \Omega_m \bar{\rho}_m a^{-4} + \Omega_p \bar{\rho}_p a^5}$$

Quiero resolver $$\dfrac{da}{d\tau}=f(a,\tau)$$


In [1]:
using TaylorSeries

In [80]:
ome_m=0.315;
ome_p=0.685;
rho_m=0.0;
rho_p=0.0;

In [3]:
affine(a) = a + taylor1_variable(typeof(a),25);

In [40]:
t = affine(1.0)


Out[40]:
 1.0 + 1.0 t + 𝒪(t²⁶)

In [ ]:


In [95]:
f1=1./sqrt(ome_m*((1./t) + (rho_m/t^(4.))) + ome_p*((t^(7/2.))+ rho_p*t^5));

In [96]:
f2=integTaylor(f1);

In [ ]:


In [99]:
s=Array{Float64,1}[]
@time for i in 0:0.000001:3
    ss=evaluate(f1,i)
    
    push!(s,[ss])
    
end


elapsed time: 45.451988081 seconds (3950716720 bytes allocated, 7.30% gc time)

In [100]:
s


Out[100]:
30000001-element Array{Array{Float64,1},1}:
 [1.0]        
 [1.0]        
 [1.0]        
 [1.0]        
 [1.0]        
 [0.999999]   
 [0.999999]   
 [0.999999]   
 [0.999999]   
 [0.999999]   
 [0.999999]   
 [0.999999]   
 [0.999999]   
 ⋮            
 [-6.35067e15]
 [-6.35068e15]
 [-6.35068e15]
 [-6.35069e15]
 [-6.35069e15]
 [-6.3507e15] 
 [-6.3507e15] 
 [-6.35071e15]
 [-6.35071e15]
 [-6.35072e15]
 [-6.35072e15]
 [-6.35073e15]

In [8]:
using PyPlot


INFO: Loading help data...

In [ ]:
ts=[0:0.001:100];
#ylim(0,10)
#xlim(0,1)
#plot(ts,s)

In [45]:
s


Out[45]:
4001-element Array{Array{Float64,1},1}:
 [2.51535e12]
 [2.49398e12]
 [2.47279e12]
 [2.45177e12]
 [2.43092e12]
 [2.41024e12]
 [2.38973e12]
 [2.36938e12]
 [2.34921e12]
 [2.32919e12]
 [2.30934e12]
 [2.28966e12]
 [2.27013e12]
 ⋮           
 [-1.40267]  
 [-1.48171]  
 [-1.56278]  
 [-1.64592]  
 [-1.73118]  
 [-1.81861]  
 [-1.90827]  
 [-2.0002]   
 [-2.09446]  
 [-2.1911]   
 [-2.29018]  
 [-2.39176]  

In [ ]: