def beta_model_derivative(r3d_kpc, n0, r_c, beta):
    """
    Compute the derivative of a beta model dn/dr

    Parameters
    ----------
    - r3d_kpc: array of radius in kpc
    - r_c : core radius parameter
    - n_0  : normalization
    - beta : slope of the profile

    Outputs
    --------
    - beta model derivative profile as a function of the input radius vector

    """

    return -3.0*n0*beta*r3d_kpc*(1+(r3d_kpc/r_c)**2)**(-3.0*beta/2.0-1.0)/r_c**2