Find whole number solutions

1.3k Views Asked by At

Sorry if this is a dupe or too basic, the similar questions seemed to have extra requisites tacked on. Background: Solving the Cheryl's birthday riddle sequel maybe I'm on the right track, maybe not, though there might be some more elegant way to think about it. No hints please.

Is there a procedure to find all whole number solutions for

$$\sqrt{\frac{x^2}{16}-36}$$

I've found x = 24 (root) and x = 40 and want to find the next positive one, systematically. Preferably not by stacs* for the specific numbers up there but for something general like $\sqrt{\frac{x^2}{a}-b}$.

*smart tricks and coincidences

1

There are 1 best solutions below

3
On BEST ANSWER

This is what is known as a Diophantine equation.

Your general case related to Pell's equation which is $x^2-Dy^2=\pm1$. For non-square number values of $D$ this has been shown to have solution related to the continuous fraction of $\sqrt{D}$. (If $D$ is a square it can be solved using more elementary techniques I'll demonstrate below.) The more generalized form of $x^2-Dy^2=c$ has solutions for some situations but not all.

Seeing the link:

$$n=\sqrt{\frac{x^2}{a}-b}$$

$$n^2=\frac{x^2}{a}-b$$

$$ab=x^2-a\cdot n^2$$

So for some values of $a$ and $b$ this can be solved and for others it can't.

Special Case

If your $a$ is a perfect square, say $a=c^2$ then sub it in and rearrange to get:

$$bc^2=x^2-(cn)^2$$

$$bc^2=(x+cn)(x-cn)$$

So you need two numbers which multiply to give a total of $bc^2$. Find all factors of $bc^2$, say $d$ and $e$. You want them to both be divisible by $c$ and have the same parity (i.e. both even or both odd) after dividing by $c$ to avoid non-integer solutions because solving $x+cn=d$ and $x-cn=e$ gives $x=\frac{d+e}{2}$ and $n=\frac{d-e}{2c}$.

Final Note: For your specific situation of $\sqrt{\frac{x^2}{16}-36}$ you have found all the positive solutions. The negative values of $x=-24$ and $x=-40$ also work due to the squaring nature of the problem. This can be seen as follows:

$$16\cdot36=x^2-16n^2$$

$$4^2\cdot36=(x+4n)(x-4n)$$

Next look for all pairs of numbers which multiple to give $4^2\cdot36$ which also divide by 4 (which is why I've left the $4^2$ at the front). Going through all the possible combinations gives:

  • $x+4n=4\cdot18$ and $x-4n=4\cdot2$ which gives $x=40$ and $n=8$

  • $x+4n=4\cdot6$ and $x-4n=4\cdot6$ which gives $x=24$ and $n=0$

  • $x+4n=4\cdot-2$ and $x-4n=4\cdot-18$ which gives $x=-40$ and $n=8$

  • $x+4n=4\cdot-6$ and $x-4n=4\cdot-6$ which gives $x=-24$ and $n=0$

Note that all other choices for splitting up $4^2\cdot36$ gives non-integer answers. e.g. $x+4n=32$ and $x=18$ gives $x=25$ and $n=\frac{7}{4}$.