derivatives of exponential and chain rule