derive a way to find the derivative of the phase if the amplitude fluctuates with the spatial coordinates