Jensen's inequality states that for a convex function $f:I \to \mathbb R$ and $x\_1,...,x\_n\in I$, we have $$\frac{1}{n}\sum\_{i=1}^n f(x\_i)\ge f\left(\frac{1}{n}\sum\_{i=1}^n x\_i\right)$$
But in order to use this inequality, you have to choose the right function. Take for example this problem

$x\_1,...,x\_n$ are positive reals such that $$\sum\_{i=1}^n\frac{1}{1+x\_i}=1$$ Show that $$\prod\_{i=1}^nx\_i\ge (n-1)^n$$

Here the function that we're looking for turns out to be $f(x)=\frac{1}{1+e^x}$

In the proof of the AM-GM inequality, we've used $f(x)=\ln x$.

So is there a way to know what's the function that will help me solve my inequality?