Solve
Force the right-hand side to be non-negative first. The left side is an absolute value, so it is . If the inequality is impossible, which gives a hard requirement:
This gate is what makes a variable right-hand side different from a numeric one — skip it and you can pick up phantom solutions.
Replace the bars with a sandwich. For , is equivalent to . With and :
Solve the left half. Expand and collect:
Solve the right half. Subtract and add :
Intersect all three conditions. We need , and simultaneously; the binding constraints are the last two:
Check the endpoints: at , and ; at , and . Outside, gives .
Need to solve a different problem like this? Open the solver →