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.

Since $f(t)$ is defined piecewise, you have to be careful with the integral.  This is the source of your mistake.  
If $0 < x < 1$, 
$$F(x) = \int_0^x f(t) dt = \int_0^x t dt = \left.\frac{1}{2}t^2\right|_0^x = \frac{1}{2}x^2,$$
which you have.
However, if $1 \leq x < 2$, then you have to break the integral that yields $F(x)$ up into pieces.  This is 
$$F(x) = \int_0^x f(t) dt = \int_0^1 t dt + \int_1^x (2-t) dt = \left.\frac{1}{2}t^2\right|_0^1 + \left[2t - \frac{1}{2}t^2\right]_1^x $$
$$= \frac{1}{2} + 2x - \frac{1}{2}x^2 - 2 + \frac{1}{2} = 2x - \frac{1}{2}x^2 - 1.$$
Here's where the $-1$ comes in.
This is a common mistake.  If it makes you feel any better, my probability students trip up over this all the time. :)
