# Find real numbers $a$ such that the equation has exactly two solutions

Find all real numbers $a$, such that the equation has exactly two solutions:

$$|x+1|+|2-x|=a^2-1$$

My reasoning:

Since the left side is always positive because of the absolute values, then $a^2-1\gt0$ ? But by solving that condition I get $a\in<-\infty,-1>\cup<1,+\infty>$ but the solution is $a\in<-\infty,-2>\cup<2,+\infty>$; why is this a wrong approach?

How to solve this correctly?

• You're assuming that if $a^2-1>0$ then the equation has two solutions but that needn't be the case. – kingW3 Jun 10 '17 at 13:13

i would write the equation in the form $$|x+1|+|x-2|=a^2-1$$ 1: for $$x\geq 2$$ we have $$x+1+x-2=a^2-1$$ or $$x=\frac{a^2}{2}\geq 2$$ 2: $$-1\le x<2$$ form here we get $$a^2=4$$ last case: $$x<-1$$ then we get $$-x-1-x+2=a^2-1$$ thus $$x=\frac{2-a^2}{2}$$ and $$\frac{2-a^2}{2}<-1$$ can you finish?

• Thanks! This is exactly what I needed. – Eod J. Jun 10 '17 at 13:29

Notice that (by the triangle inequality) $|x+1|+|2-x|=a^2-1\geq |x+1+2-x|=3$ so you get $a^2-1\geq 3$ which implies $a^2\geq 4$.

When $-1\leq x\leq 2$ we get that $x+1+2-x=3$ so when $a^2=4$ the equation has infinitely many solutions.

Looking the other cases $x> 2$ and $x< -1$ one gets an unique solution in each interval for each $a^2>4$ (hence for $a^2>4$ there are exactly $2$ solutions).

• Well, $a^2 > 4$. If $a^2=4$, then we have infinitely many solutions. – wythagoras Jun 10 '17 at 13:17
• @wythagoras Thanks,fixed the answer. – kingW3 Jun 10 '17 at 13:22
• That's a nice solution! However, Dr.Sonnhards answer solves it in the intended way. That's why I'll accept his answer, even thought I find applying the triangle inequality rule as a nice idea! – Eod J. Jun 10 '17 at 13:32

$$|x+1|+|2-x|=a^2-1\\$$ $$\begin{array}{c||c||c} x<-1 & -1\leq x \leq 2 & x>2\\ \hline \hline |x+1|+|2-x|=a^2-1 & |x+1|+|2-x|=a^2-1 & |x+1|+|2-x|=a^2-1 \\ \hline -x-1+2-x=a^2-1 & x+1+2-x=a^2-1 & x+1+x-2=a^2-1\\ \hline -2x+1 & a^2-1=3 &a^2-1=2x-1\\ \hline a^2-1\geq-2(-1)+1 &a^2=4 & a^2-1 \geq2(2)-1\\ \hline a^2\geq4 & a=\pm2 &a^2\geq 4\\ \hline (-\infty,-2]\cup[2,+\infty) & \pm 2 &(-\infty,-2]\cup[2,+\infty) \end{array}$$ so $$a \in (-\infty,-2]\cup[2,+\infty)$$

• you lost the case $$x=2$$ and $$x=-1$$ – Dr. Sonnhard Graubner Jun 10 '17 at 13:28

You noticed correctly that $a^2-1$ must be positive. But keep in mind the other condition that the equation must have exactly two solutions.

Below is the the graph (if you can draw it) of the LHS function:

The RHS is a constant function $a^2-1$, whose graph is a horizontal line.

In order for the two graphs to have two common points (i.e. two solutions): $$a^2-1>3 \Rightarrow a\in(-\infty,-2)\cup(2,+\infty).$$

• I realized that now. I totally forgot what I read in the problem after I moved to writing the positive condition and thus missed the solution condition. I tend to do that. – Eod J. Jun 10 '17 at 13:48