PDA

View Full Version : Small problem


Barking_Mad
Jan2-08, 12:33 AM
Hey i was wondering if someone could help me express this using standard binary operators.

f(x,y,z)=\frac{max(0, (x-y) )}{z}

i.e. Eliminate the max() function and write it using proper math.

EDIT: max(a,b) simply chooses the largest value of the two variables.

LukeD
Jan2-08, 01:11 AM
What you have there already is valid, but you can use this one if you like it better

Also, note that z cannot be 0 (the first line is just declaring the domain and codomain of f)


f: \mathbb{R} \times \mathbb{R} \times \mathbb{R} \backslash \{0\} \to \mathbb{R}


f(x,y,z) = \left\{
\begin{array} {l l}
\displaystyle{\frac{x-y}{z}} & \text{if} \ x > y \\
0 & \text{else}
\right.

Barking_Mad
Jan2-08, 02:15 AM
hmm yeah, thats not exactly what i was looking for, apologies for lack of clarity.

Im looking for an algebraic expresion of that function, as a fraction or something similar, without the need to use if or else. If that is possible, maybe it isnt.

d_leet
Jan2-08, 02:29 AM
How about

\frac{|x-y|+(x-y)}{2z}

Barking_Mad
Jan2-08, 06:30 AM
ok, now i need to express that without the absolute function, or using polar or complex numbers. Could take me all week.....

Dodo
Jan2-08, 11:50 AM
For the absolute value you could use \sqrt {(x - y)^2} (I smell a computer nearby), but it looks like on overshoot to me.