This is an exercise handled us by the teacher on a first year math-degree.
The question reads:
Prove that if n,m are odd integers, then the equation $x^2 +2mx+2n=0$ has no rational solutions. Hint: Trying by divisibility, proof first that if it has rational solutions they have to be integers, and then prove that it can't have integer solutions.
My solution is the following:
A Suppose that $x^2+2mx+2n=0$ has a rational solution. Then we can write x=p/q, p/q are coprimes integers, so that x is irreductible. Then, if we substitute: $$(p/q)^2+2m(p/q)+2n=0 \Rightarrow (p/q)^2+2m(p/q)=-2n $$ That tells us that, because $-2n$ has to be an integer, then so has to be the left side. If we rearrenge the left side we have $$\frac{p^2+2mpq}{q^2}=\frac{p(p+2mq)}{q^2}$$ We know that it has to be an integer, so either $q^2 \mid p$ or $q^2 \mid (p+2mq)$. The first one can't be, so $q^2 \mid (p+2mq)$ must be true. If that is true, $$\frac{q(p/q+2m)}{q^2} \quad \textrm{simplifying} \quad \frac{p/q+2m}{q}=k$$ $$\frac{p}{q}+2m=kq$$ That can't be because 2m is an integer, and p/q a rational, and a integer+rational can't equal an integer. That means that $p/q$ can't exist if they don't equal an integer, so if $x$ is a rational, it must be an integer.
B Now we are going to prove that x can't be an integer. For that, we are going to use the fact that $m,n$ are odd.
- Case $1$: $x$ is odd
If $x$ is odd, then $(2k+1)^2+2(m(2k+1))+2n=0 \Rightarrow (2k+1)^2+2(m(2k+1))= -2n$. This can't be because $(2k+1)^2$ is odd, and odd+even=odd, but $-2n$ must be and even integer.
- Case $2$: $x$ is even.
If $x$ is even, then $4k^2+4mk+2n=0 \Rightarrow 2k^2+2mk=-n$, which is also impossible, because $-n$ is odd, and the left side must be an even integer because even+even=even.
With that, we conclude that x can't be an integer, so there are no solutions x such that x is rational. The problem with my solution is that it doesn't use the fact that $m$ is odd, which usually means that I'm overlooking something.
Is the solution correct? Thanks.