①当x>2时
f(x)=x+1+x-2=2x-1≤4
x≤2.5
②当-1≤x≤2时
f(x)=x+1+2-x=3≤4 --------------------------恒成立
③当x<-1时
f(x)=-x-1+2-x=1-2x≤4
x≥-1.5
综上,x的取值范围是
-1.5≤x≤2.5
f(x)=|x+1|+|x-a|
a=2时,f(x)=|x+1|+|x-2|≤4
可视为在一维坐标中,到-1和2俩点距离和不超过4的点的集合
所以解集为{x|-3/2≤x≤5/2}
(1)x-2>=0 x>=2 x+1+x-2<=4 x<=5/2 2<=x<=5/2 (2) x-2<=0 且 x+1>=0 -1<=x<=2 3<=4 符合 (3) x-2<=0 且 x+1<=0 x<=-1 -3/2<=x<=-1 所以 -3/2<=x<=5/2