Let's say, we pick two arbitrary points $x_1$ and $x_2$ (where $x_1 < x_2$) on a function ${(x-1)}^3 + 6$ and connect them with a line segment. How do you prove that the function is convex by using the fact that the line segment is contained inside the curve?
My first thought is to find the first derivative of the two arbitrary points and that would tell me that the function is decreasing or increasing. Then, find the y coordinate of the minimum point of the function. Compare the $y$ coordinate of the minimum and $y$ coordinates of points $x_1$ and $x_2$. If the $y$ coordinates of $x_1$ and $x_2$ is greater than or equal to y coordinates of the minimum, then we can say the function is convex.
$$f(x)=(x-1)^3+6$$ $$f'(x)=3(x-1)^2$$ $$f"(x)=6(x-1)$$
Since $f"(x) \geq 0$ if and only $x \geq 1$,
$f(x)$ is convex for $x \geq 1$.
Remark:
If you have a proof that doesn't depend on the domain, check your proof again.