0

I got this very nice question from my math teacher, and he insisted that I solve it and propose my solution to the class.

The equation is: $$ x^2-y^2=2025$$

What I have tried to do so far:

  • I factorized it: $(x+y)(x-y)=2025$.
  • I found out the factors of $2025$ and grouper them in its pairs, which are: $$(1,2025), (3,675), (5,405),(9,225),(15,135),(25,81),(27,75),(45,45)$$ But I also realized that we needed to take the negative pairs as well.
  • I replaced $x+y$ with $a$ and $x-y$ with $b$ to get $ab=2025$, where $a$ is one of the factors of 2025 and $b$ being the other. But this is where I got stuck.

I don't know how to take it on from here onwards. I would like some tips and some help please. I was trying to find solutions using the trial-and-error method to find values for $a$ and $b$ which would lead me to two equations in two variables, but I thought there must be some other way to find the solution. I would like such solutions and insights.

Edit: There are, apparently, $16$ solutions to the above equation. If you could provide me with a general solution, then perhaps I will find the rest of the solutions.

Edit 2: I will need an arithmetical solution to this equations and not a graphical one. I have also tried solving the system of equations $x+y=1$ and $x-y=2025$ but can only find one set of solutions for this system.

  • How did you get those substitutions @User ? – ThankYouForFlyingRyanair Feb 28 '25 at 11:46
  • You may be interested in Pythagorean Triple, in here you can extend this like: $m^2-n^2=k \Rightarrow (m^2+n^2)^2-(2mn)^2=k^2$. You can therefore find the (partial) solution by using $m^2-n^2=45 \Rightarrow \cdots$ – RDK Feb 28 '25 at 12:30
  • @RDK, I don't get your method, could you write it down as an answer so that I fully understand it? – ThankYouForFlyingRyanair Feb 28 '25 at 13:18
  • If $(a,b)$ is a solution, then $(-a,b),(-a,-b)$ and $ (a,-b)$ are also slutions. – hamam_Abdallah Feb 28 '25 at 14:00
  • @hamam_Abdallah, according to you, if $a=1013$ and $b=1012$, and $ab=2025$ is indeed a solution, then I also find that $-a \times b$ and $a \times -b$ are not equal to 2025. However, $-a \times -b=2025$. So you are half-right. – ThankYouForFlyingRyanair Feb 28 '25 at 14:33
  • @AnneBauval, I have already gone through the equation in the related question; however, the solution to that question is easier to find as the constant term is only 35 and there are only 2 factor pairs for 35, so only two sets of solutions meaning that there are only 2 simultaneous equations formed. – ThankYouForFlyingRyanair Feb 28 '25 at 14:37
  • In this case, I would need to solve 6 such equations which is why I am asking for an easier way to solve this. – ThankYouForFlyingRyanair Feb 28 '25 at 14:37
  • @ThankYouForFlyingRyanair The method is the same. The number of equations does not make it easier nor harder. I strongly doubt there is an easier method. – Anne Bauval Feb 28 '25 at 14:40
  • There is one, showed by @User which have been deleted and I don't know why. I would do it by the same method but it is not as efficient in this case, which is why I am asking for an easier way. I'm sure there is one. – ThankYouForFlyingRyanair Feb 28 '25 at 14:40
  • @User's comment and some other user's one, both giving the same method as in the linked post (the simplest one), were deleted by a moderator because comments, per the Help Center, are temporary notes which are meant to either request clarification, or to suggest changes which might improve a post. See How do comments work for more information. – Anne Bauval Feb 28 '25 at 14:57
  • FWIW, this usual method to solve $x^2-y^2=n$ shows that the number of integer solutions equals the number $2\sigma_0(n)$ of divisors of $n$ in $\Bbb Z$, namely $8$ if $n=35$, and $30$ if $n=2025$. – Anne Bauval Feb 28 '25 at 14:58
  • @AnneBauval I don't see any mention of the substitution $x=\frac{a+b}{2}$ and $y=\frac{a-b}{2}$ in the other question which, in my opinion, is a much more suitable way to solve this question. So I think User's answer is very useful to me. – ThankYouForFlyingRyanair Feb 28 '25 at 15:14
  • It was only implicit in https://math.stackexchange.com/a/2329304 because, as hinted in the other deleted comment, this is the resolution of an uttermost simple system of linear equations. Actually, your post is essentially a multidupe. Se e.g. https://math.stackexchange.com/questions/328195 and https://math.stackexchange.com/questions/3763707 – Anne Bauval Feb 28 '25 at 15:28
  • @ThankYouForFlyingRyanair $x^2-y^2=(-x)^2-y^2=(-x)^2-(-y)^2$. – hamam_Abdallah Feb 28 '25 at 21:34

2 Answers2

1

(Well, I realized that this solution is quite excessive.)

