How can we find the maximum of any discrete function, say
$$ f(n)=\frac{(n+1)^2}{2^n},\quad n\in \mathbb{N} $$
that is not the PDF of any distribution? (This query is unrelated to statistics.)
By generating observations, we can obtain the maximum to be $9/4$ when $n=2$. However, other less rigourous methods using inequalities give poor estimates for this maximum point.
Wrong Approach 1 (Binomial Expansion):
$$2^n = (1+1)^n\ge \begin{pmatrix}n\\2\end{pmatrix}\implies \frac{(1+n)^2}{(1+1)^n}\le \frac{2(1+n)^2}{n(n-1)}=\frac{2\left(1+\frac{1}{n} \right)^2}{1-\frac{1}{n}}\le 2 \quad(n\to \infty )$$
Wrong Approach 2 (Bernoulli Inequality):
$$ 2^n=(1+1)^n\ge 1+n(1)\implies \frac{(1+n)^2}{(1+1)^n}\le\frac{(1+n)^2}{1+n}=1+n\to \infty \quad (n\to \infty ) $$
How can we find the exact maximum point? If we try to differentiate with respect to $n$, we can get $n\approx 1.88$, then we can try $n=1$ and $n=2$, but differentiation is just the wrong approach for a discrete function.
Hint: Consider the ratio of successive terms $\dfrac{f(n)}{f(n-1)}$, for $n\ge 1$. (This ratio here equals $\dfrac{(n+1)^2}{2n^2}$.) Try and find for which values of $n$ we have $\color{blue}{\dfrac{f(n)}{f(n-1)} \ge 1}$. Can you see how to use this information to find which $n$ maximises $f(n)$?