A Discerning Function

Algebra Level 3

f ( x , y ) = x + y 2 + x y 2 f(x,y)=\frac{x+y}{2}+\frac{|x-y|}{2}

What is the output of the function above?

Whichever is lower, x x or y y Depends on whether x x and y y are positive or negative Whichever is higher, x x or y y The average of x x and y y

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Nicholas James
Mar 15, 2017

x + y 2 \frac{x+y}{2} is the average of the numbers x x and y y . Geometrically, this is the point that is halfway between x x and y y ;

x y |x-y| is the difference beteeen x x and y y . x y 2 \frac{|x-y|}{2} is half of this distance. Geometrically, if we add this to the average of x x and y y , we will end up whichever is the highest: x x or y y .


Extension

How could you alter the function to output the lower of the two inputs?

Hi there. You could alter the function as follows so that it outputs the lower of the two inputs: f ( x , y ) = x + y 2 x y 2 f(x,y) = \frac{x+y}{2}-\frac{|x-y|}{2}

James Wilson - 5 months, 1 week ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...