These are linear constraints, so you should not use a nonlinear constraint function (which has errors in signs in any case: you have to ensure that the inequalities all go the correct way). Try this instead:
You defined -(pi/2)<= t <= (pi/2) . Your function does not have a definition outside of that one period, so it is not meaningful to plot it for multiple periods.
Best Answer