I was working on an equation to find out the length of one of the sides of triangle, given that the triangle's area, the variable $x$, and other two sides, $A$ and $B$, are known. Basically, if a triangle has an area of 6, and sides with lengths 3 and 4, the formula will output 5, the length of the third side.
The formula I found was: $\sqrt{A^2 + B^2 - 2 \sqrt{A^2 B^2 - 4x^2}}$
When I saw the formula, I realized that if $A^2 B^2 < 4x^2$, the given values cannot form a triangle. If $A^2 + B^2 < 2 \sqrt{A^2 B^2 - 4x^2}$, these given values also cannot form a triangle. I tested these out, but I found out that the illegitimate triangles, triangles when the sum of the two smaller sides is less than the larger side, always have $(AB)^2 < 4x^2$. Is there any illegitimate triangle where $(AB)^2 > 4x^2$, but it doesn't work because $A^2 + B^2 < 2 \sqrt{A^2 B^2 - 4x^2}$?
Sorry if this is confusing, I'm still in high school.
There is a problem with the task you are trying to do: the length of two sides and the area doesn't determine the length of the third side.
To fix this, the formula for the area should include both signs of the inner square root.
$\sqrt{a^2+b^2\pm\sqrt{a^2b^2-4x^2}}$.
So if $a^2b^2-4x^2>0$, you can choose the plus sign and get the third side of the triangle.