How to use the derivative method to find the phase of a wave