WolframAlpha computational knowledge AI
Plot[If[x<1,x,If[x<2,-x+2,If[x<3,x-2,If[x<4,-x+4]]]],{x,0,5}]