Calculating probability with a piecewise density function I tried solving this, and I am pretty sure I am integrating this correctly, however, my solution manual shows -1 in the equation when doing this and I do not know why.  The answer in the solution manual is correct.
Problem: Find the corresponding distribution function and use it to determine the probability that a random variable having the distribution function will take on a value between 0.4 and 1.6.
f(x) = x for 0 < x < 1
       2-x for 1 <= x < 2
       0 elsewhere

so for F(0.4 < x < 1.6) I did after integrating:
2(1.6) - [(1.6)^2 / 2] - [(0.4)^2 / 2] = 1.84
however the correct answer is 0.84.  The solution manual has a -1 in their equation, but I do not know how they got it.

First, probabilities are from $0$ to $1$, so you're certainly wrong.
Second, you calculated the cdf incorrectly for the interval $1 \leq x < 2$. It should be $$F(x) = \int_0^1 t \, \mathrm{d}t + \int_1^x 2-t \, \mathrm{d}t.$$ You forgot the first part, and integrated the second part from $0$ instead of from $1$. Since $$\int_0^1 t \, \mathrm{d}t = 1/2$$ whereas $$\int_0^1 2-t \, \mathrm{d}t = 3/2,$$ you counter $1/2$ too little and $3/2$ too much, for a total gain of $+1$.
