To find the maximum value of the function \( y = 2 - |x - 3| \), we need to analyze the expression involving the absolute value.
The function \( y = 2 - |x - 3| \) can be interpreted as a transformation of the absolute value function \( y = |x| \), which has its vertex shifted to the point where \( |x - 3| \) is zero.
Step 1: Determine the point where the expression inside the absolute value becomes zero. This happens when \( x - 3 = 0 \) or \( x = 3 \).
Step 2: Substitute \( x = 3 \) into the function to find the value of \( y \) at this point:
\( y = 2 - |x - 3| = 2 - |3 - 3| = 2 - 0 = 2 \)
Step 3: Analyze the function behavior for values of \( x \) around \( 3 \):
- For \( x < 3 \), the expression \( |x - 3| \) increases, causing \( y \) to decrease.
- For \( x > 3 \), the same increasing pattern occurs, keeping \( y \) on the decline.
Thus, the highest point or maximum value of the function is at \( x = 3 \), giving \( y = 2 \).
Therefore, the maximum value of the function is \( 2 \).