## Rational Quadratic

#### Problem

Given that `a` and `p` are positive integers and `p` is prime, find the values of `a` for which the following quadratic has rational roots.

`ax`^{2} `px` `p` = 0

#### Solution

Begin by dividing through by `p`: (`a`/`p`)`x`^{2} `x` 1 = 0.

To have rational roots, the discriminant, 4`a`/`p` + 1 = `k`^{2}, where `k` = `r`/`s` and let us suppose that HCF(`r`,`s`) = 1.

4`a`/`p` = `k`^{2} 1 = `r`^{2}/`s`^{2} 1 = (`r`^{2} `s`^{2})/`s`^{2}, giving 4`a` = `p`(`r`^{2} `s`^{2})/`s`^{2}

Clearly 4`a` is integer which can only happen if `s` = 1, as neither `p` nor `r`^{2} is divisible by `s`^{2} for any other value; that is, `k` is integer.

So 4`a`/`p` = `k`^{2} 1 = (`k` + 1)(`k` 1).

This leads to `a` = `p`(`k` + 1)(`k` 1)/4 `k` must be odd, as `a` is integer.

Let `k` = 2`m` + 1, so that `a` = `p`(2`m` + 2)(2`m`)/4 = `pm`(`m` + 1).

That is, for the quadratic to have rational roots, `a` must be a multiple of `p`, moreoever it must be of the form `pm`(`m` + 1).

Prove that the roots will be of the form 1/`c` and -1/(`c` + 1).