Min(a, b) expressed in terms of absolute value

  • MHB
  • Thread starter mathdad
  • Start date
In summary, the min() function can be expressed in terms of absolute value as:min(a, b) = (a + b - | a - b |)/2
  • #1
mathdad
1,283
1
Given two real numbers a and b, the notation min(a, b) denotes the smaller of the two numbers. In cases where a = b, then min(a, b) denotes the common value of a and b. It can be shown that min(a, b) can be expressed in terms of absolute value as follows:

min(a, b) = (a + b - | a - b |)/2

Verify this equation in the following case:

a = 6 and b = 1

Solution:

m(6, 1) = (6 + 1 - | 6 - 1 |)/2

m(6, 1) = (7 - | 5 |)/3

min(6, 1) = (7 - 5)/2

m(6, 1) = (2/2)

min(6, 1) = 1

We can say that if a = 6 and b = 1, then the smallest of the two numbers is 1.

Question:

Can this be done with expressions?

For example, if a = 2x and b = 3x, can we use the above equation to find min(a, b)? What about max(a, b)?
 
Mathematics news on Phys.org
  • #2
Before we move onto expressions, do you see how the given formula works? Try simplifying the min() function under the assumptions:

a) \(\displaystyle a<b\)

b) \(\displaystyle b<a\)

c) \(\displaystyle a=b\)

What do you find? Can you put forth a hypothesis for a max() function?
 
  • #3
When b < a

min(a, b) = (a + b - | a - b |)/2

Verify this equation in the following case:

a = 6 and b = 1

Solution:

m(6, 1) = (6 + 1 - | 6 - 1 |)/2

m(6, 1) = (7 - | 5 |)/3

min(6, 1) = (7 - 5)/2

m(6, 1) = (2/2)

min(6, 1) = 1

We can say that if a = 6 and b = 1, then the smallest of the two numbers is 1. The function confirms that b is the minimum value.

When a < b

m(1, 6) = (1 + 6 - | 1 - 6 |)/2

m(1, 6) = (7 - | -5 |)/2

m(1, 6) = (7 - (5))/2

m(1, 6) = 2/2

m(1, 6) = 1

The function confirms that a is the minimum value.

When a = b

m(4, 4) = (4 + 4 - |4 - 4 |)/2

m(4, 4) = (8 - |0|)/2

m(4, 4) = 8/2

m(4, 4) = 4

When a = b, the function shows that both a and b share a common number or value.

I cannot come up with a hypothesis in this case. For me at this level of math, the function is just a plug and chug to confirm a max or min value.
 
  • #4
What I meant was to do something like the following:

We are given:

\(\displaystyle \min(a,b)=\frac{a+b-|a-b|}{2}\)

a) \(\displaystyle a<b\implies a-b<0\)

And so the min() function becomes:

\(\displaystyle \min(a,b)=\frac{a+b+(a-b)}{2}=\frac{2a}{2}=a\)

b) \(\displaystyle b<a\implies 0<a-b\)

And so the min() function becomes:

\(\displaystyle \min(a,b)=\frac{a+b-(a-b)}{2}=\frac{2b}{2}=b\)

c) \(\displaystyle a=b\)

And so the min() function becomes:

\(\displaystyle \min(a,b)=\frac{b+b-(b-b)}{2}=\frac{2b}{2}=b=a\)

About our hypothesis, look at how the min() function behaves in the 3 scenarios above...what do you think we can do the the min() function to get it to be a max() function?
 
  • #5
I'll get back to you later. Happy Father's Day.
 
  • #6
My guess is to maximize the given function we replace subtraction with addition in the numerator.

max(a, b) = (a + b + | a - b |)/2

Yes?
 
  • #7
RTCNTC said:
My guess is to maximize the given function we replace subtraction with addition in the numerator.

max(a, b) = (a + b + | a - b |)/2

Yes?

Test it the way I did for the min() function in post #4...:D
 
  • #8
I do not know how to test it as demonstrated in post 4. Can you show me?
 
  • #9
RTCNTC said:
I do not know how to test it as demonstrated in post 4. Can you show me?

What I meant was to do something like the following:

We are testing:

\(\displaystyle \max(a,b)=\frac{a+b+|a-b|}{2}\)

a) \(\displaystyle a<b\implies a-b<0\)

And so the max() function becomes:

\(\displaystyle \max(a,b)=\frac{a+b-(a-b)}{2}=\frac{2b}{2}=b\quad\checkmark\)

b) \(\displaystyle b<a\implies 0<a-b\)

And so the max() function becomes:

\(\displaystyle \max(a,b)=\frac{a+b+(a-b)}{2}=\frac{2a}{2}=a\quad\checkmark\)

