We calculate the area enclosed by the curves \(y = x|x|\) and \(y = x - |x|\) by analyzing their forms and intersections.
Step 1: Rewrite the curves
1. For \(y = x|x|\):
\[ y = \begin{cases} x^2 & \text{if } x \geq 0, \\ -x^2 & \text{if } x < 0. \end{cases} \]
This represents a parabola opening upwards in the first quadrant and downwards in the second quadrant.
2. For \(y = x - |x|\):
\[ y = \begin{cases} 0 & \text{if } x \geq 0, \\ 2x & \text{if } x < 0. \end{cases} \]
This represents the x-axis for \(x \geq 0\) and a line with slope 2 for \(x < 0\).
Step 2: Intersection points
In the second quadrant (\(x < 0\)), solve for the intersection points by setting:
\[ x|x| = x - |x| \implies -x^2 = 2x \quad (\text{as } x < 0, \text{ so } |x| = -x). \]
Factorize:
\[ x(x + 2) = 0 \implies x = 0 \text{ or } x = -2. \]
Thus, the curves intersect at \(x = -2\) and \(x = 0\).
Step 3: Define the enclosed area
The enclosed area is the integral of the difference between the upper curve \(y = -x^2\) and the lower curve \(y = 2x\), over the interval \(x \in [-2, 0]\):
\[ A = \int_{-2}^0 \left[(-x^2) - (2x)\right] dx. \]
Simplify:
\[ A = \int_{-2}^0 \left(-x^2 - 2x\right) dx. \]
Step 4: Compute the integral
Evaluate term by term:
\[ \int -x^2 dx = -\frac{x^3}{3}, \quad \int -2x dx = -x^2. \]
Thus:
\[ A = \left[ -\frac{x^3}{3} \right]_{-2}^0 + \left[ -x^2 \right]_{-2}^0. \]
Step 5: Evaluate at bounds
1. For \(\left[-\frac{x^3}{3}\right]_{-2}^0\):
\[ \left(-\frac{0^3}{3}\right) - \left(-\frac{(-2)^3}{3}\right) = 0 + \frac{-8}{3} = \frac{8}{3}. \]
2. For \(\left[-x^2\right]_{-2}^0\):
\[ -(0^2) + (-(-2)^2) = 0 - 4 = -4. \]
Combine these:
\[ A = \frac{8}{3} - 4. \]
Simplify:
\[ A = \frac{8}{3} - \frac{12}{3} = \frac{4}{3}. \]
Final Answer: The enclosed area is:
\[ \boxed{\frac{4}{3}} \]