Given the gradient function of a curve is x(squared) - 4x + 1 and that the curve passes through the point (-1,2), find the equation of the curve.