Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose that we have following quadratic equation containing some constant $a$ $$ax^2-(1-2a)x+a-2=0.$$ We have to find all integers $a$,for which this equation has rational roots.

First I have tried to determine for which $a$ this equation has a real solution, so I calculated the discriminant (also I guessed that $a$ must not be equal to zero, because in this situation it would be a linear form, namely $-x-2=0$ with the trivial solution $x=-2$).

So $$D=(1-2a)^2-4a(a-2)$$ if we simplify,we get $$D=1-4a+4a^2-4a^2+8a=1+4a$$

So we have the roots: $x_1=(1-2a)-\frac{\sqrt{1+4a})}{2a}$ and $x_2=(1-2a)+\frac{\sqrt{1+4a})}{2a}$

Because we are interesting in rational numbers, it is clear that $\sqrt{1+4a}$ must be a perfect square, because $a=0$ I think is not included in solution set,then what i have tried is use $a=2$,$a=6$,$a=12$,but are they the only solutions which I need or how can I find all values of $a$?

share|cite|improve this question
I have edited both the formulas and the spelling. Sometimes I changed some words when I thought it made more sense. Please check whether everything is ok with you. – Simon Markett Jun 26 '12 at 9:52
up vote 3 down vote accepted

Edited in response to Simon's comment.

Take any odd number; you can write it as $2m+1$, for some integer $m$; its square is $4m^2+4m+1$; so if $a=m^2+m$ then, no matter what $m$ is, you get rational roots.

share|cite|improve this answer
if $m=1$ then $a=8$ but $1+4*8=33$ but square root of 33 is not rational – dato datuashvili Jun 26 '12 at 9:35
so maybe you mean $a=4*m^2+4*m+1$? – dato datuashvili Jun 26 '12 at 9:39
There is just one 4 to many. In the question you have $4a$ and the answer is for $a$ instead. So $a=m^2+m$ – Simon Markett Jun 26 '12 at 9:40
yes i see thanks – dato datuashvili Jun 26 '12 at 9:41

put $4a+1=m^2$ for some $m$, then $4a=(m+1)(m-1)$.Now, $m$ must be odd otherwise RHS won't be divisible by 4.Let $m=2k+1$,it gives $4a+1=4k^2+4k+1 \implies a=k(k+1)$. So Put $k=1,2,3,$ and so on, you will get the required values of $a$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.