2

Given the following equation:

$$a=\max[\min(c,gy+s),f]$$

where $a$, $c$, $y$, $s$ and $f$ are real numbers.

I would like to get $y$ in closed form moving variables from the right-hand side to the left-hand side of the above equation.

Is it possible and how?

Lisa Ann
  • 145

2 Answers2

2

Hint: try to prove that

1. $$\min\{a,b\}=\frac{a+b-|a-b|}{2}$$

2.

$$\max\{a,b\}=\frac{a+b+|a-b|}{2}$$

Added:

Here is an expression for $\max\{\min\{c,gy+s\},f\}$:

$$a=\max\{\min\{c,gy+s\},f\}=\max\{\frac{c+gy+s-|c-gy-s|}{2}, f\}$$

$$=\frac{\frac{c+gy+s-|c-gy-s|}{2}+f+|\frac{c+gy+s-|c-gy-s|}{2}-f|}{2}$$

Salech Alhasov
  • 6,780
  • 2
  • 29
  • 47
2

You can't, because whenever $f>gy+s$ (whatever the value of $y$) then $a=f$ so there is no way to invert.

One could say, more formally, that the functions $x\to\max(x,c)$ and $x\to\min(x, c)$ are not invertible, so there is no general way to find the inverse.

If you are able to spearate your domain into different parts, then it would be different, as you would analyze each of the different cases:

Suppose first that $f < c$, so $f ≤ a ≤ c$.

  1. $f < a < c$. From $f<a$, one can deduce that $a = \min(c,gy+s)$ and from $a<c$ one can deduce that $a=gy+s$.

  2. $a = f < c$. Then $a = f = \max(\min(c,gy+s), f)$, so you deduce that $f ≥ \min(c,gy+s)$ which means that either $f ≥ c$ (against our hypothesis) or $f ≥ gy+s$. That's the best you can get in this case.

  3. $f < c = a$. Then, being $a\neq f$, $a = c = \min(c,gy+s)$ so $c = \min(c,gy+s)$, so $c≤gy+s$.

Now suppose $f ≥ c$. Then $f ≥ \min(c, gy+s)$ so $a=f$. No further information can be deduced about $g$, $y$ or $s$.

rewritten
  • 3,092