I need to prove or disprove this:
If $P\in \mathbb R[X]$ polynomial with $P(1)=0$ and $P(-2)=5$ then $\gcd(P,x^2+x-2)=x-1$.
We know that $(x-1)\mid P$ and $(x+2)\nmid P$.
Both $(x-1),(x+2)\mid x+2+x-2$ since $x+2+x-2=(x-1)(x+2)$.
Now if $M\mid S$ and $M\mid T$ then $M\mid\gcd(S,T)$ so $(x-1)\mid\gcd(P,x^2+x-2)$.
I don't really know how to go from here. I think the statement is incorrect but I can't find an example to support that.
Thanks!
One step is left. $(x-1)|\gcd(P,x^2+x-2)$, and $\gcd(P,x^2+x-2)|(x^2+x-2),$ so $\gcd(P,x^2+x-2)$ is either $x-1$, or $(x-1)(x+2).$ As you've noticed, $(x+2)\nmid P$, so $\gcd$ also can't be divisible by $x+2$, so it's $x-1$.