Solve for $x$ when a maximum over $x$ and a constant is involved

66 Views Asked by At

This may be a simple question, but I'm not sure how to find the algebraic solution for a problem like:

$ax=b+\max(cx,d)$

where $a,b,c$, and $d$ are known.

Wolfram-Alpha is not able to give me a solution (lazy, I know), so is it even possible to solve this type of problem algebraically?

Thank you!

4

There are 4 best solutions below

0
On

You just have to break it up into cases and the method really depends on the numbers.

You have two cases:

1) $cx \geq d$. In this case $$ a x = b + c x \Rightarrow x = \frac{b}{a-c}, \text{ and } c x= \frac{bc}{a-c} \geq d$$

2) $cx \leq d$. In this case $$ a x = b + d \Rightarrow x = \frac{b+d}{a}, \text{ and } c x= \frac{c(b+d)}{a} \geq d$$

So if $\frac{bc}{a-c} \geq d$ then first case is valid.

If $\frac{c(b+d)}{a} \geq d$ then second case is valid.

If neither condition holds, there is no solution.

0
On

Supposing that $a-c\not=0$ and $c\gt0$ and $cx\ge d$, you'll get $x\ge d/c$. So, your equation will be

$$ax=b+cx\iff (a-c)x=b\iff x=\frac{b}{a-c}.$$ Now, if this satisfies $x\ge d/c$, then the answer is this. If not, there is no answer in this case.

You can get the other answers (if they exist) in the same way as above. Don't forget to check if the value you get satisfies the condition of $x$ in each case.

0
On

draw graph of the functions for a good understanding.

you see for every $x <\frac{d}{c}$ $$d>cx$$ ie, $max(cx,d)=d$

if $x=\frac{d}{c}$ then $max(cx,d)$ is $d$ or $cx$. for $x>\frac{d}{c}$ , $d<cx$. ie $$max(d,cx)=cx$$ the result is if$x<=\frac{d}{c}$ then $ax=b+d$

if $x>\frac{d}{c}$ then $ax=b+cx$

0
On

Let $\ e = 1\ $ if $\,cx > d\, $ else $\,e = 0.\,$ Then $\ ax = b+max(cx,d) = b+ ecx + (1\!-\!e)d, \ $ thus

$$ x = \frac{b+(1\!-\!e)d}{a-ec}$$