解:当x≥0时,原方程化为x2-x-2=0,解得:x1=2,x2=-1(不合题意,舍去);
当x<0时,原方程化为x2+ x-2=0,解得:x1=1,(不合题意,舍去)x2=-2;
∴原方程的根是x1=2,x2=-2.
请参照例题解方程 .
解方程:x²-3|x|+2=0
解:(1)当x≥0时,原方程化为x²-3x+2=0,解得: =2, =1
( 2 )当x<0时,原方程化为x²+3x+2=0,解得: =1, =-2.
∴原方程的根是 =2, =1, =1, =-2.
请观察上述方程的求解过程,试解方程x²-2|x-1|-1=0.