# Is f(x)=x^3+2x^2-4x-12 concave or convex at x=3?

Mar 17, 2016

At $f \left(3\right)$ the function is convex.

#### Explanation:

A concave function is a function in which no line segment joining two points on its graph lies above the graph at any point.

A convex function, on the other hand, is a function in which no line segment joining two points on the graph lies below the graph at any point.

It means that, if $f \left(x\right)$ is more than the average of $f \left(x \pm \lambda\right)$ than the function is concave and if $f \left(x\right)$ is less than the average of $f \left(x \pm \lambda\right)$ than the function is convex.

Hence to find the convexity or concavity of $f \left(x\right) = {x}^{3} + 2 {x}^{2} - 4 x - 12$ at $x = 3$, let us evaluate $f \left(x\right)$ at $x = 2.5 , 3 \mathmr{and} 3.5$.

$f \left(2.5\right) = {\left(\frac{5}{2}\right)}^{3} + 2 {\left(\frac{5}{2}\right)}^{2} - 4 \left(\frac{5}{2}\right) - 12 = \frac{125}{8} + \frac{50}{4} - 10 + 12 = \frac{125 + 100 - 80 - 96}{8} = \frac{49}{8}$

$f \left(3\right) = {\left(3\right)}^{3} + 2 {\left(3\right)}^{2} - 4 \left(3\right) - 12 = 27 + 18 - 12 - 12 = 21$

$f \left(3.5\right) = {\left(\frac{7}{2}\right)}^{3} + 2 {\left(\frac{7}{2}\right)}^{2} - 4 \left(\frac{7}{2}\right) - 12 = \frac{343}{8} + \frac{98}{4} - 14 - 12 = \frac{343 + 196 - 112 - 96}{8} = \frac{331}{8}$

The average of $f \left(2.5\right)$ and $f \left(3.5\right)$ is $\frac{\frac{49}{8} + \frac{331}{8}}{2} = \frac{380}{2 \times 8} = \frac{95}{4} = 23 \frac{3}{4}$

As, this is more than $f \left(3\right)$, at $f \left(3\right)$ the function is convex.

graph{x^3+2x^2-4x-12 [-5, 5, -20, 30]}