解法一:因为=n,
所以x=-2为方程x2+mx+2=0的根,m=3.
又=(x+1)=-1,
所以n=-1.
所以m=3,n=-1.
解法二:因为(x2+mx+2)
=(x+2)·
=(x+2)·=0·n=0,
所以(-2)2+(-2)m+2=0,m=3.
同上可得n=-1.