How is the expression in 2nd line coming? Can anyone throw some light? Posting the question too, even though it is not important.. it is solution of last part i.e. (ii)(c)
\[ \int_0^{1.5} xf(x)dx + 1.5P(X > 1.5) = \int_0^{\infty} xf(x)dx - \int_{1.5}^{\infty} xf(x)dx + 1.5P(X>1.5)\] \[ = \int_0^{\infty} xf(x)dx - \int_{1.5}^{\infty} xf(x)dx + 1.5\int_{1.5}^{\infty} f(x)dx\] Grouping the last two terms: \[ = \int_0^{\infty} xf(x)dx - \int_{1.5}^{\infty} (x-1.5)f(x)dx \] Let's change the 2nd integral so that the lower limit is 0 rather than 1.5. Since the top limit is \(\infty\) we can leave it be. Now, be careful! By changing the limit(s) we must also change the integrand. We are reducing the limit(s) by 1.5 and so we increase each \(x\) in the integrand by 1.5 (at least this is how I think of it). So \((x-1.5)f(x)\) goes to \(xf(x+1.5)\). So we have: \[ = \int_0^{\infty} xf(x)dx - \int_{0}^{\infty}xf(x+1.5)dx \] \[ = E[X] - \int_{0}^{\infty}xf(x+1.5)dx \]