As shown in Fig. 2, let OI=d, R, r be the circumradius and incircle radius of △ABC. The point K is the intersection of AI and the circle O; then
KI=KB=2Rsin2∠BAC,
AI=sin2∠BACr.

Fig. 2
Let the points M,N be the intersections of the line OI and the circle O; then
(R+d)(R−d)=IM×IN=AI×KI=2Rr,
i.e. R2−d2=2Rr.
Now draw the tangents DE,DF from D to the circle I. The points E,F are on the circle O. Then DI is the bisector of ∠EDF. It is enough to prove that EF is tangent to the circle I.
Let P be the intersection of the line DI and the circle O. Then P is the midpoint of the arc EF, and
PE=2Rsin2∠EDF,DI=sin2∠EDFr,
ID⋅IP=IM⋅IN=(R+d)(R−d)=R2−d2,
and so
PI=DIR2−d2=rR2−d2⋅sin2∠EDF=2Rsin2∠EDF=PE.
As I is on the bisector of ∠EDF, we can see that I is the incenter of △DEF [because ∠PEI=∠PIE=21(180∘−∠EPD)=21(180∘−∠DFE)=2∠EDF+∠DEF, and ∠PEF=2∠EDF; so ∠FEI=2∠DEF]. EF is tangent to the circle I.