def deriv(y, t, Delta, beta, mu, epsilon,gamma,alpha,delta):
    
    """
     This function contains a system of equations for the S.E.I.R. model assuming non constant population
     death (natural and due infection) and birth rates, as well as reinfection post recovery. 

    Args:
        y (array): contains five floating point numbers S0, E0, I0, R0, D0 where each denotes initial conditions (float)
        t (float): variable denoting time 
        Delta (float): rate of birth
        beta (float): rate of contact with infectious
        mu (float): rate of natural death
        epsilon (float): rate of infectiousness
        gamma (float): rate of recovery
        alpha (float): rate of death due disease
        delta (float): rate of reintegration into susceptible state

    Returns:
        [dS, dE, dI, dR, dD] (array)
        dS: differential equation for Susceptible
        dE: differential equation of Exposed
        dI: differential equation for Infectious
        dR: differential equation for Recovered
        dD: differential equation for Deaths
    """
    
    S, E, I, R, D = y
    N = S + E + I + R
    dS = Delta*N  - beta*S*I/N - mu*S + delta*R
    dE = beta*S*I/N - (mu + epsilon)*E
    dI = epsilon*E - (gamma + mu + alpha)*I
    dR = gamma*I - mu*R - delta*R
    dD = alpha*I 
    
    return [dS,dE, dI, dR, dD]