I have a somewhat complicated inequality expression like this:

ineq =                         i * Log[n/i] + 
                                   Log[r[i, 0]] +
                         (n - i) * Log[(n*(1 - Subscript[p, 0]))/(n - i)] +
      Sum[(n - i)*Binomial[i, k] * Log[1 - Subscript[p, k]], {k, 1, i}] > 0

I would like to bound it be Jensen's inequality: $\log\left(\frac{\sum a_i x_i}{\sum a_i}\right) \ge \frac{\sum a_i \log(x_i)}{\sum a_i}$. Yes, I make sure, that always $a_i >0$, in this case 0 < i < n. So first I need to compute the normalization constant, in this case it is:

z = i + 1 + (n - i) + Sum[(n - i)*Binomial[i, k], {k, 1, i}]

So, how can I compute this z in this symbolic case when the $a_i$ can be 1 or a Sum like here?

Then I suppose I would get the desired bound by:

ApplySides[#/z&, ineq]
With[{lhs = %[[1]]}, 
  Log[lhs /. Log -> Identity] >= lhs

So basically my question reduces to: how to compute this normalization constant symbolically?


1 Answer 1


OK, I guess I figured it myself, the following seems to do what I need:

JensenCoef[a_ Log[b_]] := a
JensenCoef[Log[b_]] := 1
JensenCoef[Sum[Times[a__, Log[b_]], i_]] := Sum[Times[a], i]
JensenUpperBound[expr_] := Log[(expr /. Log -> Identity)/(JensenCoef /@ expr)]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.