# How to solve $|a+b|+|a-b|=c$?

It is intuitive that $$a=\pm \frac{c}{2}$$, with $$-\frac{c}{2}\leq b\leq \frac{c}{2}$$ or vice-versa are solutions to the problem. Can I get to these solutions without dividing the expression in all the cases (i.e. $$a$$ and $$b$$ being positive or negative and $$|a|$$ being greater than or less than $$|b|$$)? Nothing wrong with that, I'm just looking for other way of solving this problem. I tried using the fact that $$|x|=\sqrt{x^2}$$ but the expression quickly becomes very complex with the two variables.

• "without dividing the expression in all the cases " What's wrong with dividing the expression in all the cases? – fleablood Apr 10 at 23:09

There are several standard methods: intervals (cases), squaring, graphical.

Let's do squaring: $$(|a+b|+|a-b|)^2=c^2 \iff \\ 2a^2+2b^2+2|a^2-b^2|=c^2 \iff \\ (2|a^2-b^2|)^2=(c^2-2(a^2+b^2))^2 \iff \\ 4a^2+4b^2-8a^2b^2=c^4-4(a^2+b^2)c^2+4a^2+4b^2+8a^2b^2 \iff \\ c^4-4(a^2+b^2)c^2+16a^2b^2=0 \Rightarrow \\ c^2=2(a^2+b^2)\pm \sqrt{(2(a^2+b^2))^2-16a^2b^2}=2a^2+2b^2\pm \sqrt{4(a^2-b^2)^2} \Rightarrow \\ c^2=2a^2+2b^2\pm 2|a^2-b^2|\stackrel{WLOG: \ |a|\ge |b|}{=} 4a^2;4b^2 \Rightarrow \\ a=\pm \frac c2; |b|\le |a| \Rightarrow -\frac c2\le b\le \frac c2.$$

What's wrong with doing all cases?

Case 1: $$a+b \ge 0; a-b \ge 0$$.

Then $$|a+b|+|a-b| = (a+b)+ (a-b) = c\ge 0$$. And $$a =\frac c2$$ and $$b$$ mayb be anything in $$[-\frac c2, \frac c2]$$.

Case 2: $$a+b \ge 0; a-b < 0$$.

Then $$|a+b| + |a-b| = (a+b) + (b-a) = c \ge 0$$. And $$b = \frac c2$$. $$a -\frac c2 < 0$$ and $$a+\frac c2 \ge 0$$ so $$a$$ may be anything in $$[-\frac c2, \frac c2)$$.

Case 3: $$a+b < 0$$ and $$a-b \ge 0$$.

Then $$|a+b| + |a-b| = -a-b + a-b = -2b = c \ge 0$$ so $$b = -\frac c2$$ and $$a\ge b$$ and $$a < -b$$ so $$a$$ may be anything in $$[-\frac c2, \frac c2)$$.

Case 4: $$a+b < 0$$ and $$a-b < 0$$.

Then $$|a+b| + |a-b| = -a -b +b-a=-2a = c\ge 0$$ so $$a = -\frac c2$$ and $$b< \frac c2$$ and $$b > -\frac c2$$ as $$b$$ may be anything in $$(-\frac c2, \frac c2)$$.

....

So solutions are $$a =\pm \frac c2; b\in [-\frac c2, \frac c2]$$ and $$b = \pm \frac c2; a\in [-\frac c2, \frac c2]$$.

WLOG, we may assume $$a,b \ge 0$$. Also $$a \ge b$$.

Therefore, $$c = |a+b|+|a-b| = a+b + a-b = 2a$$, and so $$a=\frac c2$$ and $$b \le a=\frac c2$$.