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:

Enter image description here

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:

  1. What do you think about my handmade question?
  2. Can you give me suggestion for more methods to solve it?
  • 24
    $\begingroup$ Tip from a teacher: Please never use the word "obviously" when explaining. $\endgroup$ Jul 28, 2015 at 16:23
  • 2
    $\begingroup$ One summer, I and some other high school teachers went to Reno to attend a math refresher class at the university.We asked the prof if there was anything he wanted us to do with our students so they would be better prepared for his classes. His answer was absolute values. We all laughed. I don't think there exists a high school math class that doesn't use absolute values somewhere. I still don't understand why students have such a hard time with them. $\endgroup$ Jul 29, 2015 at 2:03
  • $\begingroup$ I was confused what you meant by the "absolute" function. I think you mean the "absolute value" function... $\endgroup$
    – user541686
    Jul 29, 2015 at 5:46
  • $\begingroup$ I made it abbreviation $\endgroup$
    – Khosrotash
    Jul 29, 2015 at 5:49
  • 6
    $\begingroup$ @Khosrotash It makes people that didn't see this immediately, feel dumber than the rest. $\endgroup$
    – rubenvb
    Jul 29, 2015 at 12:05

5 Answers 5


You can use the fact that, $\max\{x,y\}=\frac{x+y+|x-y|}{2}$.

Therefore, $\max\{x,3x\}=\frac{x+3x+|x-3x|}{2} = \frac{4x+|-2x|}{2} =2x+|x|$.

  • $\begingroup$ When I told this question ,I did not teach them $max\left \{ a,b \right \}=\frac{a+b+|a-b|}{2}$ .Your hint is simple and nice ...also as clear as possible .thank you $\endgroup$
    – Khosrotash
    Jul 28, 2015 at 14:01
  • $\begingroup$ I love second , third ,... solution for problems .Usually I can see the sense of loving mathematics ...in my student eyes ,when I tell another method to solve $\endgroup$
    – Khosrotash
    Jul 28, 2015 at 14:03
  • 1
    $\begingroup$ @Khosrotash, unfortunately all that I ever see in my fellow mates when the teacher mentions another method is them dismissing one of the methods as 'bad' because of its difficulty level. $\endgroup$
    – rah4927
    Jul 28, 2015 at 16:23
  • $\begingroup$ In my opinion, OP's problem could be a nice "introduction" to explain the nice representation of the maximum function given in this answer. $\endgroup$
    – mickep
    Jul 28, 2015 at 20:13
  • $\begingroup$ @Khosrotash You're welcome, I've always found interesting the relation between the $\max$/$\min$ functions and the absolute value (the other relation being $|x|=\max\{x,-x\})$ $\endgroup$
    – yultan
    Jul 29, 2015 at 9:09

I will probably put more emphasis on those transformation properties of the $\max(\cdot)$ function which is reasonably "obvious" and easy to remember/use. For example,

  1. $\max(a+b,a+c) = a + \max(b,c)$.
  2. $\max(ab,ac) = a \max(b,c)$ when $a > 0$.
  3. $\max(a,-a) = |a|$.

This may help a student to get familiar with such "tools" for attacking similar problems.
In any event, once a student knows about above properties, we have

$$\max(x,3x) = \max(2x - x,2x + x) \stackrel{(*1)}{=} 2x + \max(-x,x) \stackrel{(*3)}{=} 2x + |x|$$

  • $\begingroup$ $$max(a,−a)=|a|=a .sgn(a) =\sqrt{a^2}$$ $\endgroup$
    – Khosrotash
    Jul 28, 2015 at 19:20
 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|
  • $\begingroup$ Do you read "yultan' answer ? $\endgroup$
    – Khosrotash
    Jul 29, 2015 at 5:39
  • 2
    $\begingroup$ @Khosrotash Yes I did. He just used the result without showing how it was derived. I can never remember $\max\{x,y\}=\frac{x+y+|x-y|}{2}$ but I do remember how to derive it. $\endgroup$ Jul 29, 2015 at 5:45

I like the question! It is not immediately obvious to me, however, that it suffices to match your form to the given function at three points. Perhaps that is the case, but if so it requires a separate argument. Alternatively, having discovered the final form you could verify it directly.

I would address the original problem this way: Your function, $f$, is $3x$ if $x ≥ 0$ and $x$ if $x < 0$. We know functions that look like that! $g(x) = x + |x|$, for example, is given by $2x$ if $x≥0$ and $0$ if $x<0$. Ah, but that's just almost your function already. All we have to do is add x.

Less formal than your method, clearly, but perhaps it has the advantage of drawing from a list of functions your students may already have looked at. Anyway, it's an alternative!


Note that $f(-x) = -ax + b|x|+ c$, thus breaking into symmetrical and anti symmetrical combinations one obtains $$ f(x) - f(-x) = 2ax\\ f(x) + f(-x) = 2b|x| + 2c $$ Thus $$ a = \frac{f(1) - f(-1)}{2} = \frac{3 + 1}{2} = 2\\ c = f(0) = 0\\ b = \frac{f(1) + f(-1)}{2} - c = \frac{3 - 1}{2} = 1 $$

Second variation of the same idea: $$ f(-x) = \max(-x, -3x) = -\min(x, 3x) $$ so $$ f(x) \pm f(-x) = \max(x, 3x) \mp \min(x, 3x)\\ f(x) + f(-x) = \max(x, 3x) - \min(x, 3x) = |x - 3x| = 2|x|\\ f(x) - f(-x) = \max(x, 3x) + \min(x, 3x) = x + 3x = 4x $$ Comparing with $$ f(x) - f(-x) = 2ax\\ f(x) + f(-x) = 2b|x| + 2c $$ we get $$ a = 2\quad b = 1\quad c = 0 $$

  • $\begingroup$ I don't get , what's difference between my first try and your solving ! $\endgroup$
    – Khosrotash
    Jul 28, 2015 at 13:56
  • $\begingroup$ because ,you use 3 points to find a,b,c at the last $\endgroup$
    – Khosrotash
    Jul 28, 2015 at 13:57
  • $\begingroup$ @Khosrotash, I've updated my answer with evaluation-free solution $\endgroup$
    – uranix
    Jul 28, 2015 at 14:07
  • $\begingroup$ your main idea was "max(−x,−3x)=−min(x,3x)" ? $\endgroup$
    – Khosrotash
    Jul 28, 2015 at 14:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .