Solving a max() Function with Binary Operators

AI Thread Summary
The discussion focuses on expressing the function f(x,y,z) = max(0, (x-y))/z using standard binary operators without relying on the max() function. Participants clarify that max(a,b) selects the larger of two values and suggest an initial valid expression. The user seeks an algebraic representation without conditional statements or absolute values, leading to a proposed expression involving absolute values. Further suggestions include using square roots to eliminate the absolute function, but concerns about complexity arise. The conversation highlights the challenge of reformulating the function while adhering to the specified constraints.
Barking_Mad
Messages
11
Reaction score
0
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.
 
Mathematics news on Phys.org
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)

<br /> f: \mathbb{R} \times \mathbb{R} \times \mathbb{R} \backslash \{0\} \to \mathbb{R}
<br /> <br /> f(x,y,z) = \left\{<br /> \begin{array} {l l}<br /> \displaystyle{\frac{x-y}{z}} &amp; \text{if} \ x &gt; y \\<br /> 0 &amp; \text{else}<br /> \right.<br />
 
hmm yeah, that's 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.
 
How about

\frac{|x-y|+(x-y)}{2z}
 
ok, now i need to express that without the absolute function, or using polar or complex numbers. Could take me all week...
 
For the absolute value you could use \sqrt {(x - y)^2} (I smell a computer nearby), but it looks like on overshoot to me.
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Back
Top