# Over what intervals is  f(x)=(x-1)^2-x^3+x  increasing and decreasing?

May 9, 2016

$f \left(x\right)$ is decreasing on $x \in \mathbb{R}$ (on the interval $- \infty < x < \infty$).

#### Explanation:

We will have to differentiate the function:

• If $f ' > 0$, then $f$ is increasing.
• If $f ' < 0$, then $f$ is decreasing.

First, simplify $f$ by expanding ${\left(x - 1\right)}^{2}$ and then combining like terms.

$f \left(x\right) = {x}^{2} - 2 x + 1 - {x}^{3} + x$

$f \left(x\right) = - {x}^{3} + {x}^{2} - x + 1$

Now, find $f '$ through the power rule.

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

In order to analyze when $f '$ is positive or negative, we must find when it could change sign, which is when $f ' = 0$. When we analyze

$- 3 {x}^{2} + 2 x - 1 = 0$

We see that the polynomial has a negative discriminant, which means the that $f '$ never equals $0$. Since the function is continuous, and that the function $f ' \left(x\right) = - 3 {x}^{2} + 2 x - 1$ will always be $< 0$, since it is a downwards-facing parabola with no real roots, we can determine that the graph of $f$ is always decreasing.

The graph of $f$, which is always decreasing:

graph{(x-1)^2-x^3+x [-13.41, 15.07, -6.32, 7.92]}

The graph of $f '$, which is always negative:

graph{-3x^2+2x-1 [-20.13, 20.42, -12.77, 7.5]}