0

I got help here with a formula to find Pythagorean triples given only area. Using Euclid's formula, $Area = D=m^3 n-mn^3\quad$ the final equations are:

$$n_0=2\sqrt{\frac{m^2}{3}}\cos\biggl({\biggl(\frac{1}{3}\biggr)\arccos{\biggl(-\frac{3\sqrt{3}D}{2m^4}\biggr)}\biggr)}$$ $$n_1=2\sqrt{\frac{m^2}{3}}\cos\biggl({\biggl(\frac{1}{3}\biggr)\arccos{\biggl(\frac{3\sqrt{3}D}{2m^4}\biggr)}\biggr)}$$ $$n_2=n_1-n_0$$

where $$\lfloor\sqrt[4]{D}\rfloor\le m\le \lceil\sqrt[3]{D}\space \rceil$$

Given an area $D$, any value of $m$ that yields an integer for one-or-more of $n_0, n_1, n_2$ provides the $m,n$ values that identify a triple that has area $D$. The limits I show are heuristic; I found them by experimentation in a spreadsheet. I would like to justify them with something more than, "they work", but I can't and I would also like to do better if possible.

Are there logical reasons for my limits? and Is there a way to narrow the search or is this as good as it gets?

poetasis
  • 6,338
  • It would help to know what $D$ and $m$ etc actually are in relation to which cubic equation. At the moment this appears to me to be no more than a mysterious list at which I must guess at the interpretation to make any sense of the question. – Mark Bennet Aug 20 '19 at 10:26
  • Yes, use the formula for the solution of cubic equations. – William Elliot Aug 20 '19 at 10:43
  • Please make the question self-contained. –  Aug 20 '19 at 11:37
  • I'm confused. The $n_0$ formula is for a solution of the equation $$mx^3 - m^3x - D = 0$$ but the $n_1$ formula is for a root of $$mx^3 - m^3x + D = 0$$ and taking their difference means $n_2$ wouldn't be a root of either one. Is this what you intended? I note that for all but the very last example you gave, $m$ divides $D$. – Paul Sinclair Aug 20 '19 at 22:01
  • @Paul Sinclair The formula works well, e.g. for $D=68640, m=26,\quad $ $n_0=23.76819745\quad n_1=27.76819745\quad n_2=4. $ The combinations of $D,m$ that yield integers for one or more of $n_x$ are the ones sought. – poetasis Jan 18 '20 at 15:06

2 Answers2

1

The value $m$ needed to create a triple with a given area magnitude is higher when

$m^3(1)-m(1)^3-D=0\quad$ than when $\quad m^3 (m - 1) - m (m - 1)^3 - D = 0$

but it is smallest when $n\approx\frac{m}{2}.\quad $ The limits found by solving with $(m,m/2)$ and then with $(m,1)$ are

$$\bigg\lfloor\sqrt[4]{\frac{8P}{3}}\bigg\rfloor\le m \le \frac{\sqrt[3]{\sqrt{3} \sqrt{27 D^2 - 4} + 9 D}}{\sqrt[3]{2} \sqrt[3]{3^2}} + \frac{\sqrt[3]{\frac{2}{3}}}{\sqrt[3]{\sqrt{3} \sqrt{27 D^2 - 4} + 9 D}}$$

and the search can be limited, as indicated by one of the other posters, by using only the factors of $D$ within this range.

poetasis
  • 6,338
0

So you are indeed trying to find integer solutions to the equation $$mn^3 - m^3n = D$$ It looks like you've flipped the sign of $n_1$, presumably because the associated root is always negative (if $m$ and $D$ are both positive, this equation will always have exactly one negative root, with the other two roots either positive or complex conjugates). Since you are only interested in positive roots, it does not matter whether $n_1$ is integer or not. The actual root $-n_1$ is negative. Thus you are actually only interested in $n_0$ and $n_2$.

For your purposes, there is a better expression for $n_2$. First, to simplify the notation, define $$A := \frac {2m}{\sqrt 3}$$ and $$\theta := \frac 13\arccos\left(-\frac {3\sqrt 3 D}{2m^4}\right)$$

then $$n_0 = A\cos (\theta)\\n_2 = A\cos\left(\theta - \frac{2\pi}3\right)$$ This way, you only have to take the arccosine of one value.

That is fairly minor. I think the biggest help for you comes from the observation that $m$ divides $D$, since $m(n^3 - m^2n) = D$. So while you have a wide range for $m$, most of the values can be quickly eliminated.

This points out that your final entry above is incorrect: $48$ does not divide $1878120$, so it cannot be a valid value of $m$.

Paul Sinclair
  • 43,643
  • My solution(s) works very well. I am only interested in narrowing the search for values of $m$. BTW, for $f(1878120,48), n_2=21$. – poetasis Aug 21 '19 at 00:17
  • $48\cdot 21^3 - 48^3\cdot 21 = -1877904$. How is that a solution for $D = 1878120$? And what is your complaint about the means of signficantly narrowing down the values of $m$ to be searched that I described? – Paul Sinclair Aug 21 '19 at 02:55
  • You got the original equation signs reversed. It is $m^3n-mn^3=D$. I made no complaint about a solution to narrow the search. I did not see one offered until I read your answer with this focus. Now I see what you are trying to say but your answer appears to include $\frac{D}{m}$ and I don't have $m$ until after the search. It took me about $3$ years to find my solutions for a paper I've been working on for $10$ years; they have $3$ real roots whenever $m\ge x$ where $x$ is the lowest integer that yields an integer $n$. I'm happy with them. – poetasis Aug 21 '19 at 09:40
  • You did give me food for thought. It is true that $m|D$. There are $86$ values of $m$ where

    $lo=\lceil\sqrt[4]{1878120} \rceil=38\le m \le\lceil\sqrt[3]{1878120} \rceil=123=hi$

    but only $12$ factors $x$ of $1878120$ where $38\le x\le 123$. If you edit your answer to reflect that, it will be worth points to you. Thanks

    – poetasis Aug 21 '19 at 19:53
  • Sometimes there is more than one answer for a given area using the same $m$. For example $D=71831760\land m=169$ yields $3$ answers. $$n_0=161((2640,54418,54482), n_1=176((2415,59488,59537), n_2=15((28336,5070,28786)$$. My function just work. – poetasis Feb 18 '20 at 19:22