Thabit's Generalization of the Theorem of Pythagoras

Let ABC be any triangle as shown below. Construct lines AD and AE as shown in the figure so that angles BAD and CEA are both equal to angle BAC. Then AB^{2} + AC^{2} = BC(BD + CE). 1) Drag any of A, B or C to explore the configuration, and also click on the given button to show the measurements. 2) An easy way of constructing angles BAD and CEA equal to angle BAC is simply to rotate lines AB and AC around A respectively by the directed angles ACB and ABC.
3) When the angle at vertex A is a right angle, angles BAD and CEA will also be right angles, and the points D and E will coincide (since the perpendicular from A to BC is unique). In other words, we then obtain the theorem of Pythagoras, namely, AB^{2} + AC^{2} = BC^{2}.

NOTE: Please WAIT while the applet below loads.

Thabit's Generalization of the Theorem of Pythagoras

Explanation (proof): Can you explain why (prove) Thabit's generalization above is true?

Further Exploration: What are the respective conditions under which BC is greater than or smaller than BD + EC?