Find the cdf associated with each pdf (NOT transformation) Find the cdc associated with each pdf:
a) f(x) = 3(1-x)^2 , 0 < x < 1 , zero elsewhere
b) f(x) = 1/x^2 , -infinity < x < infinity
The answers are 
a) 1-(1-x)^3 , 0 <= x < 1
b) 1 - (1/x) , 1 <= x < infinity
I tried integrating the functions of the pdf's but for problem a I got x^3 - 3x^2 + 9x
 A: a) For $x$ in the interval from $0$ to $1$, we want $\int_0^x 3(1-t)^2\,dt$. One way to evaluate is to make the substitution $1-t=u$.  Then $dt=-du$ and after not much manipulation we end up at
$$\int_{u=1-x}^{1} 3u^2\,du.$$
The rest of the calculation is straightforward. 
Alternately, we can expand $3(1-t)^2$, getting $3-6t+3t^2$ and integrate from $0$ to $x$. We get $3x-3x^2+x^3$. That is a perfectly good answer. Yours was close to this, there was a minor slip somewhere. 
Note that for completeness we should say that the cumulative distribution function is $0$ for $x\le 0$ and $1$ for $x\ge 1$.
b) For the cdf, we need to find
$$\int_{-\infty}^x\frac{1}{\pi}\cdot \frac{1}{1+t^2}\,dt.$$
An antiderivative of $\frac{1}{1+t^2}$ is $\arctan t$. "Plug in." We need to know that $\lim_{y\to-\infty}\arctan y=-\frac{\pi}{2}$. So the cdf is given by
$$\frac{1}{\pi}\left(\arctan x-(-\pi/2)\right).$$
Remark: The answer you quote for b) is the answer to an entirely different problem, where the density function is $\frac{1}{x^2}$ for $x\gt 1$, and $0$ elsewhere.  
Added: In general, suppose that the random variable $X$ has density function $f_X(x)$. Then by definition, the cumulative distribution function $F_X(x)$ is equal to $\Pr(X\le x)$. Thus
$$F_X(x)=\int_{-\infty}^x f_X(t)\,dt.\tag{1}$$
(Many people use $x$ also for the dummy variable of integration. For the sake of clarity, I am using $t$.)
The formula (1) is general. Let us apply it to Problem a).
If $x\le 0$, the integral (1) is the integral of $0$ from $-\infty$ to $x$, so the result is $0$.
If $0\lt x\lt 1$, then the integral (1) is the integral of $0$ from $-\infty$ to $0$ (which is $0$) plus the integral of $3(1-t)^2$ from $0$ to $x$. This turned out to be $1-(1-x)^3$.
Finally, note that $\int_0^1 3(1-t)^2\,dt=1$. So if $x\ge 1$, the integral (1) is the integral from $-\infty$ to $0$ (which is $0$) plus the integral of $3(1-t)^2$ from $0$ to $1$, which is $1$, plus the integral of $0$ from $1$ to $x$, which is $0$, for a total of $1$. 
In probability, piecewise defined functions much more often than in other standard applications of calculus. But apart from that, when we are computing the cumulative distribution function, all we are doing is integrating. 
