This paper presents a novel mathematical model for the TiO2 thin-film memristor device discovered by Hewlett-Packard (HP) labs. Our proposed model considers the boundary conditions and the nonlinear ionic drift effects by using a piecewise linear window function. Four adjustable parameters.associate