解:由已知等式,令f(x)=3x+k3x+k=3x-∫[0:1](3x+k)2dxk=-∫[0:1](9x2+6kx+k2)dx=-(3x3+3kx2+k2x)|[0:1]=-[(3·13+3k·12+k2·1)-(3·03+3k·02+k2·0)]=-k2-3k-3k2+4k+3=0(k+1)(k+3)=0k=-1或k=-3函数f(x)的解析式为f(x)=3x-1或f(x)=3x-3