Separable coordinates, integrability and the Niven equations