How do you determine the intervals where the graph of the given function is concave up and concave down f(x)= sinx-cosx for 0<=x<=2pi?

May 26, 2015
May 26, 2015

Whenever a problem asks for concave up or down intervals, we have to use the second derivative test. Concavity involves the curvature of a graph; at a given interval, taking the first derivative gives us a increasing or decreasing function linearly, while the second derivative allows us to see how a function curves up or down exponentially (like the parabola $y = {x}^{2}$, where it curves up always).

Recall that for $f \left(x\right) = \sin \left(x\right) - \cos \left(x\right)$, we can use trigonometry derivatives:

First derivative - $f ' \left(x\right) = \cos \left(x\right) + \sin \left(x\right)$
Second derivative - $f ' ' \left(x\right) = \cos \left(x\right) - \sin \left(x\right)$.

After solving for the second derivative, we then have to find the inflection points. At these points, there is no curvature as the function's concavity changes from concave up to down or vice versa. Thus, we can say that $f ' ' \left(x\right) = 0$.

Solving for $x$ using trigonometry, the inflection points are:

$0 = \cos \left(x\right) - \sin \left(x\right)$

$\sin \left(x\right) = \cos \left(x\right) \implies \tan \left(x\right) = 1$

$x = \frac{\pi}{4} , \frac{5 \pi}{4}$ for $0 \le x \le 2 \pi$.

Now, we can test some values around the inflection points to see where $f ' ' \left(x\right)$ is positive (concaves up) or negative (concaves down):

For $x = 0$, $f ' ' \left(0\right) = \cos \left(0\right) - \cancel{\sin \left(0\right)} = + 1$.
For $x = \frac{\pi}{2}$, $f ' ' \left(\frac{\pi}{2}\right) = \cancel{\cos \left(\frac{\pi}{2}\right)} - \sin \left(\frac{\pi}{2}\right) = - 1$.
For $x = \frac{3 \pi}{2}$, $f ' ' \left(\frac{3 \pi}{2}\right) = \cancel{\cos \left(\frac{3 \pi}{2}\right)} - \sin \left(\frac{3 \pi}{2}\right) = + 1$.

Thus,
$f \left(x\right)$ concaves up at $x : \left[0 , \frac{\pi}{4}\right) \cup \left(\frac{5 \pi}{4} , 2 \pi\right]$ and
$f \left(x\right)$ concaves down at $x : \left(\frac{\pi}{4} , \frac{5 \pi}{4}\right)$.

Unlike the brackets, the parentheses () indicate greater than ($>$) or less than ($<$) but not equal to. By graphing the function $f \left(x\right) = \sin \left(x\right) - \cos \left(x\right)$:
graph{sin(x)-cos(x) [-1.57079632679, 6.28318530718, -3, 3]}
Our answer is correct. A number line is very helpful for marking the inflection points and where the function is positive or negative; see my setup to a similar calculus problem (the last part of my second answer):

http://socratic.org/questions/using-the-second-derivative-f-x-36x-2-12-how-do-you-find-the-intervals-in-which-#145860