Question 2
Let $n$ be a positive integer. For any positive integer $j$ and positive real number $r$, define $f_j(r)$ and $g_j(r)$ by
$$
f_j(r) = \min(jr, n) + \min\left(\frac{j}{r}, n\right), \quad \text{and} \quad g_j(r) = \min(\lceil jr \rceil, n) + \min\left(\left\lfloor \frac{j}{r} \right\rfloor, n\right),
$$
where $\lceil x \rceil$ denotes the smallest integer greater than or equal to $x$. Prove that
$$
\sum_{j=1}^{n} f_j(r) \le n^2 + n \le \sum_{j=1}^{n} g_j(r)
$$
for all positive real numbers $r$.
$$
f_j(r) = \min(jr, n) + \min\left(\frac{j}{r}, n\right), \quad \text{and} \quad g_j(r) = \min(\lceil jr \rceil, n) + \min\left(\left\lfloor \frac{j}{r} \right\rfloor, n\right),
$$
where $\lceil x \rceil$ denotes the smallest integer greater than or equal to $x$. Prove that
$$
\sum_{j=1}^{n} f_j(r) \le n^2 + n \le \sum_{j=1}^{n} g_j(r)
$$
for all positive real numbers $r$.