解:法一f(x+1)=x²+2x=x²+2x+1-1=(x+1)²-1所以f(x)=x²-1法二:令x+1=t,则x=t-1那么f(t)=(t-1)²+2(t-1)=t²-2t+1-2t-2=t²-1故f(x)=x²-1
设x+1=t,则x=t-1,f(t)=(t-1)^2+2(t-1)=t^2-2t+1+2t-2=t^2-1,所以f(x)=x^2-1