Đặt \(f\left(x\right)=2ax+b\) \(\Rightarrow f\left(\frac{x}{2}\right)=ax+b\)
\(\Rightarrow2ax+b+ax+b=-x\) \(\forall x\)
\(\Leftrightarrow\left(3a+1\right)x+2b=0\) \(\forall x\)
\(\Rightarrow\left\{{}\begin{matrix}3a+1=0\\2b=0\end{matrix}\right.\) \(\Rightarrow\left\{{}\begin{matrix}a=-\frac{1}{3}\\b=0\end{matrix}\right.\)
\(\Rightarrow f\left(x\right)=-\frac{2}{3}x\)