To solve the problem, we need to analyze the function \( f(x) = x - |x - x^2| \) over the interval \([-1, 1]\), determine its continuity, and then sketch its graph.
### Step 1: Break down the absolute value
The expression inside the absolute value is \( x - x^2 \). We need to find where this expression is positive or negative to break down the absolute value.
1. Set \( x - x^2 = 0 \):
\[
x(1 - x) = 0
\]
This gives us the roots \( x = 0 \) and \( x = 1 \).
2. Analyze the sign of \( x - x^2 \):
- For \( x < 0 \): \( x - x^2 < 0 \)
- For \( 0 \leq x < 1 \): \( x - x^2 \geq 0 \)
- For \( x > 1 \): \( x - x^2 < 0 \)
Thus, we can express \( |x - x^2| \) as:
\[
|x - x^2| =
\begin{cases}
-(x - x^2) & \text{if } x < 0 \\
x - x^2 & \text{if } 0 \leq x \leq 1
\end{cases}
\]
### Step 2: Define \( f(x) \) in pieces
Using the information from Step 1, we can write \( f(x) \) as:
\[
f(x) =
\begin{cases}
x - (-(x - x^2)) = x + x - x^2 = 2x - x^2 & \text{if } -1 \leq x < 0 \\
x - (x - x^2) = x^2 & \text{if } 0 \leq x \leq 1
\end{cases}
\]
### Step 3: Write the function explicitly
Thus, the function can be expressed as:
\[
f(x) =
\begin{cases}
2x - x^2 & \text{if } -1 \leq x < 0 \\
x^2 & \text{if } 0 \leq x \leq 1
\end{cases}
\]
### Step 4: Check continuity at \( x = 0 \)
To check continuity at \( x = 0 \), we need to ensure:
1. \( f(0) \) is defined.
2. The left-hand limit (LHL) as \( x \) approaches 0 from the left equals the right-hand limit (RHL) as \( x \) approaches 0 from the right, and both equal \( f(0) \).
- Calculate \( f(0) \):
\[
f(0) = 0^2 = 0
\]
- Calculate LHL:
\[
\text{LHL} = \lim_{x \to 0^-} f(x) = \lim_{x \to 0^-} (2x - x^2) = 2(0) - (0)^2 = 0
\]
- Calculate RHL:
\[
\text{RHL} = \lim_{x \to 0^+} f(x) = \lim_{x \to 0^+} (x^2) = (0)^2 = 0
\]
Since LHL = RHL = \( f(0) = 0 \), the function is continuous at \( x = 0 \).
### Step 5: Discuss continuity on the interval
Since \( f(x) \) is a polynomial function in both pieces (i.e., \( 2x - x^2 \) and \( x^2 \)), and we've shown continuity at the point where the pieces meet, we conclude that \( f(x) \) is continuous on the entire interval \([-1, 1]\).
### Step 6: Sketch the graph
1. For \( -1 \leq x < 0 \), the function \( f(x) = 2x - x^2 \) is a downward-opening parabola.
2. For \( 0 \leq x \leq 1 \), the function \( f(x) = x^2 \) is an upward-opening parabola.
### Final Graph
- The graph will start from \( f(-1) = 2(-1) - (-1)^2 = -2 - 1 = -3 \).
- It will curve upwards until it reaches \( f(0) = 0 \).
- From \( x = 0 \) to \( x = 1 \), the graph will be a parabola starting from \( (0, 0) \) to \( (1, 1) \).