Find two possible solutions to a 2-digit number equal to the square of the ten's digit plus the square of the sum of its digits.
I managed to find out through brute force that the two solutions that satisfy the question is 41 and 50. However, I now need to provide an explanation for how I got my answer.
How would I solve this type of question in a formal manner?
Hint:
$$10a+b=a^2+(a+b)^2\iff2a^2+2a(b-5)+b^2-b=0$$
Discriminant $$=4(b-5)^2-8(b^2-b)=-4b^2-32b+100=4(25-16b-b^2)=4(89-(b+8)^2)$$ has to be perfect sqaure $=(2c)^2$(say)
$$89=c^2+(b+8)^2$$
As $b\ge0,b+8\ge8$
Again, $(b+8)^2=89-c^2\le89\implies b+8\le\sqrt{89}<10$