p-1/p=q^2 ---(1)
q(p+1/p)=4 ---(2)
(p+1/p)^2 - (p-1/p)^2 = 4
=> (p+1/p)^2 - q^2 = q(p+1/p) (from eq(1)&eq(2))
Let (P+1/p)=x, then x^2-x*q-q^2=0
yields x=q(1+root(5))/2 or q(1-root(5))/2
sub these in eq(2),
q^2 = 8/(root(5)+1) or 8/(1-root(5))
but 1-root5 is negative, so this cant be equal to q^2
so q = (+/-)√(2*(√5-1))
substiute q^2 = 2*(√5-1) in eq(1) to solve for p
p=(+/-)(√5-1)(+/-)*√(7-2*√5)
That means p can take 4 values and q can take 2 values