# CDF from PDF of a function

I have this problem where I need to graph the CDF, for that I need to find the constant $$c$$. The formula below is a PDF:

$$f(x) = c(x^2+1)\space\space\space if\space X \in [0,1];\space$$ otherwise $$0$$

My attempt: $$P(0\leq X \leq 1) = \int_0^1c*(x^2+1) = 1 \Rightarrow cx+\frac {cx^3}3 = 1 \Rightarrow c = 3/4$$

The problem here is that when we put $$x=1$$ we get $$f(1) = \frac 32 > 1$$, which is wrong as probability cannot be higher than $$1$$. I need to construct the CDF, but because of that, I cannot do it.

The CDF cannot exceed $$1$$, but the PDF can. Your CDF is $$\frac{3}{4}x+\frac{1}{4}x^3$$ on $$[0,\,1]$$, just as you calculated.
• Indeed. The CDF is $F(x)~{=\mathbf 1_{0\leq x\lt 1}~\int_0^x c~(s^2+1)~\mathrm d s+\mathbf 1_{1\leq x}\\= \tfrac 34(\tfrac 13x^3+x)~\mathbf 1_{0\leq x\lt 1}+\mathbf 1_{1\leq x}}$ – Graham Kemp Mar 21 at 21:47