I need to get integer solutions for the next equation: $$x^{2}-y^{4}=336$$ I know equations that look like $x^{2}-y^{2}=n$ have solutions $x$ and $y$ where $x=\frac{a+b}{2}$ and $y=\frac{a-b}{2}$, $a$ and $b$ being both odd or even. But I can not figure out how to solve the equation.
2026-04-07 06:12:08.1775542328
Getting integer solutions for equation $x^{2}-y^{4}=336$
319 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
3
From $$x^2 - y^4 = 336 \iff (x - y^2)(x + y^2) = 336$$ we note that:
The divisor pairs of $336$ are $$(1,\ 336),\ (2,\ 168),\ (3,\ 112),\ (4,\ 84),\ (6,\ 56),\ (7,\ 48),\ (8,\ 42),(12,\ 28),\ (14,\ 24),\ (16,\ 21)$$ and applying condition $(2)$ we reduce them down to $$(2,\ 168),\ (4,\ 84),\ (6,\ 56),\ (8,\ 42),\ (12,\ 28),\ (14,\ 24).$$
Now, if you know the sum and the difference of two quantities you can go back to the original quantities. Applying this observation to the above pairs yields $$(85,\ 83),\ (44,\ 40),\ (31,\ 25),\ (25,\ 17),\ (20,\ 8),\ (19,\ 5).$$ Those are $x$ and $y^2$ respectively. Since the second member of the pair must be a perfect square the only candidate left is $$(31,\ 25),$$ that is, $x = 31$ and $y = 5$. You can check that this is the only solution.
Note: I included only the solutions with $x, y \in \mathbb N$. It is trivial to extend the result to $\mathbb Z$.
As an aid for myself I wrote this Haskell program. Maybe someone will find it interesting: https://gist.github.com/rubik/47436a726143393e3d20