How Can We Prove the Max and Min Formulas Using Basic Algebraic Operations?

  • Thread starter Thread starter Seydlitz
  • Start date Start date
  • Tags Tags
    Formula Max
Seydlitz
Messages
262
Reaction score
4

Homework Statement


The function max will return which number is the largest between the two parameters x and y. The function min will return the smallest number between the two. If the numbers are the same they will give out that same value.

Prove that

<br /> max(x,y) = \frac{x+y+|y-x|}{2}<br /> \\<br /> min(x,y) =\frac{x+y-|y-x|}{2}<br />

Homework Equations



None

The Attempt at a Solution



Suppose ##x=y=0##
<br /> max(0,0) = <br /> \\<br /> \frac{0+0+|0-0|}{2} = 0<br /> <br />
Suppose ##x = a+1## and ##y = a##
<br /> \begin{align*}<br /> max((a+1),a) &amp;= \frac{(a+1)+a+|a-(a+1)|}{2}\\<br /> &amp;=\frac{a+1+a+1}{2}\\<br /> &amp;=\frac{2a+2}{2} \\<br /> &amp;=(a+1) \\<br /> \end{align*}<br />
Where ##x>y##

The similar reasoning can be applied to the case where ##y>x## and to ##min(x,y)## function.

Is this done or enough? I'm not sure if this is already enough for the purpose, to prove a formula. To what extent should we go so that it's correct?

Thank You
 
Physics news on Phys.org
Your special cases, ##x = y = 0## and ##x = a+1, y = a## aren't going to do much for you.

Instead, try considering these two cases: ##x \geq y## and ##x < y##.
 
jbunniii said:
Your special cases, ##x = y = 0## and ##x = a+1, y = a## aren't going to do much for you.

Instead, try considering these two cases: ##x \geq y## and ##x < y##.

Ok considering the given cases, then it is certain that the prove rest on the inequality ##|y-x|## and what happens with it when ##x\geq y## and ##x<y##. I think I can do the symbolic manipulation to prove that it is indeed true.

Though my question is why I've to prove the formula using those cases? What is the difference logically with my a+1 case? (It rests with the fact that ##x>y##) Is it that because they are more general, rather than when a+1?
 
Seydlitz said:
Ok considering the given cases, then it is certain that the prove rest on the inequality ##|y-x|## and what happens with it when ##x\geq y## and ##x<y##. I think I can do the symbolic manipulation to prove that it is indeed true.
Note that I suggested considering these two cases because (1) they are the only possibilities, and (2) the expression ##|y-x|## can be simplified in both cases (try rewriting it without the absolute value).
Though my question is why I've to prove the formula using those cases? What is the difference logically with my a+1 case? (It rests with the fact that ##x>y##) Is it that because they are more general, rather than when a+1?
Yes. Your solution does not cover, for example, the case where ##x = 1## and ##y = 1/2##.
 
jbunniii said:
Note that I suggested considering these two cases because (1) they are the only possibilities, and (2) the expression ##|y-x|## can be simplified in both cases (try rewriting it without the absolute value).

Yes. Your solution does not cover, for example, the case where ##x = 1## and ##y = 1/2##.

Yes the final simplified statement match with the original case once the inequality is changed, say ##|y-x|## to ##(y-x)## if ##x<y##. Thanks for your help.

Ah yes! I really didn't think of that.
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top