def EWT_beta(x):
    """
    Beta = EWT_beta(x)
    function used in the construction of Meyer's wavelet
    """
    if x < 0:
        bm = 0
    elif x > 1:
        bm = 1
    else:
        bm = x ** 4 * (35.0 - 84.0 * x + 70.0 * x ** 2 - 20.0 * x ** 3)
    return bm
