Probability: Determining Which Phone Plan Is Better 
A consumer is trying to decide between two long-distance calling plans. The first one charges a flat rate of $10$ cents per minute, whereas the second charges a flat rate of $99$ cents for calls up to 20 minutes in duration and then $10$ cents for each additional minute exceeding 20 (assume that calls lasting a non-integer number of minutes are charged proportionately to a whole-minute’s charge). Suppose the consumer’s distribution of call duration is exponential with parameter.
  
  
*
  
*Which plan is better if expected call duration is 10 minutes? 15 minutes? [Hint: Let $h_1(x)$ denote the cost for the first plan when call duration is x minutes and let $h_2(x)$ be the cost function for the second plan. Give expressions for these two cost functions, and then determine the expected cost for each plan.]
  

For the first function of cost, I got $h_1(x) = 0.10X$; and for the second one, I got the piece-wise function $h_2(x) = .99$ for $0 \le X \le 20$, and $h_2(x) = .99$ for $X > 20$
Are these correct? Also, how do I calculate the expected cost for each plan? I used the formula given in this link http://en.wikipedia.org/wiki/Expected_value#Functional_non-invariance; however, it didn't work.
EDIT: $E[h_1(x)] = lim_{a \rightarrow \infty} \int^a_0 .10x \lambda e^{-\lambda x}dx$
After doing integration by parts, and simplifying, I get to the step $lim_{a \rightarrow \infty}[-.10ae^{-\lambda a} + \frac{.1}{\lambda}(e^{-\lambda a})]$. I know that the second term goes to zero, and, according to my teacher, the first term goes to zero as well, because $e^{-\lambda a}$ goes to zero more quickly than $-.10a$ goes to negative infinity, although I don't really understand why. Note, the answer is not zero
 A: All costs are in dollars.
Your $h_1(X) = 0.1X$ is correct. The second term is 
$$h_2(X) = 0.99 + 0.1(X-20)1_{X > 20}$$
Now if you compute the expected cost, for $\frac{1}{\lambda} = 10$, it is
$\mathbb{E}h_1(X) = \frac{0.1}{\lambda}= 1 $
But for $$\mathbb{E}h_2(X) = 0.99 + 0.1 \mathbb{E}(X-20)1_{X>20}$$
$$= .99 - 2\mathbb{P}(X>20) + .1\mathbb{E}(X1_{X>20})$$
$$= .99 - 2e^{-\lambda 20} + .1\mathbb{E}(X1_{X>20})$$
Thus we just need to compute $\mathbb{E}(X1_{X>20})$.
You could do it directly, but I will provide an alternate way.
$$E[X1_{X>20}] = \int_0^\infty x1_{x>20}f_x(x)dx$$
$$= \int_{x=0}^\infty \int_{u=0}^\infty 1_{u<x}1_{x>20}f_x(x)dudx$$
$$= \int_{u=0}^\infty \int_{x=0}^\infty 1_{u<x}1_{x>20}f_x(x)dudx$$ (Fubini theorem)
$$= \int_{u=0}^\infty \int_{x=u}^\infty 1_{x>20}f_x(x)dxdu$$
$$= \int_{u=0}^\infty \int_{x=\max(u,20)}^\infty f_x(x)dxdu$$
$$= \int_{u=0}^\infty P(X > \max(u,20))du$$
Now split the integral as
$$ = \int_{u=20}^\infty P(X > u)du + \int_{u=0}^{20}P(X > 20)du$$
$$= \int_{20}^\infty e^{-\lambda u}du + \int_{u=0}^{20}e^{-\lambda 20}du$$
I could work out the rest but can you proceed from here? Also in reply to your question: why is $\lim_{x \to \infty} xe^{-x} = 0$, do you know L-Hospital's rule?
