Sorry for the title. I'm sure there is better terminology. I'd be interested to here what that terminology is haha.
Here is my problem:
If x < 40, y = 0.01
If x > 40, y = 0.02
If x > 50, y = 0.03
0 = -1000 + (x-30–[x*y])*50
Solve for $x$ and $y$.
This is a breakeven revenue equation that would normally only include $x$ (price) but now also includes $y$ (a royalty % of price).
I need to do solve this in a way that can be accomplished programmatically with R or VBA.
It was suggested to me that I could make a guess for $y$, solve for $x$, and then again solve for $x$ and so on until I came to an answer for each. Would it not be an infinite loop?
As you said - the best way to solve this would be to loop over all values of $y$, solve for $x$, and then see if $x$ falls within the correct bin. For instance, if you try $y=0.01$, you'll find that $x>50$, so that cannot be a solution. There is no infinite loop.