<s>[INST] Find all positive integers s.t. $\frac{1}{a^2} - \frac{1}{b^2} = \frac{1}{c^2} - \frac{1}{d^2}$ Find all positive integers $a, b, c, d$ such that :
$$\frac{1}{a^2} - \frac{1}{b^2} = \frac{1}{c^2} - \frac{1}{d^2}$$
The original problem came from atomic electron transitions :

I would like to find out non-trivial positive integer solutions; since it is trivial if $a = b$ and $c = d$, or $a = c$ and $b = d$.
I found some of the solutions, and they look like :

There is some pattern in these integers, but it seems difficult to obtain a gerneralized form of the solution.
 [/INST] There are various variants of such equations. For example like this.
https://artofproblemsolving.com/community/c3046h2465588_a_class_of_diophantine_equations_in_three_variables
When solving such equations.
$$\frac{ 1 }{ a^2 } -\frac{ 1 }{ b^2 } = \frac{ 1 }{ c^2 } - \frac{ 1 }{ d^2 } $$
Pythagorean triples can help us. Take any two Pythagorean triples.
$$\left\{\!\begin{aligned}
&  p^2=s^2+n^2   \\
&  k^2=t^2+j^2  
\end{aligned}\right.  $$
Then the solutions can be written in this form. Then the truth needs to be reduced by a common divisor.
$a=ktsn$
$b=pstj$
$c=ktpn$
$d=pskj$
</s>