解令x^2=2x,
解得x=0或x=2
知x属于[0,2]时,x^2-2x=x(x-2)<0,即x^2<2x,
x属于[2,4]时,x^2-2x=x(x-2)>0,即x^2>2x,
故
2x x属于[0,2]
y=max{2x,x²}={
x^2 x属于[2,4].
解令x^2=2x,
解得x=0或x=2
知x属于[0,2]时,x^2-2x=x(x-2)<0,即x^2<2x,
x属于[2,4]时,x^2-2x=x(x-2)>0,即x^2>2x,
故
2x x属于[0,2]
y=max{2x,x²}={
x^2 x属于[2,4].