Find the values of $k$ such that the equation $x^3+x^2-x+2=k$ has three distinct real solutions Find the values of $k$ such that the equation 
$$x^3+x^2-x+2=k$$
has three distinct real solutions.
Please explain how to find the solution! Thanks

We can sketch the graph $y=x^3+x^2-x+2$ as below (I used WolframAlpha):

Now we imagine drawing horizontal lines across this graph (setting $y=k$ in the original equation)
We can see that the only points where the line crosses the equation exactly three times are any points where $$y\text{ value of minimum point}<k<y\text{ value of maximum point}$$
Therefore, to solve the problem, we must calculate the turning points of the graph $y=x^3+x^2-x+2$
We do this by computing the derivative first:
$$y'=3x^2+2x-1$$
We then set this equal to zero to find turning points of the graph
\begin{align}3x^2+2x-1&=0\\
(x+1)(3x-1)&=0\end{align}
Therefore we have turning points at $x=-1$ and $x=\frac 13$
We can then find the $y$ co-ordinates of these points by substiuting them back into the equation:
When $x=-1$, \begin{align}y&=(-1)^3+(-1)^2-(-1)+2\\
&=-1+1+1+2\\
&=3\end{align}
When $x=\frac 13$, \begin{align}y&=\left(\frac13\right)^3+\left(\frac13\right)^2-\frac13+2\\
&=\frac 1{27}+\frac 19-\frac 13+2\\
&=\frac{49}{27}\end{align}
We know that $\frac{49}{27}<3$ and therefore we can say that $$\frac{49}{27}<k<3$$
