How to write an expression in an equivalent form without absolute values? The question I have in front of me is the very first problem in Trench's Introduction to Real Analysis:
Write the following expression in equivalent form not involving absolute values:
$a+b+|a-b|$
Looking at the provided answer in the back of the book its:
$2\max(a,b)$
In the chapter I can't find any examples with solutions involving the min/max functions, so feel at a complete loss as to how to get to the above answer.
 A: If $a\ge b$ then we can safely say that:$$a+b+|a-b|=a+b+a-b=2a$$If $a\lt b$ then we can safely say that:$$a+b+|a-b|=a+b-(a-b)=a+b-a+b=2b$$Hopefully you reason to the answer from here...
A: $S = a+b+|a-b| = \begin{cases} a+b+a-b, \text{  if a $\geq$ b} \\ a+b-a+b, \text{ if a $<$ b}\end{cases}= \begin{cases} 2a, \text{ if a $\geq$ b} \\ 2b, \text{ if a $<$ b} \end{cases}= 2\text{ max}(a,b)$
A: Think about it in two cases:
If $a\geq b$ then $|a-b|=a-b$ and then $a+b+|a-b|=a+b+a-b=2a$.
If $b>a$ then $|a-b|=b-a$ and then $a+b+|a-b|=a+b+b-a=2b$.
In either case, the result is $2\max(a,b)$.
A: All you have to do is write down what the absolute value means.
The definition we have is
$$|x|:=\begin{cases}x&\text{ if }x\ge0\\-x&\text{ if }x<0\end{cases}$$
So now the equation we have means
$$\begin{align}
a+b+|a-b|&=\begin{cases}a+b+a-b&\text{ if }a-b\ge0\\a+b-(a-b)&\text{ if }a-b<0\end{cases}\\
\\&=\begin{cases}2a&\text{ if }a\ge b\\2b&\text{ if }a<b\end{cases}
\end{align}$$
Now all that is required is to recognize
$$\max(a,b)=\begin{cases}a&\text{ if }a\ge b\\b&\text{ if }a<b\end{cases}$$
giving you an answer of 
$$a+b+|a-b|=2\max(a,b)$$
A: There is also a trick. $\sqrt{x}$ means normally the positive square root. Thus, we can use $\sqrt{x^2}=|x|$:
$$a+b+|a-b|=a+b+\sqrt{(a-b)^2}$$
