In order to limit a function to an interval [a, b], please use the command Function (see command Function).
Related Topics
4.2.5. Function of x