Derivative Function with Multiple Inputs