I'm trying to craft a formula for finding matching areas in Pythagorean triples the way I have done with matching sides and matching perimeters and matching area:perimeter ratios. For example:
$f(10,3)=(91,60,109)$ and $f(14,1)=(195,28,197)$ have the same area $2730.$
I thought I had solved the $area$ equation using the $cubic$ formula but, when I plug in $m=10$, I do not get $3$ and, when I plug in $m=14$, I do not get $1$ in a spreadsheet or in Wolfram Alpha. Here is my attempt at solving the area equation for $n$ in terms of $D$ (the area), and $m$.
$$A=m^2-n^2\quad B=2mn\implies D(area)=\frac{AB}{2}=\frac {2m^3 n-2mn^3}{2}=m^3 n-mn^3$$
$$\text{In standard form }\\ mn^3+0n^2-m^3n+D=0\qquad a=m\quad b=0\quad c=-m^3\quad d=D$$
\begin{align*} n&=\sqrt[3]{\biggl(\frac{-b^3}{27a^3 }+\frac{bc}{6a^2}-\frac{d}{2a}\biggr)+\sqrt{\biggl(\frac{-b^3}{27a^3}+\frac{bc}{6a^2}-\frac{d}{2a}\biggr)^2+\biggl(\frac{c}{3a}-\frac{b^2}{9a^2}\biggr)^3}}\\ &+\sqrt[3]{\biggl(\frac{-b^3}{27a^3 }+\frac{bc}{6a^2}-\frac{d}{2a}\biggr)-\sqrt{\biggl(\frac{-b^3}{27a^3}+\frac{bc}{6a^2}-\frac{d}{2a}\biggr)^2+\biggl(\frac{c}{3a}-\frac{b^2}{9a^2}\biggr)^3}}\\ &-\frac{b}{3a} \end{align*}
$$=\sqrt[3]{\biggl(-\frac{d}{2a}\biggr)+\sqrt{\biggl(-\frac{d}{2a}\biggr)^2+\biggl(\frac{c}{3a}\biggr)^3}}\\+\sqrt[3]{\biggl(-\frac{d}{2a}\biggr)-\sqrt{\biggl(-\frac{d}{2a}\biggr)^2+\biggl(\frac{c}{3a}\biggr)^3}}$$
$$=\sqrt[3]{\biggl(-\frac{D}{2m}\biggr)+\sqrt{\biggl(-\frac{D}{2m}\biggr)^2+\biggl(\frac{-m^3}{3m}\biggr)^3}}\\ +\sqrt[3]{\biggl(-\frac{D}{2m}\biggr)-\sqrt{\biggl(-\frac{D}{2m}\biggr)^2+\biggl(\frac{-m^3}{3m}\biggr)^3}}$$
Oddly, inputs $2730,3\rightarrow -10$ and $2730,1\rightarrow -14$ as though I had solve for $m$ instead of $n$... and changing the sign of $D$ changed the sign of the result. I tried individual components in a spreadsheet and found negatives under the square roots.
Finally, I tried the simplest triple $f(2,1)=(3,4,5)$ and, as expected, when $D=\frac{3*4}{2}=6, m=1\rightarrow n=-2.$ I tried my hand at De Moivre's Theorem because of the real and imaginary components under the cube roots but I got lost.
Did I make a mistake in in my identification of $a,b,c,d$ or in my algebra? Or, can someone show me how to use De Moivre's Theorem to yield $n=1$ when $D=6$ and $m=2$?
Oddly, when I solved this for a more complex formula that I came up with to generate $sets$ that are, themselves, a subset of triples where $GCD(A,B,C)$ is an odd square (a subset that includes all primitives and reduces clutter), I got it to work except for the smallest triangles of sets $7$ and above where there were square roots of negatives. My generator uses $(n,k)$ as though they were $(2m-1+n,n)$. This formula generates a non-trivial triple for every $n,k\in\mathbb{N}$. For the above exercise: $f(1,1)=(3,4,5)\quad f(4,3)=(91,60,109)\quad f(7,1)=(195,28,197)$.
$$A=(2n-1)^2+2(2n-1)k\\ B=2(2n-1)k+2k^2\\ C=(2n-1)^2+2(2n-1)k+2k^2$$ and the formula that usually works ($6,1\rightarrow 1\quad 2730,4\rightarrow 3\quad 2730,7\rightarrow $#NUM) is:
$$k=\sqrt[3]{(\frac{D}{8(2n-1)}+\sqrt{\frac{D^2}{64(2n-1)^2 }-\frac{(2n-1)^6}{1728}}}\\ +\sqrt[3]{(\frac{D}{8(2n-1)}-\sqrt{\frac{D^2}{64(2n-1)^2 }-\frac{(2n-1)^6}{1728}}}-\frac{(2n-1)}{2}$$
I suppose, what I'm looking for is 1) my error, 2)how to use de Moivre's $n^{th}$ root theorem to deal with imaginaries in this context, or 3) how to find the limits of the search (as I have done with my other formulae) when I input $n$ instead of $m$.