Problem: Find all positive integers $x$ and $y$ satisfying: $$12x^4-6x^2+1=y^2.$$

If $x=1, 12x^4-6x^2+1=12-6+1=7,$ which is not a perfect square.

If $x=2, 12x^4-6x^2+1=192-24+1=169=13^2$, which is a perfect square. Thus, $x=2,y=13$ is a solution to the given Diophantine equation.

However, after testing a few more small cases, it seems as if $12x^4-6x^2+1$ can never be a perfect square if $x>2$. I have tried to prove this, but to no avail. Here is the gist of what I considered:

$12x^4-6x^2+1=y^2 \iff 12x^4-6x^2 = (y+1)(y-1)$. Since the L.H.S. is a multiple of $2$, it follows that $2 \mid (y+1)(y-1) \Rightarrow y$ is odd $\Rightarrow y+1$ and $y-1$ are both even.

Hence, $4 \mid (y+1)(y-1) \Rightarrow 4 \mid 12x^4-6x^2 \Rightarrow 4 \mid 6x^2 \Rightarrow x $ is even. Let $x=2m$ and $y+1=2k$, so $12x^4-6x^2=192m^4-24m^2=4k(k-1) \Rightarrow 48m^4-6m^2=k(k-1)$. At this point, I am at a loss of how to continue. We could continue with divisibility arguments, but it seems to be a never-ending process?

Another method I tried was to let $y=x+k$, thus $12x^4-6x^2+1 = x^2 + 2xk+k^2 \iff k^2+2xk-(12x^4-7x^2+1)=0$, which is a quadratic in terms of $k$. However, stuff like the discriminant or sum and product of roots did not seem to yield any important information.

Any hints provided to point me in the right direction will be much appreciated.

  • 1
    $\begingroup$ To check, do you know how to solve the Pell's equation $ 12z^2 - 6z + 1 = y^2$? $\endgroup$
    – Calvin Lin
    Dec 27, 2020 at 17:23
  • 1
    $\begingroup$ WolframAlpha suggest the following solutions here $$S(x,y)\in\{(0,\pm1),(\pm2,\pm13)\}$$ $\endgroup$
    – poetasis
    Dec 28, 2020 at 1:36

3 Answers 3


One approach to solving this Diophantine equation is to use the theory of Pell equations. Notice that if we rearrange the equation, we get:

$$y^2 - 12x^4 = 6x^2 - 1$$

Let's set $u = y + \sqrt{3} \times 2x^2$. Then, we have:

$$u^2 - 3 \times (2x)^4 = 1$$

which is a Pell equation of the form:

$$u^2 - 3 \times (2x)^4 = 1$$

This is a well-known type of Pell equation, which has solutions in integers $u$ and $x$ if and only if the fundamental solution of the equation:

$$u^2 - 3 \times (2x)^4 = 1$$

is found. Let's call the fundamental solution $(u_1, x_1)$.

It can be shown that the fundamental solution $(u_1, x_1)$ can be obtained by taking the continued fraction expansion of $\sqrt{3}$, which is:

$$\sqrt{3} = [1; (1, 2, 1, 2, 1, 2, \cdots)]$$

The fundamental solution is then given by the convergent $[1; (1, 2, 1, 2, 1, 2, \cdots)] = (u_1, x_1)$. In other words:

