# Which of the following has the maximum number of real roots?

## ${x}^{2} - | x | - 2 = 0$ ${x}^{2} - 2 | x | + 3 = 0$ ${x}^{2} - 3 | x | + 2 = 0$ ${x}^{2} + 3 | x | + 2 = 0$

Jun 17, 2018

${x}^{2} - 3 \left\mid x \right\mid + 2 = 0$ with $4$ real roots.

#### Explanation:

Note that the roots of:

$a {x}^{2} + b \left\mid x \right\mid + c = 0$

are a subset of the union of the roots of the two equations:

$\left\{\begin{matrix}a {x}^{2} + b x + c = 0 \\ a {x}^{2} - b x + c = 0\end{matrix}\right.$

Note that if one of these two equations has a pair of real roots then so does the other, since they have the same discriminant:

$\Delta = {b}^{2} - 4 a c = {\left(- b\right)}^{2} - 4 a c$

Further note that if $a , b , c$ all have the same sign then $a {x}^{2} + b \left\mid x \right\mid + c$ will always take values of that sign when $x$ is real. So in our examples, since $a = 1$, we can immediately note that:

${x}^{2} + 3 \left\mid x \right\mid + 2 \ge 2$

so has no zeros.

Let's look at the other three equations in turn:

1) ${x}^{2} - \left\mid x \right\mid - 2 = 0$

$\left\{\begin{matrix}0 = {x}^{2} - x - 2 = \left(x - 2\right) \left(x + 1\right) \setminus \implies \setminus x \in \left\{- 1 & 2\right\} \\ 0 = {x}^{2} + x - 2 = \left(x + 2\right) \left(x - 1\right) \setminus \implies \setminus x \in \left\{- 2 & 1\right\}\end{matrix}\right.$

Trying each of these, we find solutions $x \in \left\{- 2 , 2\right\}$

2) ${x}^{2} - 2 \left\mid x \right\mid + 3 = 0$

$\Delta = {b}^{2} - 4 a c = {\left(- 2\right)}^{2} - 4 \left(1\right) \left(3\right) = 4 - 12 = - 8 < 0$

So this equation has no real roots.

3) ${x}^{2} - 3 \left\mid x \right\mid + 2 = 0$

$\left\{\begin{matrix}0 = {x}^{2} - 3 x + 2 = \left(x - 1\right) \left(x - 2\right) \setminus \implies \setminus x \in \left\{1 & 2\right\} \\ 0 = {x}^{2} + 3 x + 2 = \left(x + 1\right) \left(x + 2\right) \setminus \implies \setminus x \in \left\{- 1 & - 2\right\}\end{matrix}\right.$

Trying each of these, we find all are solutions of the original equation, i.e. $x \in \left\{- 2 , - 1 , 1 , 2\right\}$

Alternative method

Note that real roots of $a {x}^{2} + b \left\mid x \right\mid + c = 0$ (where $c \ne 0$) are positive real roots of $a {x}^{2} + b x + c = 0$.

So to find which of the given equations has the most real roots is equivalent to finding which of the corresponding ordinary quadratic equations has most positive real roots.

A quadratic equation with two positive real roots has signs in the pattern $+ - +$ or $- + -$. In our example the first sign is always positive.

Of the given examples, only the second and third have coefficients in the pattern $+ - +$.

We can discount the second equation ${x}^{2} - 2 \left\mid x \right\mid + 3 = 0$ since its discriminant is negative, but for the third equation we find:

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

has two positive real roots, yielding $4$ roots of the equation ${x}^{2} - 3 \left\mid x \right\mid + 2 = 0$