Si la fonction f est convexe sur un intervalle, elle y est continue, mais aussi dérivable à gauche et à droite en chaque point. On note f − et f + ces dérivées respectivement. Ainsi, pour chaque x0 ∈ [a,b], on peut construire une ligne
![{\displaystyle t(x)=f(x_{0})+c(x-x_{0}),\ c\in [f^{-}(x_{0}),f^{+}(x_{0})].}](https://wikimedia.org/api/rest_v1/media/math/render/svg/cf98150f8b57e5e1a8e51a93e4b63a6e4532f799)
telle que
![{\displaystyle \forall x\in [a,b],t(x)\leqslant f(x),{\text{ et }}t(x)=f(x)\Leftrightarrow x=x_{0}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/59451b4269e7f119c4cb3da3325a04e001c8b429)
On a, en particulier, pour x0=a+b/2 :
![{\displaystyle \forall x\in [a,b],f\left({\frac {a+b}{2}}\right)+c\left(x-{\frac {a+b}{2}}\right)\leqslant f(x),\ c\in \left[f^{-}\left({\frac {a+b}{2}}\right),f^{+}\left({\frac {a+b}{2}}\right)\right].}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c4a8d32b73501ea0987a4bc1d1da13766c62095c)
D'autre part, toujours par convexité de f, on a :
![{\displaystyle \forall x\in [a,b],f(x)\leqslant f(a)+{\frac {f(b)-f(a)}{b-a}}(x-a).}](https://wikimedia.org/api/rest_v1/media/math/render/svg/6eeb6502cf15a8ee1d75a75e42c620050660bb19)
Il suffit alors de calculer les intégrales des deux fonctions affines :
![{\displaystyle \int _{a}^{b}\left[f\left({\frac {a+b}{2}}\right)+c\left(x-{\frac {a+b}{2}}\right)\right]\,\mathrm {d} x=(b-a)f\left({\frac {a+b}{2}}\right),\ \int _{a}^{b}\left[f(a)+{\frac {f(b)-f(a)}{b-a}}(x-a)\right]\,\mathrm {d} x=(b-a){\frac {f(a)+f(b)}{2}}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/4c5d97e91597ce76591b6da91f03637e4e666994)