5
$\begingroup$

Is it possible to reformulate this expression to only list $x$ and $y$ once using common math functions? The ranges of $x$ and $y$ are both $0$ to $1$ inclusive if that helps.

Common being those typically found on a scientific calculator.

$\endgroup$
1
  • 6
    $\begingroup$ Use the reciprocal $\frac{x+y}{x}=1+\frac yx$ $\endgroup$
    – xxxx036
    Oct 13, 2021 at 23:29

2 Answers 2

5
$\begingroup$

This is slightly more complicated, but $\frac{1}{1+\frac{y}{x}}$ is one possibility.

$\endgroup$
2
  • 1
    $\begingroup$ Not to be a pedant, but I would argue that this is not technically a reformulation, as it doesn't include the possibility of $x = 0$ (which is explicitly included in the question). $\endgroup$ Oct 13, 2021 at 23:38
  • $\begingroup$ if x = 0 then there is no need for reformulaton. $\endgroup$ Oct 13, 2021 at 23:40
4
$\begingroup$

First, if $x=0$ then $$\frac{x}{x+y}=\frac{0}{y}=0$$ provided $y\neq 0$. As $x,y\in[0,1]$, it follows that we exclude the case $x=y=0$. More specially, if $x=0$ then $y\neq 0$ and if $y=0$ then $x\neq 0$. Next, if $x+y\neq 0$ then we may let $$A=\frac{x}{x+y}.$$ Taking the reciprocal of $A$ gives

$$\frac{1}{A}=\frac{x+y}{x}=1+\frac{y}{x}.$$

Then since the reciprocal of the reciprocal is our original function we have

$$A=\frac{1}{\left(\frac{1}{A}\right)}=\frac{1}{1+\frac{y}{x}}.$$ By our analysis above, we see that this is true provided $x\neq 0$ and $x \neq -y$. Since $x,y\in[0,1]$, the second condition is only valid when $x=y=0$ which we excluded.

$\endgroup$
1
  • 1
    $\begingroup$ Indeed it's a simple check for near zero within a tolerance to avoid floating point underflow. :) $\endgroup$
    – Chris
    Oct 31, 2021 at 14:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .