Obtain the number of real roots of the following quintic polynomial $$f(x)= x^5+x^3-2x+1$$
My approach:
First, on seeing the polynomial, it should be clear that it is continuous. Also, $f(-\infty)=-\infty$ and $f(\infty)=\infty$. Hence, the function has at least one root. Now, the derivative is calculated as:
$$f'(x)=5x^4+3x^2-2$$
which gives the two solutions as $\pm\sqrt{\frac25}$. Now, we need to test for the roots in each of the intervals. In the first Interval, the value of function is negative at $-\infty$ and positive at $-\sqrt{\frac25}$. Hence, function will have one root in this interval. Then, in the second Interval function decreases but never touches $x$-axis as it takes positive value at $\sqrt{\frac25}$. Also, the function again start to increase in the third Interval and is positive at $\infty$. Hence, it has only one root.
Is my approach correct? My textbook gives the answer 3 using Rolle's theorem. It says that since the $f'(x)$ has two roots, then $f(x)$ will have three roots using Rolle's theorem. Thanks.