I was in secondary school in Nigeria in the 60s during the transitioning from colony to independence to republic. At school we were given this formula that is now burnt into my synapses because our teacher was an Indian guy and he said the length of the hypotenuse of a right angled triangle can be found by solving the following equation
$$\sqrt{a^2 + b^2 + 2ab}$$
Reason we all remember: imagine an Indian accent repeating over and over again from year two or three till we graduated "square of the first, square of the second and twice their product" and if you forget a sharp rap across the knuckles with a 3 foot ruler (both helped as the accent was totally strange to us)
Now I come across a Pythagoras theorem question and the hypotenuse is solved by
$$\sqrt{a^2 + b^2}$$
When did the formula/proof change or were we given dud info from the very beginning? Surely not? Exams were passed using this proof and these exams were internationally validated.
No excuses but this was what triggered my panic: python program
I solved the equation (5, 12) to be 17 but this program solved it to 13 so I assumed I was wrong.
$$\sqrt{5^2 + 12^2 + 2(60)}$$
resolves to $$\sqrt{25 + 144 + 120} = \sqrt{289} = 17$$
but $$\sqrt{5^2 + 12^2}$$ resolves to $$\sqrt{25 + 144}$$ resolves to $$\sqrt{169}$$ is 13 hence my confusion.
Surely they should resolve the same?
Now I am even more baffled. Please help! What am I doing wrong?
You've confused two things. Pythagoras' Theorem is, and always has been, that for a right-angled triangle with hypotenuse $c$ and shorter sides $a$ and $b$, we have $c^2 = a^2 + b^2$.
The thing that you're remembering is the binomial expansion of $(a+b)^2$, which is, indeed, $a^2 + b^2 + 2ab$.