Question:medium

If \( x \) and \( y \) satisfy the equations
\(|x| + x + y = 15 \quad \text{(1)},\)
\(x + |y| - y = 20 \quad \text{(2)}.\)
Find the value of \( x - y \).

Updated On: Nov 24, 2025
Hide Solution

Correct Answer: 15

Solution and Explanation

Step 1: Analyze the first equation \( |x| + x + y = 15 \)}Nbsp;

Since \( |x| \) equals \( x \) when \( x \) is non-negative and \( -x \) when \( x \) is negative, we consider two cases:

  • If \( x \geq 0 \), then \( |x| = x \). Substituting this into the equation gives:
    \(x + x + y = 15 \implies 2x + y = 15. \quad \text{(3)}\)
  • IfNbsp;\(x < 0\), then \( |x| = -x \). Substituting this into the equation gives:
    Nbsp; Nbsp;\(-x + x + y = 15 \implies y = 15. \quad \text{(4)}\)
    Nbsp;

Step 2: Analyze the second equation \( x + |y| - y = 20 \)}

Similarly, the term \( |y| \) behaves differently based on the sign of \( y \):

  • If \( y \geq 0 \), then \( |y| = y \). Substituting this into the equation gives:
    Nbsp;\(x + y - y = 20 \implies x = 20. \quad \text{(5)}\)
  • IfNbsp;\(y < 0\), then \( |y| = -y \). Substituting this into the equation gives:
    Nbsp;Nbsp;\(x - y - y = 20 \implies x - 2y = 20. \quad \text{(6)}\)

Step 3: Solve for \( x \) and \( y \) by considering all possible cases.

Case 1: \( x \geq 0 \) and \( y \geq 0 \)

We use Equation (3) and Equation (5):
\(2x + y = 15.\)
\(x = 20.\)

Substituting \( x = 20 \) into \( 2x + y = 15 \):
\(2(20) + y = 15 \implies 40 + y = 15 \implies y = -25.\)

This result, \( y = -25 \), contradicts our initial assumption that \( y \geq 0 \). Therefore, this case yields no valid solution.

Case 2: \( x \geq 0 \) andNbsp;\(y < 0\)

We use Equation (3) and Equation (6):
\(2x + y = 15.\)
\(x - 2y = 20.\)

To solve this system:

1. Rearrange Equation (3) to express \( y \) in terms of \( x \):
\(y = 15 - 2x. \quad \text{(7)}\)

2. Substitute this expression for \( y \) into Equation (6):
\(x - 2(15 - 2x) = 20.\)

Simplify and solve for \( x \):
\(x - 30 + 4x = 20 \implies 5x - 30 = 20 \implies 5x = 50 \implies x = 10.\)

Now, substitute \( x = 10 \) back into Equation (7) to find \( y \):
\(y = 15 - 2(10) = 15 - 20 = -5.\)

This solution \( x = 10, y = -5 \) is consistent with our assumptions for this case (\( x \geq 0 \) and \( y<0 \)).

Step 4: Calculate \( x - y \).

Using the values found, \( x = 10 \) and \( y = -5 \):
\(x - y = 10 - (-5) = 10 + 5 = 15.\)
Final Answer:Nbsp;\(x - y = 15.\)

Was this answer helpful?
1

Top Questions on Algebra