Find number of real roots of the equation


My try:I have tried to remove the modulas by assuming x in some intervals and moved the linear part to RHS and drawn the rough graph of LHS and RHS and tried to interpret if there would be any intersection of two graphs but i could only interpret there are 1 solutions but it is not correct.

Is there some general way to solve such questions and how to solve this question without using any graphing tool ,we just have a pen and paper to solve it.

  • $\begingroup$ Have you learnt curve sketching? The graphs aren't too difficult to plot actually. $\endgroup$ – Gummy bears Jul 16 '15 at 12:41
  • $\begingroup$ Note: (a) $0$ is not a solution; (b) if $x=a$ is a solution, then $x=-a$ is also a solution (since every $x$ is in a $|x|$). So the number of solutions must be even :) $\endgroup$ – psmears Jul 16 '15 at 14:33

I think graphing would be the best option, the graph below shows the curves $3^{|x|}$ in blue and $1 + |2-|x||$ in red, they intersect in two places, so your equation has two real solutions.

enter image description here

It is quite easy to sketch these graphs. $3^{|x|}$ is simply an exponential function that goes to infinity fast after $x>1$ and you simply reflect the shape in the $y$-axis for $x<0$. There is a $y$-intercept of $1$.

On the other hand $1 + |2-|x||$ is simply a reflection in the $x$-axis of $|x|$, then translated upwards by $2$. Then you take the absolute value of that and translate it upwards by $1$ unit. The $y$-intercept is $3$.

  • $\begingroup$ Hey ! we have to solve it without using graphing tool $\endgroup$ – Kartik Watwani Jul 16 '15 at 12:28
  • 1
    $\begingroup$ You did not specify that. Your method used a sketching approach as well... $\endgroup$ – Zain Patel Jul 16 '15 at 12:30

By symmetry, if $x$ is a root, so is $-x$. Let us assume $x>0$ and solve

$$3^x-|2-x|=1,$$ i.e for $$x<2,\ 3^x-x-3=0$$ and for $$x>2,\ 3^x+x+1=0.$$ The latter relation is not possible, by positivity of the terms.

As $(3^x-x-3)'=\ln(3)3^x-1$, the function is increasing and has at most one real root. There is indeed one in the interval $(1,2)$, as the function goes from $-1$ to $4$.

More precisely, with the Lambert function


  • $\begingroup$ Also, one should check that $0$ isn't a root. $\;$ $\endgroup$ – user57159 Jul 16 '15 at 14:05
  • $\begingroup$ Actually, this is covered by the fact that the first piece has a single root. But I admit that I assumed $x>0$ instead of $x\ge0$. $\endgroup$ – user65203 Jul 16 '15 at 14:09


Case $\#1:$

Clearly, $x=0$ does not satisfy the equation

Case $\#2:$

If $x>0,|2-x|=3^x-1$

Case $\#2A:$ If $x-2\ge0\iff x\ge2, x-2=3^x-1\ge8\iff x\ge9$


Case $\#2B:$ If $0<x<2,2-x=3^x-1\ge0\iff x\le2$

Now $2-x$ is decreasing and $3^x-1$ is increasing

At $x=0,2-0=2,3^0-1=0$

At $x=2,2-2=0,3^2-1=8$

So, there must be a root in $(0,2)$

Case $\#3:$

If $x<0, |2+x|=3^{-x}-1$

Set $-x=y, y>0$ to get $|2-y|=3^y-1$ which is same as $\#2$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.