I am studying for qualifying exams. The following problem was on my final. I am unsure if I got it right or not.

Let $\displaystyle D$ be the unit ball in $\displaystyle \mathbb{R}^n$ and $\displaystyle u \not \equiv 0$ satisfy
$\displaystyle
\Delta u = -f(u) \text{ in } D \text{ and } u = 0 \text{ on } \partial D,
$
where $\displaystyle f(y)$ is smooth with $\displaystyle f(0) = f(\alpha) = 0, f(y) > 0$ for $\displaystyle 0 < y <
\alpha$ and $\displaystyle f(y) < 0$ for $\displaystyle y < 0$ or $\displaystyle y > \alpha.$ Determine which one of the
following cases holds: $\displaystyle \max_{x\in D} u = \alpha; \max_{x\in D} u < \alpha;
\max_{x\in D} u > \alpha.$

Solution
Let's consider two cases: Case I $\displaystyle 0 < y < \alpha$ and Case II $\displaystyle y < 0 \cup y
> \alpha.$
Case I: Assume $\displaystyle u(x_0) < \alpha$ and let $\displaystyle \Omega_{\alpha} = \left\{x \in
\Omega | u(x) < \alpha\right\} \ne \emptyset$ so $\displaystyle \Omega_{\alpha} \subset
\Omega.$ Since $\displaystyle u$ is continuous, $\displaystyle u=\alpha$ on $\displaystyle \partial \Omega_{\alpha}.$
Additionally, we see that $\displaystyle f(u) \ge 0$ and therefore $\displaystyle Lu =\Delta u \le 0$ on
$\displaystyle \Omega_{\alpha}.$ By the Weak Minimum Principle
$\displaystyle
\min_{\bar{\Omega_{\alpha}}} u = \min_{\partial\Omega_{\alpha}} u,
$
since $\displaystyle u = \alpha$ on $\displaystyle \partial \Omega_{\alpha}.$ A condtradiction, since we
assumed $\displaystyle u < \alpha$ and therefore $\displaystyle \min{\partial \Omega_{\alpha}} u <
\alpha.$ Thus, $\displaystyle u(x) \ge \alpha\; \forall x \in \Omega.$

Case II: On the other hand, let's now assume $\displaystyle u(x_0) > \alpha$ and let
$\displaystyle \Omega_{\alpha} = \left\{x \in \Omega | u(x) > \alpha\right\} \ne
\emptyset$ so $\displaystyle \Omega_{\alpha} \subset \Omega.$ Since $\displaystyle u$ is continuous,
$\displaystyle u=\alpha$ on $\displaystyle \partial \Omega_{\alpha}.$ Additionally, we see that $\displaystyle f(u)
\le 0$ and therefore $\displaystyle Lu =\Delta u \ge 0$ on $\displaystyle \Omega_{\alpha}.$ By the
Weak Maximum Principle
$\displaystyle
\max_{\bar{\Omega_{\alpha}}} u = \max_{\partial\Omega_{\alpha}} u,
$
since $\displaystyle u = \alpha$ on $\displaystyle \partial \Omega_{\alpha}.$ A condtradiction, since we
assumed $\displaystyle u > \alpha$ and therefore $\displaystyle \max{\partial \Omega_{\alpha}} u >
\alpha.$ Thus, $\displaystyle u(x) \le \alpha\; \forall x \in \Omega.$
Combining the results for Case I and Case II we see that $\displaystyle u(x) = \alpha\;
\forall x \in \Omega$ and therefore $\displaystyle \max_{\Omega} u = \alpha.$