def elliptical_mu(b, upsilon, l_tilde, n):
    """
    Marginal disutility of labor supply from the elliptical utility
    function

    Args:
        b (scalar):  scale parameter of elliptical utility function
        upsilon (scalar):  curvature parameter of elliptical utility
            function
        l_tilde (scalar): maximum amount of labor supply
        n (array_like): labor supply amount

    Returns:
        mu (array_like): marginal disutility of labor supply

    """
    mu = (
        b
        * (1.0 / l_tilde)
        * ((1.0 - (n / l_tilde) ** upsilon) ** ((1.0 / upsilon) - 1.0))
        * (n / l_tilde) ** (upsilon - 1.0)
    )

    return mu