Question
Quantitative Aptitude Question on Algebra
If x and y satisfy the equations |x | + x + y = 15 and x + |y | − y = 20, then (x − y) equals
5
10
20
15
15
Solution
We have two cases to consider:
Case 1: x≥0 and y≥0 In this case, the equations become: 2x+y=15 x=20
Solving these equations, we get x=20 and y=−35. This case doesn't satisfy the condition y≥0.
Case 2: x<0 and y<0 In this case, the equations become: y=15 x=20
This case also doesn't satisfy the conditions x<0 and y<0.
Case 3: x≥0 and y<0 In this case, the equations become: 2x+y=15 x−2y=20
Solving these equations, we get x=10 and y=−5.
Case 4: x<0 and y≥0 In this case, the equations become: y=15 x+2y=20
Solving these equations, we get x=−10 and y=15.
From the above cases, only the third case satisfies both equations. Therefore, x−y=10−(−5)=15.
So, the value of (x−y) is 15.