# Kuhn-Tucker condition for $\max _{0 \leq x \leq a}f(x)$?

In applying Kuhn-Tucker theorem, I encountered a problem of the form $\max_{0 \leq x \leq a}f(x)$. If there is no upper bound for $x$, then the Kuhn-Tucker result gives the first order conditions for the maximization: if $x$ is a maximizer, then $f'(x) \leq 0$ and $xf'(x) = 0$, with the constraint $x \geq 0$, of course. However, I did not see how to work the bound $a$ in here. Need help.

$$f^\prime (x) = \mu-\lambda$$ $$\lambda x = 0$$ $$\mu(x-a) = 0$$
where $\lambda$ and $\mu$ are non-negative KKT multipliers for the constraints $x\ge 0$ and $x \le a$ respectively.
If there were no upper bound $a$ (or, equivalently, if the constraint $x\le a$ did not bind), then the relevant constraints described above reduce to the first-order conditions you state.