Common factor $x^4+6x^2+25$ & $3x^4+4x^2+28x+5$ If $f(x)=x^2+bx+c$ where b,c are Real number and $f(x)$ is a factor of both $x^4+6x^2+25$ &amp; $3x^4+4x^2+28x+5$ then find the value of $f(x)$.

I manage to get the answer by dividing the function by $f(x)$ and substituting the remainder as zero. I managed to get the following

$(x^2-2x+5)(x^2+2x+5)=x^4+6x^2+25$

$(x^2-2x+5)(3x^2+6x+1)=3x^4+4x^2+28x+5$

but i am not satisfied as it is a tedious process.

Is there any short-cut method
$$  \left(   x^{4}  + 6 x^{2}  + 25 \right)  $$ 

$$  \left(  3 x^{4}  + 4 x^{2}  + 28 x  + 5 \right)  $$ 

$$  \left(   x^{4}  + 6 x^{2}  + 25 \right)  =  \left(  3 x^{4}  + 4 x^{2}  + 28 x  + 5 \right)  \cdot \color{magenta}{  \left( \frac{ 1}{3 } \right) } +  \left(   \frac{ 14 x^{2}  - 28 x  + 70 }{ 3 }  \right)  $$ 
 $$  \left(  3 x^{4}  + 4 x^{2}  + 28 x  + 5 \right)  =  \left(   \frac{ 14 x^{2}  - 28 x  + 70 }{ 3 }  \right)  \cdot \color{magenta}{  \left(   \frac{ 9 x^{2}  + 18 x  + 3 }{ 14 }  \right) } +  \left( 0 \right)  $$ 
 $$ \frac{ 0}{1} $$ 
 $$ \frac{ 1}{0} $$ 
 $$ \color{magenta}{  \left( \frac{ 1}{3 } \right) }  \Longrightarrow  \Longrightarrow  \frac{  \left( \frac{ 1}{3 } \right) }{ \left( 1  \right) } $$ 
 $$ \color{magenta}{  \left(   \frac{ 9 x^{2}  + 18 x  + 3 }{ 14 }  \right) }  \Longrightarrow  \Longrightarrow  \frac{  \left(   \frac{ 3 x^{2}  + 6 x  + 15 }{ 14 }  \right) }{ \left(   \frac{ 9 x^{2}  + 18 x  + 3 }{ 14 }  \right) } $$ 
 $$  \left(   x^{2}  + 2 x  + 5 \right)  \left( \frac{ 3}{14 } \right)  -  \left(  3 x^{2}  + 6 x  + 1 \right)  \left( \frac{ 1}{14 } \right)  =  \left( 1  \right)  $$ 
 $$  \left(   x^{4}  + 6 x^{2}  + 25 \right)  =  \left(   x^{2}  + 2 x  + 5 \right)  \cdot \color{magenta}{  \left(   x^{2}  - 2 x  + 5 \right) } +  \left( 0 \right)  $$ 
 $$  \left(  3 x^{4}  + 4 x^{2}  + 28 x  + 5 \right)  =  \left(  3 x^{2}  + 6 x  + 1 \right)  \cdot \color{magenta}{  \left(   x^{2}  - 2 x  + 5 \right) } +  \left( 0 \right)  $$ 
 $$  \mbox{GCD} =   \color{magenta}{  \left(   x^{2}  - 2 x  + 5 \right) }   $$ 
 $$  \left(   x^{4}  + 6 x^{2}  + 25 \right)  \left( \frac{ 3}{14 } \right)  -  \left(  3 x^{4}  + 4 x^{2}  + 28 x  + 5 \right)  \left( \frac{ 1}{14 } \right)  =  \left(   x^{2}  - 2 x  + 5 \right)  $$ 

............
$$x^4+6x^2+25=x^4+10x^2+25-4x^2=(x^2+5)^2-(2x)^2=(x^2+2x+5)(x^2-2x+5).$$
Now, you can check that just $x^2-2x+5$ is a factor of the second polynomial.

If you want factoring of the second without this hint, I am ready to show, but it's not so easy.