I was trying to prove the following:
Prove that if x satisfies $$ x^n+a_{n-1}x^{n-1}+...+a_0 = 0 \tag{1} $$ for a set $(a_{n-1},...,a_0)$ then, x is irrational unless it is an integer.
I am sorry if this is stupid, but, what I did was, firstly, from $(1)$ $$ x^n+a_{n-1}x^{n-1}+...+a_0 = -a_{1} x \tag{2} $$ then $$ x= \frac{-(x^n+a_{n-1}x^{n-1}+...+a_0)}{a_1} \tag{3} $$ so if $x \in \mathbb{Q}$, then $x = \frac{a}{b}$, where clearly, here we have a fraction representing $x$, so how can $x \notin \mathbb{Q}$? Am I just stupid?
Please feel free to change the title and tag if you want to, I don't know what to make of it. Thank you.
If $x\in\Bbb Q$, you can write it as $\frac ab$, with $a\in\Bbb Z$, $b\in\Bbb N$ and $a$ and $b$ coprime. And now\begin{align}x^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0=0&\iff\left(\frac ab\right)^n+a_{n-1}\left(\frac ab\right)^{n-1}+\cdots+a_1\frac ab+a_0=0\\&\iff a^n+a_{n-1}a^{n-1}b+\cdots+a_1ab^{n-1}+a_0b^n=0\\&\iff a^n=b\bigl(-a_{n-1}a^{n-1}-\cdots-a_1ab^{n-2}-a_0b^{n-1}\bigr).\end{align}So, $b\mid a^n$. But $a$ and $b$ are coprime, and therefore $b=1$. So, $x=a\in\Bbb Z$.