Let two vertexes of the square lie on (a,0) and (0, b)
Where a < 8 and b < 6
Let side BC be the hypotenuse of the right triangle
And the equation of BC is:
y = -(6/8)(x - 8)
8y = -6x + 48
6x + 8y - 48 = 0
Now....using the formula for the distance between a point and a line we have two outcomes
Distance between (a,0) and the line =
abs [6(a) + 8(0) - 48 ] abs[ 6a - 48] abs[ 3a - 24]
_________________ = ____________ = _________
10 10 5
Distance between (0,b) and the line =
abs[6(0) + 8(b -48) ] abs[ 8b - 48] abs [ 4b - 24]
________________ = ___________ = ___________
10 10 5
And these distances are equal
Since a < 8 and b < 6 we can write
(24 - 3a) / 5 = (24 - 4b) / 5
24 - 3a = 24 - 4b
-3a = - 4b
3a = 4b ⇒ b = (3/4) a
And the distance between the two points = the distance from one of the points to the hypotenuse
Thus...
√[a^2 + b^2] = abs (3a - 24 )/ 5
Since a < 8, and the left side must be > 0...we can write...
√[a^2 + b^2] = (24 - 3a ) / 5
√ [a^2 + (9/16)a^2 ] = (24 - 3a) / 5
√ [ 25a^2] / 4 = (24 - 3a)/5
5a/4 = (24 - 3a) / 5
25a/4 = 24 - 3a
25a = 96 - 12a
37a = 96
a = 96/37
b = (3/4 a) = (3/4)(96/37) = 72/37
So.....the length of the side of the square =
√[(96/37)^2 + (72/37) ^2] =
√[96^2 + 72^2] / 37 = √14400 / 37 = 120 / 37 cm
Here's a pic.... D = "a" = (96/37, 0) and E = "b" = (0, 72/37)