Before reading ‘till the end, I recommend OP to try this on your own, after understanding the method.

OP’s question is:

$x^2-y^2=2025$. Find all of the integer solutions.

Reminding that $2025=45^2$, we can state that $x^2-y^2=45^2$.

And this is how Pythagorean triple works.

Pythagorean Triple

Scroll down if you’re aware of this.


1. Form of Pythagorean Triple

$$(x, y, z) = (2mn, m^2-n^2, m^2+n^2) \quad (m, n ∈ \Bbb{N}, m>n) $$

is the generalization of $x^2+y^2=z^2$, when $\gcd(x, y, z)=1.$

2. Proof

Let’s say $x^2+y^2=z^2$ for $x, y, z \in \Bbb{N}, \gcd(x, y, z)=1$.

Then we can assume WLOG that $2|x, 2\not|y, 2\not|z$.
(If $2|x, 2|y$, $\gcd(x, y, z) >1$, and if $2\not|x, 2\not|y, x^2+y^2\equiv2(\mod 4)$, so $z^2$ has a contradiction.)

Then, transformation goes like $x^2=z^2-y^2=(z+y)(z-y).$

Since $2\not|z, 2\not|y$, we have $2|(z+y), 2|(z-y)$.

Thus we can say that $\gcd(z+y, z-y)=\gcd(z+y, 2z)=2$.

Letting $z+y=2m^2, z-y=2n^2$ makes $y=m^2-n^2, z=m^2+n^2$, so $x=2mn$ automatically.


Now let’s move on to the OP’s question.

$x^2=y^2+45^2$.

Trivially $2\not|45$, so $m^2-n^2=45$ is the pythagorean triple root for $\gcd(x, y, 45)=1$.

And you can solve $m^2-n^2=k$ for $k|45$, setting

$x=(m^2+n^2)\cdot \dfrac{45}{k}, y=(2mn)\cdot \dfrac{45}{k}.$

The solution(just for OP’s request, spoilered regarding the case you didn’t meant to see the full answer.)

For positive:

$m^2-n^2=(m+n)(m-n)=45$ - $(m, n)=(23, 22), (9, 6), (7, 2)$
$m^2-n^2=(m+n)(m-n)=15$ - $(m, n)=(8, 7), (4, 1)$
$m^2-n^2=(m+n)(m-n)=9$ - $(m, n) = (5, 4)$
$m^2-n^2=(m+n)(m-n)=5$ - $(m, n) = (3, 2)$
$m^2-n^2=(m+n)(m-n)=3$ - $(m, n) = (2, 1)$
$m^2-n^2=(m+n)(m-n)=1$ - No solution.

Each of $(m, n)$ decides $x, y$, by multiplying missing factor.

(i.e. for $m^2-n^2=9$, we have to multiply $\sqrt{5}$ at each $m, n$, so we multiply $5$ at both $x, y$.)

(You can manipulate some signs, or add zero-included solution.)

RDK
  • 3,389
  • 3
    -1: This is frankly overkill, compared to the (now rightly deleted) hints in comments. No knowledge of Pythagorean triples is required to solve $x^2-y^2=n$. Moreover, as also commented, this question was essentially a duplicate. – Anne Bauval Feb 28 '25 at 14:03
  • 1
    @AnneBauval Yes, aware of it, so I began the post with “quite excessive” comment. OP asked me to elaborate more as an answer, so I did it. I didn’t realized that the OP was dupe. – RDK Feb 28 '25 at 14:15
  • So, the first set of solutions that is $(23,22)$ must be multiplied by 25 to get the values for $x$ and $y$? In that case I only get $(575, 550)$. And $575^2-550^2 \neq 2025$? Correct me if I'm wrong. – ThankYouForFlyingRyanair Feb 28 '25 at 14:41
  • $(23, 22)$ is a solution of $k=45$, so no need to multiply. Multiplication is needed when $k \neq 45$, and you need to multiply $\frac{45}{k}$ on each of $x$ and $y$, since when $m^2-n^2=k, m^2\cdot(45/k)-n^2\cdot(45/k)=45=\left(m\cdot\sqrt{45/k}\right)^2-\left(n\cdot\sqrt{45/k}\right)^2$, so $y=2mn\cdot45/k, x=(m^2+n^2)\cdot45/k$. – RDK Feb 28 '25 at 15:03
0

You defined $a = x+y, b = x-y$. That system can be solved to get $x = (a+b)/2, y = (a-b)/2$. So once you know $a$ and $b$ you can derive $x$ and $y$. (In general they need to have the same parity, but all the factors of $2025$ are odd so that's not a problem here.)

For example considering the pair $a = 81, b = 25$ you get $x = 53, y = 28$. The cases where $x$ and/or $y$ are negative fall out naturally here by considering $(a, b) = (25, 81), (-81, -25), (-25, -81)$.

Michael Lugo
  • 24,422