Let ABC be a 3-4-5 triangle with right angle C. Let D be a point on the hypotenuse. CD then partitions ABC into ACD and BCD.
Where is D located if ACD and BCD have congruent incircles?
The radius of an incircle of a triangle is given by
r = A/s
where A is the area of the triangle and s is the semi-perimeter.
Heron's formula gives the area of the triangle:
A = sqrt(s(s-a)(s-b)(s-c))
when the area is divided by s to get the inradius, you get
r = sqrt((s-a)(s-b)(s-c)/s)
In order for the incircles to be congruent, the results of this formula must be the same for each side (each subtriangle).
The program assumes A is the angle at the end of the 3-unit leg, opposite the 4-unit leg.
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
angle = Atn(4 / 3)
' angle at A, where hypotenuse meets side of length 3
For ad = 2.2898979 To 2.289898 Step 0.000000001
cd = Sqr(ad * ad + 9 - 6 * ad * Cos(angle))
peri1 = 3 + ad + cd
peri2 = 4 + 5 - ad + cd
s1 = peri1 / 2: s2 = peri2 / 2
r1 = Sqr((s1 - 3) * (s1 - ad) * (s1 - cd) / s1)
r2 = Sqr((s2 - 4) * (s2 - (5 - ad)) * (s2 - cd) / s2)
Text1.Text = Text1.Text & mform(ad, "0.000000000")
Text1.Text = Text1.Text & mform(r1, " 0.00000000")
Text1.Text = Text1.Text & mform(r2, " 0.00000000")
If r2 > r1 Then Text1.Text = Text1.Text & " *"
Text1.Text = Text1.Text & crlf
Text1.Text = Text1.Text & crlf & " done"
Function mform$(x, t$)
a$ = Format$(x, t$)
If Len(a$) < Len(t$) Then a$ = Space$(Len(t$) - Len(a$)) & a$
mform$ = a$
which has already had its limits and step size for AD narrowed down, finds AD needing to be between 2.289897948 and 2.289897949, resulting in both inradii being 0.71010205.
Relevant section of output:
2.289897944 0.71010205 0.71010205 *
2.289897945 0.71010205 0.71010205 *
2.289897946 0.71010205 0.71010205 *
2.289897947 0.71010205 0.71010205 *
2.289897948 0.71010205 0.71010205 *
2.289897949 0.71010205 0.71010205
2.289897950 0.71010205 0.71010205
2.289897951 0.71010205 0.71010205
2.289897952 0.71010205 0.71010205
2.289897953 0.71010205 0.71010205
radius numbers differ beyond shown digits, but an asterisk marks where r2 > r1.
As this uses the opposite acute angle as vertex A it is 5 minus Bractal's value for AD. So the two answers are in agreement.
Posted by Charlie
on 2017-01-01 12:43:06