Here are two inequalities.

[tex]\[
\begin{array}{l}
-4 \leqslant x \leqslant 2 \\
7 \leqslant x+y \leqslant 12
\end{array}
\][/tex]

[tex]$x$[/tex] and [tex]$y$[/tex] are integers. Work out the greatest possible value of [tex]$y - x$[/tex].



Answer :

To solve the problem of finding the greatest possible value of [tex]\( y - x \)[/tex] given the inequalities:

[tex]\[ -4 \leqslant x \leqslant 2 \quad \text{and} \quad 7 \leqslant x + y \leqslant 12 \][/tex]

where [tex]\( x \)[/tex] and [tex]\( y \)[/tex] are integers, let's break it down step-by-step.

### Step 1: Understand the Range of [tex]\( x \)[/tex]

First, let's identify the possible integer values for [tex]\( x \)[/tex] within the range:

[tex]\[ -4 \leqslant x \leqslant 2 \][/tex]

The possible integer values for [tex]\( x \)[/tex] are: [tex]\(-4, -3, -2, -1, 0, 1, 2\)[/tex].

### Step 2: Determine the Range for [tex]\( y \)[/tex]

For each value of [tex]\( x \)[/tex], calculate the corresponding range for [tex]\( x + y \)[/tex] according to the inequality:

[tex]\[ 7 \leqslant x + y \leqslant 12 \][/tex]

We can rearrange this inequality to find the range of [tex]\( y \)[/tex]:

[tex]\[ 7 - x \leqslant y \leqslant 12 - x \][/tex]

### Step 3: Calculate [tex]\( y - x \)[/tex] for each [tex]\( x \)[/tex]

We will need to find the value of [tex]\( y \)[/tex] that maximizes [tex]\( y - x \)[/tex] for each possible [tex]\( x \)[/tex]. Begin by identifying the maximum integer [tex]\( y \)[/tex] within the determined range for each value of [tex]\( x \)[/tex]:

- For [tex]\( x = -4 \)[/tex]:
[tex]\[ 7 - (-4) \leqslant y \leqslant 12 - (-4) \implies 11 \leqslant y \leqslant 16 \][/tex]
The maximum [tex]\( y \)[/tex] is 16.
[tex]\[ y - x = 16 - (-4) = 20 \][/tex]

- For [tex]\( x = -3 \)[/tex]:
[tex]\[ 7 - (-3) \leqslant y \leqslant 12 - (-3) \implies 10 \leqslant y \leqslant 15 \][/tex]
The maximum [tex]\( y \)[/tex] is 15.
[tex]\[ y - x = 15 - (-3) = 18 \][/tex]

- For [tex]\( x = -2 \)[/tex]:
[tex]\[ 7 - (-2) \leqslant y \leqslant 12 - (-2) \implies 9 \leqslant y \leqslant 14 \][/tex]
The maximum [tex]\( y \)[/tex] is 14.
[tex]\[ y - x = 14 - (-2) = 16 \][/tex]

- For [tex]\( x = -1 \)[/tex]:
[tex]\[ 7 - (-1) \leqslant y \leqslant 12 - (-1) \implies 8 \leqslant y \leqslant 13 \][/tex]
The maximum [tex]\( y \)[/tex] is 13.
[tex]\[ y - x = 13 - (-1) = 14 \][/tex]

- For [tex]\( x = 0 \)[/tex]:
[tex]\[ 7 - 0 \leqslant y \leqslant 12 - 0 \implies 7 \leqslant y \leqslant 12 \][/tex]
The maximum [tex]\( y \)[/tex] is 12.
[tex]\[ y - x = 12 - 0 = 12 \][/tex]

- For [tex]\( x = 1 \)[/tex]:
[tex]\[ 7 - 1 \leqslant y \leqslant 12 - 1 \implies 6 \leqslant y \leqslant 11 \][/tex]
The maximum [tex]\( y \)[/tex] is 11.
[tex]\[ y - x = 11 - 1 = 10 \][/tex]

- For [tex]\( x = 2 \)[/tex]:
[tex]\[ 7 - 2 \leqslant y \leqslant 12 - 2 \implies 5 \leqslant y \leqslant 10 \][/tex]
The maximum [tex]\( y \)[/tex] is 10.
[tex]\[ y - x = 10 - 2 = 8 \][/tex]

### Step 4: Find the Greatest Possible Value of [tex]\( y - x \)[/tex]

From the calculations, we can see that the values of [tex]\( y - x \)[/tex] for each [tex]\( x \)[/tex] are:

- [tex]\( x = -4 \)[/tex]: [tex]\( y - x = 20 \)[/tex]
- [tex]\( x = -3 \)[/tex]: [tex]\( y - x = 18 \)[/tex]
- [tex]\( x = -2 \)[/tex]: [tex]\( y - x = 16 \)[/tex]
- [tex]\( x = -1 \)[/tex]: [tex]\( y - x = 14 \)[/tex]
- [tex]\( x = 0 \)[/tex]: [tex]\( y - x = 12 \)[/tex]
- [tex]\( x = 1 \)[/tex]: [tex]\( y - x = 10 \)[/tex]
- [tex]\( x = 2 \)[/tex]: [tex]\( y - x = 8 \)[/tex]

The greatest possible value of [tex]\( y - x \)[/tex] is therefore:

[tex]\[ \boxed{20} \][/tex]