Finding the CDF given a PDF 
Let $\alpha$, $\beta$ be two fixed positive constants, and define the density (pdf) $$f(x) = \begin{cases} 
\frac{\alpha}{2}e^{\alpha x} & \text{if} x<0\\
\frac{\beta}{2}e^{-\beta x} & \text{if} x\geq 0
\end{cases}$$
  Find the cumulative distribution function (cdf) of $X$.

I am blanking on how to do this again I haven't taken a probability theory course for about 5 years now I thought we just integrate for the two different condtions to get the cdf so essentially I would do
$$\int_{-\infty}^{0}f(x) \ \ \ \text{for} \ \ x < 0$$ 
and $$\int_{0}^{\infty}f(x) \ \ \ \text{for} \ \ x \geq 0$$
If someone could just provide a detailed solution I would greatly appreciate it.
 A: The CDF $F$ is defined by
$$F(x) = \int_{-\infty}^{x}f(t)\text{ d}t$$
for every $x$. As long as $x < 0$, 
$$F(x) = \int_{-\infty}^{x}f(t)\text{ d}t = \int_{-\infty}^{x}\dfrac{\alpha}{2}e^{\alpha t}\text{ d}t\text{.}$$
For $x \geq 0$,
$$F(x) = \int_{-\infty}^{x}f(t)\text{ d}t = \int_{-\infty}^{0}\dfrac{\alpha}{2}e^{\alpha t}\text{ d}t + \int_{0}^{x}\dfrac{\beta}{2}e^{-\beta t}\text{ d}t\text{.}$$
I will leave the integration up to you.
A: $$F_X(x)=\int_{-\infty}^{x}f_X(t)dt= 1_{\{x<0\}}\int_{-\infty}^{x}\frac{\alpha}{2}e^{\alpha t}dt+1_{\{x\ge0\}}\left(\int_{-\infty}^{0}\frac{\alpha}{2}e^{\alpha t}dt+\int_{0}^{x}\frac{\beta}{2}e^{-\beta t}dt\right)= 
1_{\{x<0\}}\frac{1}{2}e^{\alpha x} 
+1_{\{x\ge0\}}\left(\frac{1}{2}+\frac{1}{2}-\frac{1}{2}e^{-\beta x}\right)$$
A: All you need to do is integrate your PDF on $(-\infty,t)$. You will need to separate the integrals at $t=0$ if $t>0$.
$$\int_{-\infty}^t PDF(x)dx$$ assuming $t\leq0$.
$$\int_{-\infty}^0 PDF(x)dx+\int_0^t PDF(x)dx$$ if $t>0$. You use the first piecewise case in the first integral and the second piecewise case in the second integral.
