解:设x-y+1=t,则y'=1-t'
代入原方程,得1-t'=t²+t-1
==>t'=(1-t)(2+t)
==>dt/((1-t)(2+t))=dx
==>(1/(2+t)+1/(1-t))dt=3dx
==>ln│2+t│-ln│1-t│=3x+ln│C│ (C是积分常数)
==>(2+t)/(1-t)=Ce^(3x)
==>(x-y+3)/(y-x)=Ce^(3x)
故原方程的通解是x-y+3=C(y-x)e^(3x)
解:设x-y+1=t,则y'=1-t'
代入原方程,得1-t'=t²+t-1
==>t'=(1-t)(2+t)
==>dt/((1-t)(2+t))=dx
==>(1/(2+t)+1/(1-t))dt=3dx
==>ln│2+t│-ln│1-t│=3x+ln│C│
(C是积分常数)
==>(2+t)/(1-t)=Ce^(3x)
==>(x-y+3)/(y-x)=Ce^(3x)
故原方程的通解是x-y+3=C(y-x)e^(3x)