Express maximum as an equation

1. Nov 14, 2007

Crusty

Given variables A and B
How is the maximum of A and B expressed as an equation?
Another way of saying it is how do you express MAXIMUM(A,B) as an equation?

Given variables A,B,C
MAXIMUM(A,B)=C
How do you solve for A?

2. Nov 14, 2007

NeoInTheMatrix

For part 1, you can write a piecewise function but it is just typing out what maximum means.

For the second part, you can't necessarily recover A from C. Suppose that B>A. Then A could be any value less than C.

Last edited: Nov 14, 2007
3. Nov 22, 2007

Crusty

How do you write it piecewise again?

For writing as an equation, I came up with this but it only works when the numbers aren't equal
a*((a-b)/abs(a-b)+1)/2+b*((b-a)/abs(b-a)+1)/2