1. **Problem statement:** We need to find the range of values of $a$, with $0 \leq a \leq 5$, for which the integral $$\int_0^a f(x) \, dx$$ is positive.
2. **Understanding the graph:** The function $f(x)$ is defined on $[0,5]$ and consists of three line segments:
- From $x=0$ to $x=1$, $f(x) = 2$ (horizontal line).
- From $x=1$ to $x=2$, $f(x)$ decreases linearly from 2 to -2.
- From $x=2$ to $x=5$, $f(x) = -2$ (horizontal line).
3. **Integral interpretation:** The integral $$\int_0^a f(x) \, dx$$ represents the net area between the curve and the $x$-axis from 0 to $a$. Positive area is above the $x$-axis, negative area is below.
4. **Calculate areas step-by-step:**
- For $0 \leq a \leq 1$:
$$\int_0^a f(x) \, dx = \int_0^a 2 \, dx = 2a$$
This is positive for all $a > 0$.
- For $1 < a \leq 2$:
The integral is the sum of the area from 0 to 1 plus the area from 1 to $a$.
Area from 0 to 1:
$$\int_0^1 2 \, dx = 2 \times 1 = 2$$
Area from 1 to $a$:
Since $f(x)$ decreases linearly from 2 to -2, slope $m = \frac{-2 - 2}{2 - 1} = -4$.
Equation of line segment:
$$f(x) = 2 - 4(x - 1) = 6 - 4x$$
Integral from 1 to $a$:
$$\int_1^a (6 - 4x) \, dx = \left[6x - 2x^2\right]_1^a = (6a - 2a^2) - (6 - 2) = 6a - 2a^2 - 4$$
Total integral from 0 to $a$:
$$2 + (6a - 2a^2 - 4) = 6a - 2a^2 - 2$$
- For $2 < a \leq 5$:
The integral is the sum of the integral from 0 to 2 plus the integral from 2 to $a$.
Calculate integral from 0 to 2:
$$\int_0^1 2 \, dx + \int_1^2 (6 - 4x) \, dx = 2 + \left[6x - 2x^2\right]_1^2 - (6 - 2) = 2 + (12 - 8) - 4 = 2 + 4 - 4 = 2$$
From 2 to $a$, $f(x) = -2$:
$$\int_2^a -2 \, dx = -2(a - 2) = -2a + 4$$
Total integral from 0 to $a$:
$$2 + (-2a + 4) = 6 - 2a$$
5. **Find where the integral is positive:**
- For $0 \leq a \leq 1$:
$$2a > 0 \implies a > 0$$
- For $1 < a \leq 2$:
$$6a - 2a^2 - 2 > 0$$
Divide by 2:
$$3a - a^2 - 1 > 0$$
Rewrite:
$$-a^2 + 3a - 1 > 0$$
Multiply both sides by $-1$ (flip inequality):
$$a^2 - 3a + 1 < 0$$
Solve quadratic inequality:
$$a = \frac{3 \pm \sqrt{9 - 4}}{2} = \frac{3 \pm \sqrt{5}}{2}$$
Approximate roots:
$$a \approx 0.38 \text{ and } 2.62$$
Since $a$ is in $(1,2]$, the inequality holds for $a$ between 0.38 and 2.62, intersected with $(1,2]$ gives $1 < a < 2$.
- For $2 < a \leq 5$:
$$6 - 2a > 0 \implies 2a < 6 \implies a < 3$$
6. **Combine all intervals:**
- From $0 < a \leq 1$, integral positive.
- From $1 < a < 2$, integral positive.
- From $2 < a < 3$, integral positive.
- For $a \geq 3$, integral is zero or negative.
7. **Final answer:**
$$\boxed{0 < a < 3}$$
The integral $$\int_0^a f(x) \, dx$$ is positive for all $a$ in the interval $(0,3)$.
Integral Positivity F05202
Step-by-step solutions with LaTeX - clean, fast, and student-friendly.