def solow_equation(k,alpha,delta,s,n,g, D):
    """ calculate capital in the next-period
        
    Args:
    
        k (float): capital in this period
        alpha (float): cobb-douglas parameter
        delta (float): depreciation rate
        s (float): saving rate
        n : population growth
        g : technology growth
    
    Returns:
    
        k_plus (float): capital in next period
        
    """
    
    saving = s*k**alpha
    depreciation = delta*k
    k_plus = (k + saving*(1-D) - depreciation)/((1+n)*(1+g))    
    
    return k_plus