# How do you find the intervals of increasing and decreasing using the first derivative given y=x/2+cosx?

Feb 9, 2018

The function is increasing $\iff x \in \left(\frac{\pi}{6} + 2 \pi k , 5 \frac{\pi}{6} + 2 \pi k\right)$
The function is constant $\iff x = \frac{\pi}{6} + 2 \pi k$ or $x = 5 \frac{\pi}{6} + 2 \pi k$
The function is decreasing $\iff x \in \mathbb{R} - \left[\frac{\pi}{6} + 2 \pi k , 5 \frac{\pi}{6} + 2 \pi k\right]$

#### Explanation:

If $y = \frac{x}{2} + \cos \left(x\right)$ then $y ' = \frac{1}{2} - \sin \left(x\right)$

if $y ' > 0$ then the function at that point is increasing.
If $y ' < 0$ then the function at that point is decreasing.
If $y ' = 0$ then the function at that point is constant.

The function $\sin \left(x\right)$ has a periodic behavior.

Lets construct a values table for the function $\sin \left(x\right)$
$x = 0 \implies \sin \left(x\right) = 0$
$x = \frac{\pi}{6} \implies \sin \left(x\right) = \frac{1}{2}$
$x = \frac{\pi}{4} \implies \sin \left(x\right) = \frac{\sqrt{3}}{2}$
$x = \frac{\pi}{2} \implies \sin \left(x\right) = 1$

We also know that $\sin \left(- x\right) = - \sin \left(x\right)$ and $\sin \left(\pi - \theta\right) = \sin \left(\theta\right)$

To the derivative has a positive value, we must have $\sin \left(x\right) > \frac{1}{2}$.

To have this we must have $\pi - \frac{\pi}{6} > x > \frac{\pi}{6}$
That means exactly the same as $5 \frac{\pi}{6} > x > \frac{\pi}{6}$

Because $\sin \left(x\right)$ is periodical, we could have

$5 \frac{\pi}{6} + 2 \pi k > x > \frac{\pi}{6} + 2 \pi k , k \in \mathbb{Z}$

The points where the derivative has the exactly value of zero is when $x = \frac{\pi}{6} + 2 \pi k \text{ or } x = 5 \frac{\pi}{6} + 2 \pi k$

So, now we have that:

For any $k \in \mathbb{Z}$ it's true that:
The function is increasing $\iff x \in \left(\frac{\pi}{6} + 2 \pi k , 5 \frac{\pi}{6} + 2 \pi k\right)$
The function is constant $\iff x = \frac{\pi}{6} + 2 \pi k$ or $x = 5 \frac{\pi}{6} + 2 \pi k$

So, we must have the function decreasing in all the other possible values

The function is decreasing $\iff x \in \mathbb{R} - \left[\frac{\pi}{6} + 2 \pi k , 5 \frac{\pi}{6} + 2 \pi k\right]$

We can see this in the graph of the function:
graph{y=x/2 + cos(x) [-8.21, 10.14, -3.56, 5.61]}

And here is the derivative:
graph{y=1/2 - sin(x) [-8.21, 10.14, -3.56, 5.61]}