I was asked the following question:
$g\in \mathbb Q[x]$ is a polynomial (not the zero polynomial).
Find $f \in \mathbb Q[x]$ such that $f(x)^2=g(x)^2(x^2+1)$ or show that such an $f$ does not exist.
I really have no idea where to begin and would appreciate all help I can get to solve this.
Hint: Can there exist integers $a$ and $b$ such that $a^2=b^2\cdot p$, where $p$ is a prime number?