# How do I solve $|-2x^2+1+e^x+\sin x| = |2x^2-1|+e^x+|\sin x|$ where x belongs to [0,2π]?

How do I solve $$|-2x^2+1+e^x+\sin x| = |2x^2-1|+e^x+|\sin x|,$$ where $$x$$ belongs to [0,2π]? My book solves it in this way: since RHS is positive, it concludes that $$1- 2x^2 \ge 0$$ and $$\sin x \ge 0$$. Where have these results come from? How do I solve this problem?

We have $$|a+b+c|=|a|+|b|+|c|\quad\hbox{if and only if}\quad \hbox{a,b,c all have the same sign}\ ,$$ where "same sign" is in the non-strict sense, that is, all $${}\ge0$$ or all $${}\le0$$. In this case $$b=e^x$$ is definitely non-negative, so $$a=1-2x^2$$ and $$c=\sin x$$ must be non-negative too.
To solve the problem, find all $$x$$ such that $$1-2x^2\ge0$$ and $$\sin x\ge0$$.