I have the following equation: $$x \cdot 14 - \min(x \cdot 14 \cdot 0.0025 + 2, 133) = 280$$
I need to find the value of $x$. What is the preferred approach? I am coming back to math after a long time, am thinking of using piecewise function. In my use case I need to find the $x$ value in an excel sheet also but I am out of ideas so far.
Thanks in advance
You can write $\min(a,b) = \epsilon a + (1-\epsilon)b$, where $\epsilon = 1$ if $a < b$, $\epsilon = 0$ otherwise.
Then the equation is equivalent to
$$14x - \epsilon (14x0.0025+2) - (1-\epsilon)133 = 280$$ $$14x(1-0.0025\epsilon) = 280 + 2\epsilon + 133(1-\epsilon)$$ $$x = \frac{280 + 2\epsilon + 133(1-\epsilon)}{14(1-0.0025\epsilon)}$$
So you can evaluate the expression for $\epsilon = 0,1$ and check if the solution is valid: in this example, $x_0 = \frac{280+133}{14}$ and have to check if it's true that $14x_00.0025+2\geq 133$... false! Then check if for $x_1 = \frac{280+2}{14(1-0.0025)}$ is it true that $14x_10.0025+2 \leq 133$...