For what value of $a$ does the equation $|x(x-4)|=a$ have exactly 3 real solutions? I simplified the equation and got two cases where $$x(x-4)=a$$
and 
$$x(x-4)=-a.$$
How do I go after that. I know how you could get $2$ solutions or $4$ solutions, but how do you get $3$ solutions?
 A: Note that we must have $a\geq0$ or the original equation is unsolvable. We then, as you showed have
$$x(x-4)=a$$
and
$$x(x-4)=-a$$
Solving these with the quadratic formula gives
$$x=\frac{4\pm\sqrt{16+4a}}{2}$$
$$x=\frac{4\pm\sqrt{16-4a}}{2}$$
Note that, since $a\geq0$, the first equation always has two solutions. Is there then an $a$ that will make the second only have $1$? You should see that happens when $\sqrt{16-4a}=0$, which tells us $a=4$.
A: In order for the original equation to have exactly $3$ real solutions, the two equations must have $1$ real solution and $2$ real solutions, separately. This is because neither of the two equations can have $3$ solutions by itself, because a quadratic has at most $2$ real solutions. Actually, another possibility is that both equations have $2$ real solutions, but they share a solution. However, we can rule this out because this only happens at $a=0$, which only has two real solutions $x=0,\ 4$. Let's analyze each equation separately: $$x(x-4)=a\Rightarrow x^2-4x-a=0$$
Recall that a quadratic equation has $2$ real solutions when the discriminant is positive, $1$ real solution when the discriminant is zero, and no real solutions if the discriminant is negative. For the first equation, the discriminant $16+4a$ is positive when $a>-4$, negative when $a<-4$, and zero when $a=-4$. In the second equation: $$x(x-4)=-a\Rightarrow x^2-4x+a=0$$
the discriminant $16-4a$ is positive when $a<4$, negative when $a>4$, and zero when $a=4$.
In order for there to be exactly three solutions, we need the discriminant of one equation to be $0$ and the other to be positive. So there are exactly $3$ solutions only when $a=4$ or $a=-4$. But obviously, $a$ must be positive so our only candidate is $a=4$. And we see that when $a=4$ we have three solutions: $$x=2,\ 2+2\sqrt 2,\ 2-2\sqrt 2$$
Other answers have shown that there are $3$ real solutions when $a=4$, but the work here shows that $4$ is the only value of $a$ yielding exactly $3$ real solutions. If you need help visualizing this problem, here is a graph:

The red graph is $\lvert x(x-4)\rvert$ and the green graph is $y=4$.
A: The expression inside the absolute value signs is a quadratic, so the graph of $y=x(x-4)$ is a parabola. Its vertex is at $(2,-4)$, so the equation $x(x-4)=-4$ has precisely $1$ solution. Meanwhile, the equation $x(x-4)=4$ has two solutions. Putting these together, you should be able to find the answer to your question.
A: Hint:
Linear equations have one solution
Quadratic equations have two solutions 
Hence cubic equations will have 3 solutions
