# How to show the convexity of a function?

## Question:

How to show the convexity of a function?

## Convexity of Functions

If the graph of a function is given, we can determine the function's concavity or convexity, by looking where the tangent line to the graph lie with respect to the graph.

If the tangent line to the graph is above the graph, the function is concave, and if the tangent line is below the graph, the function is convex,

The concavity of a function, when the graph is not given, is determined by the second derivative test,

{eq}\displaystyle \text{ if } f''(x)>0 \implies f(x) \text{ is convex} \displaystyle \text{ and if } f''(x)<0 \implies f(x) \text{ is concave}. {/eq}

To find the convexity of a function {eq}\displaystyle y=f(x), {/eq} we will determine the values of {eq}\displaystyle x {/eq} where the second derivative is positive.

A function is convex if the tangent line to the graph is below the graph, but we determine the interval of convexity, by solving the inequality {eq}\displaystyle f''(x)>0. {/eq}

For example the convexity of the function {eq}\displaystyle f(x)=x^4+3x^2-50 {/eq}

is obtain by solving

{eq}\displaystyle \begin{align} f''(x)&>0\\ \frac{d}{dx}(4x^3+6x)&>0, \left[\text{using } f'(x)=\frac{d}{dx}( x^4+3x^2-50)=4x^3+6x\right]\\ 12x^2+6&>0 \text{ which is true always, so } f(x)=x^4+3x^2-50 \text{ is convex for }x\in(-\infty,\infty). \end{align} {/eq}