$$\frac{u_1}{x_1} = 1 + \frac{1}{1 + \frac{1}{2 + \frac{1}{1 + \frac{1}{2 + \frac{1}{(1 + 1/(2 + ...)}}}}}$$

Once we have the fundamental solution, we can find all other solutions $(u_n, x_n)$ by using the recurrence relation:

$$u_n + x_n \sqrt{3} = (u_1 + x_1 \sqrt{3})^n$$

Then, we can solve for $y$ and $x$ in terms of $u$ and $x$:

$$y = (u + 2x^2 \times \sqrt{3})/2$$ $$x = x$$

Note that we only need to consider the solutions where $y$ is positive, since we are given that $x$ and $y$ are both positive integers.

Using this method, we can find all solutions to the given Diophantine equation. For example, the first few solutions are:

$$(x, y) = (2, 13), (7, 181), (26, 3163), (97, 57493), ...$$

which can be verified by substituting them back into the original equation.

Note that this approach may not be as direct as some other methods, but it does provide a systematic way of finding all solutions to the given Diophantine equation.


This is an addition to my previous answer, which by pointed out by Mike doesn't sufficiently solve the problem.

We use the result, $$3(2x-1)^2(2x+1)^2 = (2y-1)(2y+1).$$

We have that $\gcd(2a-1,2a+1)=1$ for positive integer $a$ (by Euclidean Algorithm if you need convincing, however this is trivial enough to state).

It follows that $2y-1$ cannot be divisor to $2x-1$ or $2x+1$ without being divisor to the full square term (in other words, if $2y-1 \vert 2x-1,$ then $2y-1 \vert (2x-1)^2$ and similar). Since it also applies the other way around, it follows that one of the following are true:

  • $2y-1 = 1$ or $2y-1 = 3$
  • $2y-1 = (2x-1)^2$ or $2y-1 = 3(2x-1)^2$
  • $2y-1 = (2x+1)^2$ (cannot be $3(2x+1)^2$ as we must have $2y+1 > 2y-1$)

For the first, we have $y = 1$ or $y=2.$ No $x$ makes this true, so we can simply ignore this case.

The second case (after making $y$ in terms of $x$ and rearranging)

$2y-1 = (2x-1)^2$ gives us the polynomial $4x^4 + 4x^3 - 7x^2 +2x = 0,$ which has roots $-2, 0, 1/2, 1/2.$ None of these are positive integers.

$2y-1 = 3(2x-1)^2$ gives a polynomial with rational roots $1/2,0$ and the rest are irrational.

$2y -1 = (2x+1)^2$ gives us rational roots (-1/2, 0, 2). 2 is thus an answer!

I may have some cases I overlooked but it seems that this can solve it, albeit in a depressingly bashy way.

  • $\begingroup$ These may not exhaust the cases though...why can't e.g., $2y+1$ share factors with both $2x-1$ and $2x+1$? This does look like quite a challenging problem to finish! $\endgroup$
    – Mike
    Dec 28, 2020 at 17:45
  • $\begingroup$ If it shares factors, then we know that $2y-1$ cannot include any of them, as $2y+1$ and $2y-1$ are relatively prime. Hence, $2y-1=1$ and this cannot succeed. I only included the cases in which $2y-1 < 2y+1$ is satisfied and the GCD condition holds true. $\endgroup$
    – mathninja
    Dec 28, 2020 at 17:50
  • 2
    $\begingroup$ This is not clear to me though. Yes $2y-1$ and $2y+1$ are relatively prime, but all this implies is that gcd$(2y-1, A)$ and gcd$(2y+1, A)$ are relatively prime. This and the other conditions imply gcd$(2y-1, 2x-1)$ and gcd $(2y+1, 2x-1)$ is $2x-1$ but both may be large e.g., on the order of $\sqrt{x}$ $\endgroup$
    – Mike
    Dec 28, 2020 at 19:24
  • 1
    $\begingroup$ And of course a priori at least this all could hold simultaneously with $2x+1$ as well; gcd$(2y+1,2x+1)$ and gcd$(2y-1, 2x+1)$ are each large, relatively prime and multiply to $2x+1$. $\endgroup$
    – Mike
    Dec 28, 2020 at 21:09
  • 2
    $\begingroup$ Your claim is not true. Why can't $ 2y - 1 = AB, 2y+1 = CD$ and $3(2x-1)^2 = AC, (2x+1)^2 = BD$? $\endgroup$
    – Calvin Lin
    Dec 29, 2020 at 9:03

We try to get a perfect square term on the LHS.

Note that multiplying both sides by 4 keeps the right side as a square: $$48x^4 - 24x^2 + 4 = (2y)^2$$ Now, completing the square yields: $$3(4x^2 -1)^2 +1 = (2y)^2$$ Try to now find the solutions to $3(2x-1)^2(2x+1)^2 = (2y-1)(2y+1).$

  • 2
    $\begingroup$ I don't think this in and of itself takes on the crux of the problem. It needs more work to be an answer. $\endgroup$
    – Mike
    Dec 28, 2020 at 1:04
  • 1
    $\begingroup$ The factor of 3 really does throw a wrench into things. It is clear that the 2 equations prescribed by $y^2 \pm 2 = z^2$ has no integral solutions, it is not clear to me about the set of integral solutions to each of the two equations prescribed by $z^2 \pm 2 = 3y^2$. $\endgroup$
    – Mike
    Dec 28, 2020 at 1:18
  • 1
    $\begingroup$ I'm not where sure where you got $z^2 \pm 2 = 3y^2$ from, mine should be like $3a^2 + 1 = y^2,$ which has an infinite amount of solutions if i remember correctly. But yes, the 3 changes things, if thats what you meant. Let me put another effort into solvign this one $\endgroup$
    – mathninja
    Dec 28, 2020 at 2:30
  • 1
    $\begingroup$ I did get $z^2 \pm 2 = 3v^2$ from your last equation. You may be able to deduce this from the fact that $2y-1$, $2y+1$ are relatively prime so one must be a square and the other 3 times a square. [I should have used $v$ instead of $y$ to avoid any confusion. $\endgroup$
    – Mike
    Dec 28, 2020 at 2:54
  • 1
    $\begingroup$ Each square factor on the LHS of your last equation is a factor of exactly one of $2y-1$, $2y+1$, and 3 is a factor of exactly one of $2y-1$, $2y+1$. So exactly one of $2y-1$, $2y+1$ is a square $z^2$ and the remaining is $3v^2$ for some integer $v$. $\endgroup$
    – Mike
    Dec 28, 2020 at 3:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .