**Example 1:**

In the interval [$0$, $2\ \pi$], $h\ (y)$ = $cos^2\ y$, is increasing or decreasing in which subset?

**Solution:**

We have $h\ (y)$ = $cos^2\ y$

$\Rightarrow$ $h’(y)$ = $-\ 2\ cos\ y\ sin\ y$

$-\ 2\ cos\ y\ sin\ y$ = $0$

$\Rightarrow$ $-\ sin\ (2\ y)$ = $0$

$\Rightarrow$ $2\ y$ = $0,\ \pi,\ 2\pi,\ 3\pi,\ 4\pi$

$\Rightarrow$ $y$ = $0$, $\frac{\pi}{2}$, $\pi$, $\frac{3\ \pi}{2}$, $2 \pi$

We take point $\frac{\pi}{4}$, $\frac{3\ \pi}{4}$, $\frac{5\ \pi}{4}$, $\frac{7 \pi}{4}$ from each interval in between points above and see that, $h$ is increasing in interval

($\frac{\pi}{2}$, $\pi$) $\cup$ ($\frac{3 \pi}{2}$, 2$\pi$) and $h$ is decreasing in interval

($0$, $\frac{\pi}{2}$) $\cup$ ($\pi$, $\frac{3 \pi}{2}$).

**Example 2:**

Find if $g$ is increasing or decreasing when $g\ (x)$ = $x^3\ –\ 3\ x^2\ +\ 12$

**Solution:**

Here $g\ (x)$ = $x^3\ –\ 3\ x^2\ +\ 12$

$\Rightarrow$ $g’(x)$ = $3\ x^2\ –\ 6x$

$\Rightarrow$ $g’(x)$ = $3\ x\ (x\ –\ 2)$

$g’(x)$ = $0$

$\Rightarrow$ $3\ x\ (x\ –\ 2)$ = $0$

$\Rightarrow$ $x$ = $0,\ 2$

When we pick values from each interval obtained from above say, $-1$, $1$, $3$, we find that, function $g$ is increasing in ($2$,$\infty$)and decreasing in interval ($- \infty$, $0$) $\cup$ ($0$, $2$)