After a long time without having touch anything related to maths or statistics, I decided to give myself another chance. I am currently refreshing some concepts of density and distribution functions, and I'm now facing a little misconception. Briefly, I have this density function:
\begin{cases} 0 & \text x < 0\\ 2x/(1+x^2 )^2 & \text{x ≥ 0} \end{cases}
from which I have obtained the following distribution function after calculating the integrate:
\begin{cases} 0 & \text x < 0\\ -1/(1+x)^2 & \text{x ≥ 0} \end{cases}
My problem is that I'm trying to plot the distribution function using R, but since the distribution function is negative, I'm not sure if it is correct (shouldn´t it be positive?) and which would be the best way to plot it (of course, I'm a R newby too).
Thank you in advance.