\(\frac{3x+1}{\left(x+1\right)^3}=\frac{a}{\left(x+1\right)^3}+\frac{b}{\left(x+1\right)^2}\Leftrightarrow\frac{3x+1}{\left(x+1\right)^3}=\frac{a}{\left(x+1\right)^3}+\frac{b.\left(x+1\right)}{\left(x+1\right)^3}\)
\(\Rightarrow\frac{3x+1}{\left(x+1\right)^3}-\frac{a+b.\left(x+1\right)}{\left(x+1\right)^3}=0\)\(\Rightarrow3x+1=a+b.\left(x+1\right)\)
Mà 3x+1=3.(x+1) -2 \(\Rightarrow b=3,a=-2\)