Function

f[x_]:= x^2;

dfdx[x_]:= D[f[x],x];

g[x_]:= Evaluate[dfdx[x]];

Plot[g[x],{x,0,1}];