We minimize the functional f↦ ∫ afdμ under the entropy condition E(f) = − ∫ f log fdμ ≥ E, ∫ fdμ = 1 and f ≥ 0, where E ∊ R is fixed. We prove that the minimum is attained for f = e−sa/ ∫ e−sadμ, where s ∊ R is chosen such that E(f) = E. We apply the result on minimizing problems in pseudodifferential calculus, where we minimize the harmonic oscillator.