TITLE: When I was teaching absolute function properties, I suddenly made this question ...
QUESTION [17 upvotes]: I was teaching absolute function properties in a K-12 class. I made this question in my mind.
Suppose $f(x)$ is a one-to-one function, and its definition is  $f(x)=max\left \{ x,3x\right \}=ax+b|x|+c$ find $a,b,c$
As I was teaching, I solved the question by two methods:
First, put three arbitrary numbers for $x$, for example, $x=0,1,2$ and solve the system of equations:
$$\left\{\begin{matrix}
x=0 &max \left \{ 0,0 \right \}=0 &a(0)+b(0)+c=0 \rightarrow c=0\\
 x=1&max \left \{ 1,3 \right \}=3  &a+b+c=3\\
 x=-1& max \left \{ -1,-3 \right \}=-1 & -a+b+c=-1
\end{matrix}\right.\\b=1 ,a=2\\ max\left \{ x,3x\right \}=2x+1|x|+0$$
Second, plot max{x,3x} and determine $a,b,c$ with respect to a figure of the function:

Obviously, $c=0$
$$\rightarrow a=\left\{\begin{matrix}
x>0 &  max\left \{ x,3x \right \}=3x&=ax+bx+0 \\
x<0 &  max\left \{ x,3x \right \}=x& =ax-bx+0
\end{matrix}\right.\\ \forall x \in \mathbb{R}\begin{Bmatrix}
(a+b)x=3x\\
(a-b)x=x
\end{Bmatrix}\rightarrow  a=2,b=1 \\\rightarrow max\left \{ x,3x \right \}=2x+|x|+0 $$
...and then, one of the students asked for a third method. I told her, "I will think, and you must think too!"
Now I have two questions:

What do you think about my handmade question?
Can you give me suggestion for more methods to solve it?

REPLY [7 votes]: max{x,3x} + min{x,3x} = 4x
 max{x,3x} - min{x,3x} = |2x|
 ----------------------------
 2max{x,3x} = 4x + 2|x|

 max{x,3x} = 2x + |x|


As a bonus, min{x,3x} = 2x - |x|