Question 1000589
x and 49-x are the legs.


{{{x^2+(49-x)^2=41^2}}}-----Pythagorean Theorem Formula applied.


{{{x^2+49^2-98x+x^2=41^2}}}
{{{2x^2-98x+49^2-41^2=0}}}
{{{2x^2-98x+(49+41)(49-41)=0}}}------seeing difference of two squares
{{{2x^2-98x+90*8=0}}}
{{{x^2-49x+45*8=0}}}-----might be factorable, but too many possibilities to try.
-
discriminant?   {{{49^2-4*1*45*8=2401-45*8=2041}}}
{{{2041=13*157}}}, so not a square.


{{{x=(49+- sqrt(2041))/2}}}
Other leg then  {{{49-(49+- sqrt(2041))/2}}}.


The PLUS form will not work  (as would be found if continuing this way).
Try the MINUS form.


{{{highlight(x=(49-sqrt(2041))/2)}}}  and then other leg is  {{{highlight(49-(49-sqrt(2041))/2)}}}.  You should find that these give reasonable values.



---
Be aware of the site page, http://www.mathwarehouse.com/arithmetic/numbers/prime-number/prime-factorization-calculator.php