# For what values of x is f(x)= x-cosx concave or convex?

Jan 16, 2016

$f \left(x\right)$ is convex on $\left(\frac{- \pi}{2} + 2 k \pi , \frac{\pi}{2} + 2 k \pi\right)$ and concave on $\left(\frac{\pi}{2} + 2 k \pi , \frac{3 \pi}{2} + 2 k \pi\right)$ where $k$ is an integer.

#### Explanation:

Concavity is determined by the sign of the second derivative:

• If $f ' ' \left(a\right) > 0$, then $f \left(x\right)$ is convex at $x = a$.
• If $f ' ' \left(a\right) < 0$, then $f \left(x\right)$ is concave at $x = a$.

First, determine the second derivative.

$f \left(x\right) = x - \cos x$
$f ' \left(x\right) = 1 + \sin x$
$f ' ' \left(x\right) = \cos x$

So, we need to determine when $\cos x$ is positive and when it is negative. The sign of $\cos x$ will change whenever $\cos x = 0$.

This occurs when $x = \frac{- \pi}{2} , \frac{\pi}{2} , \frac{3 \pi}{2} , \frac{5 \pi}{2}$, and so on, increasing in intervals of $\pi$.

$\cos x > 0$ on $\left(\frac{- \pi}{2} + 2 k \pi , \frac{\pi}{2} + 2 k \pi\right)$ where $k$ is an integer.
$\cos x < 0$ on $\left(\frac{\pi}{2} + 2 k \pi , \frac{3 \pi}{2} + 2 k \pi\right)$ where $k$ is an integer.

Thus,

$f \left(x\right)$ is convex on $\left(\frac{- \pi}{2} + 2 k \pi , \frac{\pi}{2} + 2 k \pi\right)$ and concave on $\left(\frac{\pi}{2} + 2 k \pi , \frac{3 \pi}{2} + 2 k \pi\right)$ where $k$ is an integer.