Is a constant function $f(x)=5$ both convex and concave?

1.7k Views Asked by At

Is a constant function $f(x)=5$ both convex and concave? Or neither convex nor concave?

2

There are 2 best solutions below

0
On

These definitions are from Wikipedia:

A real-valued function defined on an n-dimensional interval is called convex (or convex downward or concave upward) if the line segment between any two points on the graph of the function lies above or on the graph.

A real-valued function defined on an n-dimensional interval is called concave if the line segment between any two points on the graph of the function lies below or on the graph.

We can conclude from this definition that $f(x)=C$ (constant function) is both convex and concave, because the line segment between any two points on the graph of $f$ lies on the graph.

2
On

$f’(x) = 0$

$f’’(x) = 0$.

If $f’’(x) \geq 0$ , $f$ is convex.

If $f’’(x) \leq 0$ , $f$ is concave.

If $f’’(x) = 0$ , $f$ is both convex and concave.

In this case , $f’’(x) = 0$. So , $f$ is both convex and concave.