We have,
x2+px+q=0......(1)
x2+qx+p=0......(2)
Letαandβ be the roots of equation (1)
then,
Sumofrootsα+β=−p1=−p
Productofrootsα×β=q1=q
Then,
differnceofroots
(α−β)2=(α+β)2−4αβ
(α−β)2=(−p)2−4q
(α−β)=√p2−4q
Let α1andβ1 be the roots of equation (2)
sumofrootsα1+β1=−q1=−q
Productofrootsα1.β1=p1=p
Then,
differnceofroots
(α1−β1)2=(α1+β1)2−4α1β1
(α1−β1)2=(−q)2−4p
(α1−β1)=√q2−4p
According to given question,
(α−β)=(α1−β1)
√p2−4q=√q2−4p
⇒p2−4q=q2−4p(Squaringbothside)
⇒p2−q2=4q−4p
⇒(p+q)(p−q)=4(q−p)
⇒p+q=−4
⇒p+q+4=0
Hence, this is the answer.