Subjects calculus

Piecewise Integral

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Search Solutions

Piecewise Integral


1. **State the problem:** We need to find the definite integral $$\int_{-1}^{4} f(x) \, dx$$ where $$f(x) = \begin{cases} 2x - 1 & \text{for } -1 \leq x \leq 2 \\ 3 & \text{for } 2 < x < 5 \end{cases}$$ 2. **Understand the integral with piecewise function:** Since the function changes at $$x=2$$, split the integral: $$\int_{-1}^{4} f(x) \, dx = \int_{-1}^{2} (2x - 1) \, dx + \int_{2}^{4} 3 \, dx$$ 3. **Calculate the first integral:** Use the formula for integral of a polynomial: $$\int (2x - 1) \, dx = x^2 - x + C$$ Evaluate from $$-1$$ to $$2$$: $$\left[x^2 - x\right]_{-1}^{2} = (2^2 - 2) - ((-1)^2 - (-1)) = (4 - 2) - (1 + 1) = 2 - 2 = 0$$ 4. **Calculate the second integral:** Integral of a constant $$3$$ over $$[2,4]$$ is: $$3 \times (4 - 2) = 3 \times 2 = 6$$ 5. **Add the results:** $$0 + 6 = 6$$ 6. **Final answer:** $$\int_{-1}^{4} f(x) \, dx = 6$$ So, the correct choice is (c) 6.