There are four situations.
1, when a/2 is less than or equal to 0.
Function in (0)
2. When a/2 is between 0 and 1.5.
The minimum value is x = a/2 and the maximum value is x = 3.
3. When a/2 is between 1.5 and 3.
The minimum value is x = a/2 (the same as the minimum value in case 2) and the maximum value is x = 0.
4. When a/2 is greater than 3.
Function in (0)