@staticmethod
def backderivative_at(sub_expr1, sub_expr2, var):
    """
        calculate 1st derivative of var using back propagation
    
        INPUTS
        =======
        sub_expr1: expression or constant 
        sub_expr2: expression or constant 
        var: variable of interest
        
        RETURNS
        ========
        derivative of var with respect to sub_expr1
        """
    if var == sub_expr1:
        return sub_expr2.val
    else:
        return sub_expr1.val
