p(x)=x4+2x3−x2+ax+b=(q(x))2, for some polynomial q(x)
we know q(x) will be of order 2 so write it as q(x)=q2x2+q1x+q0(q(x))2=q22x4+2q1q2x3+(q21+2q0q2)x2+2q0q1x+q20
and we have equations q22=12q1q2=2(q21+2q0q2)=−12q0q1=aq20=b
clearly q2=±1suppose q2=12q1(1)=2, q1=1(1+2q0(1))=−1q0=−1b=q20=1a=2q0=2
now suppose q2=−12q1(−1)=2, q1=−1(1+2q0(−1))=−1, q0=1b=q20=1a=2(−1)(−1)=2
so in both cases a=2, b=1and a+b=3
I kind of suspect there is a simpler way to solve this.
.