Let ABCD be a square, E be midpoint of AB. Let F be on BC and G be on CD and EF is parallel to AG. Prove FG is tangent to the incircle of the square. 
I tried using OC and finding the slope so that maybe OC would be perpendicular to FG. I know that EF and AC will have the same slope. I also know that I have to use the distance formula but I am really stuck on how to prove a line is tangent to an incircle.
 A: Let's use $2l$ to be the side of the square, with $O$ at the origin. Then the $F$ point has coordinates $(x,l)$. $G$ has coordinates $(l,y)$. Since $EF||AG$, we can draw the perpendicular from $F$ to the horizontal axis, and we get similar triangles. Then $$\frac{l}{l+x}=\frac{l+y}{2l}$$
This is equivalent of saying that $\tan\angle FEO=\tan\angle GAD$. We can then write $$y=\frac{2l^2}{l+x}-l=\frac{l^2-lx}{l+x}$$
You can now use the formula to calculate the distance from $O$ to $FG$. Simple algebraic manipulation will yield that this distance is $l$. Draw the perpendicular from $O$ to $FG$. Since this distance is $l$ it means that $FG$ is tangent to the circle of radius $l$ centered in $O$, which is the incircle of the square.
A: Line $EF$ has the parametric form $\pmatrix {-1 \\ 0}+\mu\pmatrix {1+x \\ 1}$.
Line $AG$ has the parametric form $\pmatrix {-1 \\ -1}+\lambda\pmatrix {1+x \\ 1}=\pmatrix {1 \\ y}$.
$\therefore\lambda=\dfrac{2}{1+x}$
$\therefore y=-1+\dfrac{2}{1+x}=\dfrac{1-x}{1+x}$
Line $FG$ has the parametric form $\pmatrix {x \\ 1}+\alpha\pmatrix {1-x \\ -1+\dfrac{1-x}{1+x}}=\pmatrix {x \\ 1}+\alpha\pmatrix {1-x \\\dfrac{-2x}{1+x}}$.
The length of line $FG$ is $\sqrt{(1-x)^2 + \left(\dfrac{2x}{1+x}\right)^2} = \dfrac{1+x^2}{1+x}$.
Expand $\triangle FCG$ so that the hypotenuse is $1$ (i.e. multiply all sides by $\dfrac{1+x}{1+x^2}$).
Place the corner $C$ at the origin of the circle, with the $y$ side along the $x$-axis. This touches the circle, and also $\triangle FCG$ at $90^\circ$ (because the rotation is $90^\circ$), and when
$x+a(1-x)=\dfrac{2x}{1+x^2}$
$a(1-x)=\dfrac{x-x^3}{1+x^2}$
$a=\dfrac{x(1+x)}{1+x^2}$
we have that
$1+\dfrac{x(1+x)}{1+x^2}\left(\dfrac{-2x}{1+x}\right)=\dfrac{1-x^2}{1+x^2}$.
A: Let $M$ and $N$ be tangent point of $BC$ and $CD$ respectively.
Let $AB=2c$, $MF=b$ and $NG=a$ then $FG=b+c$, $MC=c-b$ and $GC=c-a$
In $\triangle CFG$
$(a+b)^2=(c-a)^2+(c-b)^2$
$c^2=ab+ac+bc$
And
$\tan\angle BFE=\frac{BE}{BF}=\frac{c}{c+b}$
$\tan\angle DAG=\frac{DG}{AD}=\frac{c+a}{c}$
If
$\frac{c}{c+b}=\frac{c+a}{c}$ then
$c^2=ab+ac+bc$
It means $\tan\angle BFE=\tan\angle DAG$
and
$EF\parallel AG$
