How to show the total number of real solutions of the equation $x^4-2x^2+4=n$ for each set of real values of $n$ using differentiation? How to show the total number of real solutions of the equation $x^4-2x^2+4=n$ for each set of real values of $n$ using differentiation?
Trying to solve this, I converted the given equation as the following function
$f(x) = x^4-2x^2+4-n$
Then I solve the derivative which will help me determine the critical numbers for x.
$f'(x) = 4x^3-4x = 4x(x^2-1)$
Hence, the critical numbers
will be
$x = 0, \pm 1$
This means that I can identify the relative extremums.
The relative maximum will be
$(0, 4-n)$
The relative minimums are
$(\pm1, 3-n)$
But I don't know how can I use those relative extremums to show the following which I found using a graphing tool.
$n < 3$ implies no solution
$n = 3$ implies $2$ solutions
$3 < n < 4$ implies $4$ solutions
$n = 4$ implies $3$ solutions
$n > 4$ implies $2$ solutions
How can I use, the local extremums or other concepts under differentiation to find the above results?
If you have strategies other than derivatives, please share them here.
Please feel free to share your ideas, comments, and suggestions about this matter. Thank you in advance!
 A: Hint:
Instead consider this polynomial $p(x)=x^4-2x^2+4$. This polynomial being continuous and of even degree must attain a global minimum somewhere (why? Hint: $p(x)\to +\infty $ as $x\to \pm \infty$) . You have found such point as $\pm1$, at which $p(x)=3$. Now if $p(x)=n$ where $n$ is less than $3$. It won't have any solution!
$p(x)=3$ has clearly at least two solutions $x=\pm 1$. $p(x)=3\implies x^4-2x^2+1=0$. Can you establish now that $x=\pm 1$ are the only real solutions of $p(x)=3$.
What if $4\gt n\gt 3$: $p'(x)=4x(x-1)(x+1)\implies p$ is strictly increasing when $x\gt 1$ or $x\in (-1,0)$. 
If $x\in (-1,0)$, $p(-1)=3$ and $p(0)=4$ and so by IVT, $p(x)=n$ must have exactly one solution on $(-1,0)$. 
If $x\gt 1$, then $p(1)=3$ and since $p$ is strictly increasing and continuous, it will attain $n$ also sometime so $p(x)=n$ has exactly one solution here also. Can you similarly apply the same arguments on the intervals that have been skipped.
Can you finish using the similar arguments as above?
A: HINT: You already noted that $f'(x)=0$ iff $x=-1,0,1$. So to start, now let's look at $f$'s behavior on $(0,1)$ i.e., between 2 critical points.

*

*Then, as the derivative $f'$ of $f$ is a polynomial that does not achieve 0 on $(0,1)$, it follows that the derivative $f'(x)$ is either strictly positive on the entire interval $(0,1)$, or is strictly negative on the entire interval $(0,1)$.


*Which implies that $f(x)$ itself is either strictly increasing on the entire interval $(0,1)$, or is strictly decreasing on the entire interval $(0,1)$.


*Thus, for any $n$, there is at most one value of $x$ in $(0,1)$ such that $f(x)=n$. There is exactly one value of $x$ in $(0,1)$ such that $f(x)=n$ iff the signs of $f(0)-n,f(1)-n$ are different i.e., one positive, the other negative, which happens if $n$ is in $(3,4)$. And there are no values of $x$ in $(0,1)$ so that $f(x)=n$, if $n$ falls outside $(3,4)$.


*Likewise, working now in the interval $(-1,0)$, there is exactly one $x \in (-1,0)$ such that $f(x)=n$, iff $n$ satisfies $n \in (3,4)$, and there are no $x \in (-1,0)$ such that $f(x)=n$ if $n$ falls outside of $(3,4)$.


*Note that $f(-\infty)$ is positive, because the leading power of $f$ is even and the leading coordinate is positive i.e.,  $x^4$. Same with $f(\infty)$. So for $n$ such that $f(-1)<n$ i.e., $n>3$, there is exactly one $x$ in $(-\infty,-1)$ such that $f(x)=n$. And for any
other $n$ i.e., $n \le 3$ there is no $x$ in $(-\infty,-1)$ such that $f(x)=n$. Likewise, if $n>3$, there is exactly one $x$ in $(1,\infty)$ such that $f(x)=n$. And for any $n \le 3$ there is no $x$ in $(1,\infty)$ such that $f(x)=n$.


*Can you take it from here. In particular, what remains is to count the number of real solutions $f(x)=n$ has for $x=-1,0,1$, for $n=3,4$. And then to put together what you have already noted in 3.--5.
For example, for $n<3$ there are no real $x$ such that $f(x)=n$ by 3.--6.
For $n=3$, note that $f(1)=f(-1)=3$, and by 3.--5. those are the only solutions.
For $n$ in $(3,4)$, by 3., 4., and 5., there is an $x \in (-\infty,-1)$ such that $f(x)=n$; an $x \in (-1,0)$ such that $f(x)=n$; an $x \in (0,1)$ such that $f(x)=n$, and finally an $x \in (1,\infty)$ such that $f(x)=n$. So, 4 solutions so far, and as $f(-1),f(0),f(1)$ are all not $4$ it follows that there are precisely 4 solutions total.
What about $n=4$, and then $n>4$?
A: I don't think that differentiation is a good method. It tells you where roots would have to be, if they exist, but you still have to do a lot of work to establish whether they exist. I would use the substitution $u=x^2$. Then you have $f(x) = u^2-2u+4-n$, and the quadratic formula gives two solutions for $u$. For each of those solutions, if it is negative, it gives no solutions for real $x$, if it is $0$, it gives one (namely $x=0$), and if it is positive, then it gives two solutions.
As dxiv mentions in the comments, the original equation can also be written as $(x^2-2)^2=n$. This gives $x^2-2=\pm \sqrt n$, which gives $x^2=2\pm \sqrt n$, which gives $x= \pm \sqrt {2 \pm \sqrt n}$. You can then evaluate the four different combinations of plus and minus, check whether they are real, and check whether they are distinct.
