Question:

Let \(f:\R\rightarrow\R\) be defined by
\(f(x) =   \begin{cases} x & \text{if}\ x\leq1 \\  -x+2 & \text{if}\ x\gt1\end{cases}\)
Then \(\int^{2}_{0}f(x)dx=\)

Updated On: Apr 8, 2025
  • \(\frac{\pi}{2}\)
  • 1
  • 2
  • 4
  • \(\frac{\pi}{6}\)
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Approach Solution - 1

Step 1: Identify the piecewise function and integration limits: \[ f(x) = \begin{cases} x & \text{if } x \leq 1 \\ -x+2 & \text{if } x > 1 \end{cases} \] We need to integrate from 0 to 2.

Step 2: Split the integral at the point where the function definition changes (x=1): \[ \int_{0}^{2} f(x) dx = \int_{0}^{1} x dx + \int_{1}^{2} (-x + 2) dx \]

Step 3: Compute the first integral (0 to 1): \[ \int_{0}^{1} x dx = \left. \frac{x^2}{2} \right|_{0}^{1} = \frac{1}{2} - 0 = \frac{1}{2} \]

Step 4: Compute the second integral (1 to 2): \[ \int_{1}^{2} (-x + 2) dx = \left. \left( -\frac{x^2}{2} + 2x \right) \right|_{1}^{2} \] \[ = \left( -2 + 4 \right) - \left( -\frac{1}{2} + 2 \right) = 2 - \frac{3}{2} = \frac{1}{2} \]

Step 5: Add both results: \[ \frac{1}{2} + \frac{1}{2} = 1 \]

Conclusion: The value of the integral is \(\boxed{B}\) (1).

Was this answer helpful?
0
0
Hide Solution
collegedunia
Verified By Collegedunia

Approach Solution -2

The function \( f(x) \) is defined piecewise. 

We need to split the integral into two parts based on the definition of \( f(x) \):

\[ \int_0^2 f(x) \, dx = \int_0^1 f(x) \, dx + \int_1^2 f(x) \, dx \]

For \( 0 \leq x \leq 1 \), \( f(x) = x \), so

\[ \int_0^1 f(x) \, dx = \int_0^1 x \, dx = \left[ \frac{x^2}{2} \right]_0^1 = \frac{1}{2} \]

For \( 1 < x \leq 2 \), \( f(x) = -x + 2 \), so

\[ \int_1^2 f(x) \, dx = \int_1^2 (-x + 2) \, dx = \left[ -\frac{x^2}{2} + 2x \right]_1^2 = \left( -\frac{4}{2} + 4 \right) - \left( -\frac{1}{2} + 2 \right) = 2 - \frac{3}{2} = \frac{1}{2} \]

Therefore,

\[ \int_0^2 f(x) \, dx = \frac{1}{2} + \frac{1}{2} = 1 \]

Final Answer: The final answer is \( {1} \).

Was this answer helpful?
0
0