Question: Maximize piecewise function

Hello,

consider the piecewise function

b:=piecewise(0>=t,-t,5>t,0,5<=t,t-5);

Why

maximize(b,t=0..3);

does not return correct answer?

maximize(b,t=1..3); or maximize(b,t=-1..3);

works correctly.

Moreover maximize(b,t=0..5);

returns an error.

Thank you for advice.

Please Wait...