0
$\begingroup$

Let $$f(x)=\begin{cases} 0, & x=-1 \\ 1, & x \in (-1,2) \\ -1, & x \in [2,3] \end{cases}$$ then the question is to find out the value of $$\int_{-1}^{3} x\;d(f(x))$$

Here is what I tried $$\begin{aligned} \int_{-1}^3 x\;d(f(x)) &= \int_{-1}^3 xf'(x)\;dx \\ &= xf(x)\Bigr|_{-1}^3 - \int_{-1}^3 f(x)\;dx \\ &= 3 - 1 - \int_{-1}^2 dx + \int_2^3 dx \\ &= 2 - 3 + 1 = 0 \end{aligned}$$

However I am not getting the correct answer. Please help me in this regard. Thanks.

1 Answers 1

2

I think there is a typo in the answer. It should be $$I =xf (x)\mid_{-1}^{3} -\int_{-1}^{3} f (x) dx$$ $$ = [3f (3)-(-1)f (-1)]-\int_{-1}^{3} f (x) dx$$ $$ = [-3-0] -\int_{-1}^{3} f (x) dx $$ and then proceed. Hope it helps.