\(f\left(x\right)=\left(x^2-1\right)g\left(x\right)+ax+b\)
\(f\left(1\right)=\left(1^2-1\right)g\left(1\right)+a+b=1^{2015}+1^{1945}+1^{1930}-1^2-1+1=2\)
\(f\left(-1\right)=\left(\left(-1\right)^2-1\right)g\left(-1\right)+a\left(-1\right)+b=-1-1+1-1+1+1=0\)
\(\hept{\begin{cases}a+b=2\\-a+b=0\end{cases}}\Leftrightarrow a=b=1\)
Vậy đa thức dư là : x + 1