# mathlibdocumentation

analysis.convex.specific_functions

# Collection of convex functions #

In this file we prove that the following functions are convex:

• strict_convex_on_exp : The exponential function is strictly convex.
• even.convex_on_pow, even.strict_convex_on_pow : For an even n : ℕ, λ x, x ^ n is convex and strictly convex when 2 ≤ n.
• convex_on_pow, strict_convex_on_pow : For n : ℕ, λ x, x ^ n is convex on $[0, +∞)$ and strictly convex when 2 ≤ n.
• convex_on_zpow, strict_convex_on_zpow : For m : ℤ, λ x, x ^ m is convex on $[0, +∞)$ and strictly convex when m ≠ 0, 1.
• convex_on_rpow, strict_convex_on_rpow : For p : ℝ, λ x, x ^ p is convex on $[0, +∞)$ when 1 ≤ p and strictly convex when 1 < p.
• strict_concave_on_log_Ioi, strict_concave_on_log_Iio: real.log is strictly concave on $(0, +∞)$ and $(-∞, 0)$ respectively.

## TODO #

For p : ℝ, prove that λ x, x ^ p is concave when 0 ≤ p ≤ 1 and strictly concave when 0 < p < 1.

exp is strictly convex on the whole real line.

theorem convex_on_exp  :

exp is convex on the whole real line.

theorem even.convex_on_pow {n : } (hn : even n) :
(λ (x : ), x ^ n)

x^n, n : ℕ is convex on the whole real line whenever n is even

theorem even.strict_convex_on_pow {n : } (hn : even n) (h : n 0) :
(λ (x : ), x ^ n)

x^n, n : ℕ is strictly convex on the whole real line whenever n ≠ 0 is even.

theorem convex_on_pow (n : ) :
(set.Ici 0) (λ (x : ), x ^ n)

x^n, n : ℕ is convex on [0, +∞) for all n

theorem strict_convex_on_pow {n : } (hn : 2 n) :
(λ (x : ), x ^ n)

x^n, n : ℕ is strictly convex on [0, +∞) for all n greater than 2.

theorem finset.prod_nonneg_of_card_nonpos_even {α : Type u_1} {β : Type u_2} {f : α → β} [decidable_pred (λ (x : α), f x 0)] {s : finset α} (h0 : even (finset.filter (λ (x : α), f x 0) s).card) :
0 s.prod (λ (x : α), f x)
theorem int_prod_range_nonneg (m : ) (n : ) (hn : even n) :
0 (finset.range n).prod (λ (k : ), m - k)
theorem int_prod_range_pos {m : } {n : } (hn : even n) (hm : m n) :
0 < (finset.range n).prod (λ (k : ), m - k)
theorem convex_on_zpow (m : ) :
(set.Ioi 0) (λ (x : ), x ^ m)

x^m, m : ℤ is convex on (0, +∞) for all m

theorem strict_convex_on_zpow {m : } (hm₀ : m 0) (hm₁ : m 1) :
(λ (x : ), x ^ m)

x^m, m : ℤ is convex on (0, +∞) for all m except 0 and 1.

theorem convex_on_rpow {p : } (hp : 1 p) :
(set.Ici 0) (λ (x : ), x ^ p)
theorem strict_convex_on_rpow {p : } (hp : 1 < p) :
(λ (x : ), x ^ p)
theorem has_deriv_at_sqrt_mul_log {x : } (hx : x 0) :
has_deriv_at (λ (x : ), * real.log x) ((2 + real.log x) / (2 * real.sqrt x)) x
theorem deriv_sqrt_mul_log (x : ) :
deriv (λ (x : ), * real.log x) x = (2 + real.log x) / (2 *
theorem deriv_sqrt_mul_log'  :
deriv (λ (x : ), * real.log x) = λ (x : ), (2 + real.log x) / (2 *
theorem deriv2_sqrt_mul_log (x : ) :
deriv^[2] (λ (x : ), * real.log x) x = / (4 * ^ 3)