In this lesson I will explain **how to calculate the concavity and convexity of a function** in a given interval without the need for a function graph.

But first, so as not to confuse terms, let’s define what is a concave function and what is a convex function.

Índice de Contenidos

## Convexity and Convexity

A function shall be concave in an interval when it has this’valley shape’:

A function shall be convex in an interval when it is’mountain-shaped’:

There is no single criterion to establish whether concavity and convexity are defined in this way or the contrary, so it is possible that in other texts you may find it defined the opposite way.

## How to know if a function is concave or convex in an interval

Taking into account the above definition of concavity and convexity, a function is concave in an interval when the value of the second derivative of a point in that interval is greater than zero:

A function is convex in an interval when the value of the second derivative of a point in that interval is less than zero:

At tipping points, the function changes from concave to convex or vice versa.

## Resolved exercise on how to calculate concavity and convexity in the intervals of a function

We will calculate the intervals where the next function is concave or convex:

We need to study the sign of the second derivative of function. Therefore, let’s calculate the second derivative.

The first derivative is:

And the second derivative:

Now we are going to calculate in which intervals the second derivative is greater or smaller than zero.

To do this, we equal the second derivative to zero:

And we solve the equation, the results of which are:

We put them on the number line:

We have three intervals:

- From less than infinite to -1,24
- From -1,24 to 0,21
- From 0,21 to infinity

How do we know if f”(x) is positive or negative in each interval?

For each interval, we choose a point belonging to each interval and calculate the value of f”(x) at that point.

For the interval between the least infinite and -1.24, I choose the point x=-2. I calculate the value of f”(-2):

The result is greater than zero, so the function will be concave in the range from least infinity to -1.24:

And we represent him like this on the straight:

We continue with the interval from -1.24 to 0.21. I choose point x=0 and calculate the value of f”(x) for that point:

It is less than zero, so the function is convex in that range:

And we represent him on the straight:

For the third interval, choose the point x=1:

The second derivative in that range is greater than zero, so the function will be concave:

Whose representation on the line is:

And we already have the three function intervals defined in terms of concavity and convexity.