I have the following continuous random variable density function:
$$ f(x) = \begin{cases} \frac14 & if\,0\le x<1 \\ \frac12 & if\,1\le x<2 \\ a & if\,2\le x<4 \\ 0 & \text{the rest} \end{cases}$$
Finding $a$: $$\int_{-\infty}^\infty{f(x)dx}=1 \Rightarrow a=\frac18$$
I am aware that: $$\frac{dF(x)}{dx}=f(x)$$ And thus: $$\int_a^b{f(x)dx}=F(x)+C$$
The graph for $f(x)$ is quite easy. I will upload it when needed or when I find some easy way how to plot here.
I need to find the distribution function $F(x)$ and its graph.
I can do the integrating on the cases in the $f(x)$ and the plotting too with some help of i.e. calculator TABLE function, but I have no idea how to get the integration constant $C$ there. Please help me. Thank You!
Side note: I do not need the definitive answer, but at least please show me the way.
EDIT
The answer has been found in the comments, with the help of André Nicolas
$$ F(x) = \begin{cases} 0 & if\,x<0 \\ \frac14 x & if\,0\le x<1 \\ \frac12 x-\frac14 & if\,1\le x<2 \\ \frac18 x+\frac12 & if\,2\le x<4 \\ 1 & if\,x\ge 4 \end{cases}$$
Lets say, for the interval of $2\le x<4$ the calculation is $F(x)=\int_0^1\frac14 dx+\int_1^2\frac12 dx+\int_2^x\frac18 dx$
Now the new question is, how to plot easily this two graphs in PC (so they can be put here for the future reference)?
EDIT 2
There is one more task associated with this question - to calculate probabilities. Here they are with the answers.
$$P(X<1)=\frac56;\,P(X>-0.5)=\frac{11}{12};\,P(|X|<0.3)=0.3350$$
Now again, I am aware of the formulas for probabilities:
$$P(X<a)=\int_{-\infty}^a f(t)dt$$ $$P(X>b)=\int_b^\infty f(t)dt = 1-F(b)$$
But whatever I put into them, the desired numbers just wont get out. Could you please help me figure out the steps that leads to the given probabilities? Thank You!