def _power_law_conversion_factor(g, e, e1, e2):
    """Conversion factor between differential and integral flux."""
    term1 = e / (-g + 1)
    term2 = (e2 / e) ** (-g + 1) - (e1 / e) ** (-g + 1)
    return term1 * term2