package("polmat")

"Library Polmat successfully loaded."

a:=w+5+1/w: b:=1: q:=4*w+24+4/w:

[x1,x2]:=polmat::care(a,b,q,[w],2^2)

[2*w + 2/w + 12, -2]

a:=w+5+1/w: b:=1: q:=1:

[x1,x2]:=polmat::care(a,b,q,[w],2^2)

[(5*2^(1/2))/4 + 10^(1/2)/4 + 26^(1/2)/2 + (w + 1/w)*((5*2^(1/2))/4 - 10^(1/2)/4 + 1) + 5, (w + 1/w)*(10^(1/2)/4 - (5*2^(1/2))/4 + 1) - 10^(1/2)/4 - 26^(1/2)/2 - (5*2^(1/2))/4 + 5]