On the mathematical modeling of memristors