# Question #e40e5

Nov 16, 2017

The function is convex on $\left(- \frac{\pi}{2} , 0\right) \cup \left(\frac{\pi}{2} , \pi\right)$ and is concave on $\left(- \pi , - \frac{\pi}{2}\right) \cup \left(0 , \frac{\pi}{2}\right)$.

#### Explanation:

First, note that $f$ is convex at $x = a$ when $f ' ' \left(a\right) > 0$ and $f$ is concave at $x = a$ when $f ' ' \left(a\right) < 0$.

So, we need to find this function's second derivative and then examine when it's positive (the function is convex) and when the second derivative is negative (the function is concave).

We'll use the trigonometric derivatives $\frac{d}{\mathrm{dx}} \tan x = {\sec}^{2} x$ and $\frac{d}{\mathrm{dx}} \sec x = \sec x \tan x$.

$f \left(x\right) = 2 x - \tan x$

$f ' \left(x\right) = 2 - {\left(\sec x\right)}^{2}$

To find the next derivative, we'll need to use the chain rule.

$f ' ' \left(x\right) = - 2 {\left(\sec x\right)}^{2 - 1} \frac{d}{\mathrm{dx}} \sec x = - 2 \sec x \left(\sec x \tan x\right) = - 2 {\sec}^{2} x \tan x$

It will be easier to think about when this is positive and negative to think about it in basic terms: sine and cosine.

$f ' ' \left(x\right) = - 2 \frac{1}{\cos} ^ 2 x \sin \frac{x}{\cos} x = \frac{- 2 \sin x}{\cos} ^ 3 x$

• $\text{QIII}$

Here, $\sin x < 0$ and $\cos x < 0$. (Note then that ${\cos}^{3} x < 0$ as well.)

Using a very rough notation in which I only denote positives and negatives for $\frac{- 2 \sin x}{\cos} ^ 3 x$, we see that

$f ' ' \left(x\right) = \frac{- \left(-\right)}{-} = -$

So $f$ is concave on $- \pi < x < - \frac{\pi}{2}$.

• $\text{QIV}$

Here, $\sin x < 0$ and $\cos x > 0$, so ${\cos}^{3} x > 0$. Then

$f ' ' \left(x\right) = \frac{- \left(-\right)}{+} = +$

So $f$ is convex on $- \frac{\pi}{2} < x < 0$.

• $\text{QI}$

Wherein $\sin x > 0 , \cos x > 0 , {\cos}^{3} x > 0$, so

$f ' ' \left(x\right) = \frac{- \left(+\right)}{+} = -$

And $f$ is concave on $0 < x < \frac{\pi}{2}$.

• $\text{QII}$

Here $\sin x > 0$ but $\cos x < 0 , {\cos}^{3} x < 0$, so

$f ' ' \left(x\right) = \frac{- \left(-\right)}{+} = +$

So $f$ is convex on $\frac{\pi}{2} < x < \pi$.