c) \(\displaystyle a=b\)

And so the max() function becomes:

\(\displaystyle \max(a,b)=\frac{b+b+(b-b)}{2}=\frac{2b}{2}=b=a\quad\checkmark\)

So, we conclude our hypothesis is correct in all possible cases.

Suppose we now consider:

\(\displaystyle \min(px,qx)\)

What does the formula give us? How many cases can we check?
 
  • #10
min(px, qx).

min(px, qx) = (px + qx - | px - qx|)/2

min(px, qx) = (pqx - (px - qx))/2

min(px, qx) = (pqx -px + qx)/2

min(px, qx) = x(pq - p + q)/2

I am stuck here.
 
  • #11
RTCNTC said:
min(px, qx).

min(px, qx) = (px + qx - | px - qx|)/2

Okay, I agree we have:

\(\displaystyle \min(px,qx)=\frac{px+qx-|px-qx|}{2}\)

RTCNTC said:
min(px, qx) = (pqx - (px - qx))/2

In your next step, you have somehow combined:

\(\displaystyle px+qx=pqx\)

Which is not true in general, and also you have removed the absolute value without given any conditions on p, q, or x. As our next step, we could write:

\(\displaystyle \min(px,qx)=\frac{(p+q)x-|(p-q)x|}{2}\)

We may use the identity:

\(\displaystyle |uv|=|u||v|\)

(which you should verify using the radical definition for absolute value)

to write:

\(\displaystyle \min(px,qx)=\frac{(p+q)x-|p-q||x|}{2}\)

Okay, now we will have 6 cases to check...looking at the above formula, can you explain the conditions giving rise to all six cases?
 
  • #12
I did not know the rule |vu| = |v| |u|.

You said:

Okay, now we will have 6 cases to check...looking at the above formula, can you explain the conditions giving rise to all six cases?

I don't understand.
 
  • #13
RTCNTC said:
I did not know the rule |vu| = |v| |u|.

You said:

Okay, now we will have 6 cases to check...looking at the above formula, can you explain the conditions giving rise to all six cases?

I don't understand.

If we try to remove the absolute values...what do we need to be concerned about?
 
  • #14
Removing the absolute value bars yields a 0 in the numerator.
 
  • #15
RTCNTC said:
Removing the absolute value bars yields a 0 in the numerator.

How?
 
  • #16
(p + q)x - | p - q ||x|)/2

(p + q)x - (p + q)|x|)/2

[(px + qx) -px -qx]/2

(px + qx - px - qx)/2

0/2

0
 
  • #17
RTCNTC said:
(p + q)x - | p - q ||x|)/2

(p + q)x - (p + q)|x|)/2

[(px + qx) -px -qx]/2

(px + qx - px - qx)/2

0/2

0

How do you justify:

\(\displaystyle |p-q|=p+q\) ?
 
  • #18
I give up! Can you show me what you mean?
 

FAQ: Min(a, b) expressed in terms of absolute value

What is the purpose of using the Min(a, b) function expressed in terms of absolute value?

The Min(a, b) function expressed in terms of absolute value is used to determine the smaller value between two given numbers regardless of their signs. This allows for a more concise and efficient way of comparing two numbers without having to consider their signs separately.

How is the Min(a, b) function expressed in terms of absolute value calculated?

The Min(a, b) function expressed in terms of absolute value is calculated by taking the absolute value of both numbers and then comparing them. The smaller value is then returned as the result. In mathematical notation, it can be written as: Min(a, b) = |a| < |b| ? a : b.

Can the Min(a, b) function expressed in terms of absolute value be used for more than two numbers?

Yes, the Min(a, b) function expressed in terms of absolute value can be used for any number of numbers. It can be extended to include any number of variables by taking the absolute value of each variable and then comparing them to determine the smallest value.

How does the Min(a, b) function expressed in terms of absolute value differ from the traditional Min(a, b) function?

The Min(a, b) function expressed in terms of absolute value differs from the traditional Min(a, b) function in that it considers the absolute values of the given numbers rather than their actual values. This means that the result will always be a positive number, regardless of the signs of the given numbers.

In what situations would using the Min(a, b) function expressed in terms of absolute value be beneficial?

The Min(a, b) function expressed in terms of absolute value would be beneficial in situations where you need to compare two numbers without considering their signs. It can also be useful when working with data that contains both positive and negative values, as it simplifies the comparison process and eliminates the need for separate cases based on the signs of the numbers.

Similar threads

Replies
6
Views
4K
Replies
11
Views
1K
Replies
3
Views
980
Replies
19
Views
2K
Replies
1
Views
1K
Replies
2
Views
991
Replies
2
Views
929
Back
Top