If the roots of an equation are $a,b,c$ then find the equation having roots $\frac{1-a}{a},\frac{1-b}{b},\frac{1-c}{c}$. Actually I have come to know a technique of solving this kind of problem but it's not exactly producing when used in a certain problem. 
Say we have an equation
$$2x^3+3x^2-x+1=0$$
the roots of this equation are $a,b,c$. If I were to find the equation having the roots $\frac{1}{2a}, \frac{1}{2b}$ and $\frac{1}{2c}$ then I can use the root co-efficient relations and use the rule of creating equations from roots.
This gives me the result : $$4x^3 + 2x^2 -3x -1 =0$$
A much much simpler way to solve this math is: if we pick that, $f(x)= 2x^3+3x^2-x+1$ and the values of $x$ are $a,b$ and $c$ then $f\left(\frac{1}{2x}\right)$ will denote an equation (if we just write $f\left(\frac{1}{2x}\right)=0$ ) which has the roots $\frac{1}{2a}, \frac{1}{2b}$ and $\frac{1}{2c}$. And this way the result also matches the result of my previous work.
But now I face an equation
$$x^3+3x+1=0$$ and if the roots are $a,b,c$ then I have to find the equation with the roots $\frac{1-a}{a},\frac{1-b}{b},\frac{1-c}{c}$.
If I use the root-coefficient relations then I have the result
$$x^3+6x^2+9x+5=0$$ (which is correct I think).
But here $f\left(\frac{1-x}{x}\right)= 3x^3-6x^2+3x-1$. So writing $f\left(\frac{1-x}{x}\right)=0$ won't give me the actual equation. 
Where am I mistaking actually?

First consider the polynomial with roots $a,b,c$:
$$g(x)=(x-a)(x-b)(x-c)=x^3-(a+b+c)x^2+(ab+ac+bc)x-abc$$
and let 
$$r=a+b+c \quad\quad s=ab+ac+bc \quad\quad t=abc$$
And we accordingly write
$$g(x)=x^3-rx^2+sx-t$$
Now we multiply the linear factors of the expression having the desired roots:
$$f(x)=\Big(x-\frac{1-a}{a}\Big)\Big(x-\frac{1-b}{b}\Big)\Big(x-\frac{1-c}{c}\Big)$$
$$||$$
$$x^3-\frac{ab + ac+bc-3abc}{abc}x^2+\frac{a+b+c+-2(ab+ac+bc)+3abc}{abc}x-\frac{1-(a+b+c)+ab+ac+bc-abc}{abc}$$
and not that each of the coefficients can be expressed with $r,s,t$. Specifically we observe that
$$f(x)=x^3-\frac{s-3t}{t}x^2+\frac{3t-2s+r}{t}x-\frac{1-r+s-t}{t}$$
