若不论x取何值时,多项式x3-2x2-4x-1与(x+1)(x2+mx+n)都相等.求m,n的值.