Step 1: Recall the fundamental property of a Probability Density Function (PDF).
The total area under the curve of a PDF must be equal to 1.
\[ \int_{-\infty}^{\infty} f(x) dx = 1 \]
Step 2: Set up the integral for the given piecewise function.
The total area can be found by integrating over the three separate intervals.
\[ \int_{0}^{2} kx \,dx + \int_{2}^{4} 2k \,dx + \int_{4}^{6} (-kx+6k) \,dx = 1 \]
This can also be solved graphically by calculating the area of the trapezoidal shape.
Area 1 (Triangle, 0 to 2): Base = 2. Height at x=2 is \(k(2) = 2k\). Area = \(\frac{1}{2} \times \text{base} \times \text{height} = \frac{1}{2} \times 2 \times 2k = 2k\).
Area 2 (Rectangle, 2 to 4): Width = 2. Height = \(2k\). Area = \(2 \times 2k = 4k\).
Area 3 (Triangle, 4 to 6): Base = 2. Height at x=4 is \(-k(4)+6k = 2k\). Height at x=6 is \(-k(6)+6k=0\). Area = \(\frac{1}{2} \times 2 \times 2k = 2k\).
Step 3: Sum the areas and solve for k.
Total Area = Area 1 + Area 2 + Area 3
\[ 2k + 4k + 2k = 1 \]
\[ 8k = 1 \]
\[ k = \frac{1}{8} \]