Let be continuous on , bounded above, and suppose its limit superior at from the right is at most . If some has , then attains its maximum on . A sufficiently short initial interval has all values below . On the remaining closed interval, the extreme value theorem supplies a maximum, which is consequently global. This can prove attainment despite an oscillatory discontinuity at one endpoint.
If is Riemann integrable and is Lipschitz on an interval containing the range of , then is Riemann integrable. With Lipschitz constant , the oscillation on each partition cell satisfies , and hence the gap between Darboux sums is multiplied by at most . A continuously differentiable is Lipschitz on each closed bounded interval by the mean value theorem and the extreme value theorem applied to .
The times of local maxima of a Brownian motion path are dense in the half-line almost surely, and every such local maximum is a strict local maximum. Density follows from nowhere monotonicity of Brownian motion and the extreme value theorem. Strictness follows by checking that maxima over separated rational compact time intervals are unequal; the increment across their gap supplies an independent nondegenerate normal distribution.
A continuous function at satisfies the following quantified condition:
The choice of may depend on and .
For the bounded example, take
This is a continuous function on its domain and . Along its values tend to , while along its values tend to . Hence the supremum is and the infimum is , and neither is attained. “Upper and lower bound” here means the least upper and greatest lower bounds.
For the nonnegative function on the whole real line, if the conclusion is immediate. Otherwise choose with . The limits at both infinities give such that whenever . By the extreme value theorem, a continuous function on the compact interval has a maximum there. Since , it also exceeds every value outside this interval. Thus is bounded above and attains its global maximum. Nonnegativity ensures that either the function is zero or such a positive comparison value exists; without it, a function such as would have an unattained supremum of zero.
The extreme value theorem ensures that is finite. Since and , multiplication preserves the inequality. Monotonicity of the Riemann integral gives the required bound
To prove the weighted mean value theorem for integrals, put and . If , then , so any works. This includes .
If , the extreme value theorem gives and . Integrating gives . A continuous function on an interval takes every value between its minimum and maximum by the intermediate value theorem. Choose with . Consequently
Let . The feasible probability simplex is a nonempty compact convex set, so the extreme value theorem guarantees a minimizer. Its Hessian matrix is diagonal with positive entries , making a strictly convex function. Hence the minimizer is unique.
Use the Lagrange multipliers for the sum constraint and for . The Lagrangian is
The KKT conditions are
A strictly positive feasible allocation exists, so the Slater condition holds. These conditions are necessary and sufficient for this convex optimization. At least one coordinate is positive, giving . Put . For a positive coordinate, complementary slackness gives . At a zero coordinate, stationarity gives , or . Thus
Here . This logarithmic water filling raises the smaller baseline values to a common level. The scalar left side is a continuous function and strictly increasing above , starts at zero, and tends to infinity, so exactly one solves it. One can find it by interval bisection, or sort the baseline values increasingly and find an index for which
using . Equality at the next baseline simply gives a zero allocation. Sorting and a running sum implement the water-filling algorithm in time.