result of coupled ODE in python code is different from mathematica
Question: As per my language knowledge my code is written correct. But It is not giving
me correct solution (plot). When I had solved same system of ODE's in
mathematica, I have correct solution and both solutions are totally different.
I am writing a research project so I need a proper code in python. could you
please let me know the mistake of mine code. [python code
solution](http://i.stack.imgur.com/B9vhE.png) [Mathematica
solution](http://i.stack.imgur.com/djLRv.png)

    
    
    import numpy as np
    import matplotlib.pyplot as plt
    import scipy.integrate as si
    ##Three system
    def func(state, T):
        H = state[0]
        P = state[1]
        R = state[2]
        Hd = -(16./3.)*np.pi*P 
        Pd = -4.*H*P
        Rd = H*R
        return Hd,Pd,Rd
    T = np.linspace(0.1,0.9,50)
    state0 = [1,0.0001, 0.1]
    s = si.odeint(func, state0, T)
    h = np.transpose(s)
    plt.plot(T,h[0])
    plt.show()
    

Mathematica code

    
    
    Clear[H,\[Rho],a]
    Eq1=(H'[t] == -16 \[Pi] \[Rho][t]/3)
    Eq2= (\[Rho]'[t] == -4 H[t] \[Rho][t])
    Eq3 = (a'[t] ==  H[t] a[t])
    sol=NDSolve[{Eq1,Eq2, Eq3,
         H[0.1]==0.1, \[Rho][0.1]==0.1, a[0.1]==0.1}, 
           {H[t],\[Rho][t],a[t]}, {t,0.1, 0.9}]
    Plot[Evaluate[{H[t]}/.sol],{t,0.1,0.9}]
    

[![enter image description
here](http://i.stack.imgur.com/KIK5V.png)](http://i.stack.imgur.com/KIK5V.png)


Answer: Both codes are correct, I just turned off my laptop and on it again, and it
gives me the correct result (as mathematica)

