Q:

Is it true that the following definition of a convex function cannot be used in a more general way? 

One definition for convex functions I found on Wikipedia was that 'the line segment between any two points on the graph of the function always lies above or on the graph'.  That makes sense.  However, am I right in suggesting that this is not a suitable definition for convexity on a particular interval?  To explain why I think this, consider the graph $y=x^3$ on the interval $[-0.5,1]$:

This function is clearly not convex on the interval $[-0.5,1]$. However, using the definition above, it does meet the criterion that the line segment between those two points always lies above or on the graph.  What the above definition really tells us is that $y=x^3$ is not a convex function.  It doesn't say whether the function is convex or concave over a particular interval, and cannot be used as such.  Otherwise, we get contradictions such as '$y=x^3$ is convex over the interval $[-0.5,1]$', when it clearly is not. 
So this definition helps us show that a function is convex everywhere, or not convex everywhere.  It tells us whether a function is a convex function or not a convex function.  What it can't tell us is whether a function is convex for every point in an interval. ( To show this, we might use the second derivative test, for example.)  Is this reasoning correct? 

A:

You are correct $f(x) = x^3$ is not convex on the interval $[-0.5, 1]$ (I assume you made a typo when you wrote $[0.5,1])$. However, this agrees with the Wikipedia definition: try the points $(-0.5, (-0.5)^3)$ and $(-0.4, (-0.4)^3)$. Is the line segment passing through these points still above the graph? ( It's not!)  So in fact the Wikipedia definition does tell you if a real valued function defined on an interval is convex.  Remember, the definition states "for any two points on the graph."