Maximize disc in polygon The question is as follows:
Four coordinates $(0,0)$, $(1,4)$, $(4,2)$ and $(3,0)$ create a polygon. What is the largest disc that can fit within the polygon?
I have a formula for calculating the maximum distance ($d$) from the center point $(x_1,x_2)$, but I´m not sure if it is correct or how to get a reliable answer.
$d=\left|\frac{x_2-ax_1-b}{\sqrt{a^2+1}}\right|$
Where $y=ax+b$ are the four sides of the polygon described as lines.
 A: Let $(x_0,y_0)$ denote the center and $r$ the radius.  The problem is to maximize
$$r=\min\left(
\frac{|-y_0|}{\sqrt{1}}, 
\frac{|-4x_0 + y_0|}{\sqrt{17}}, 
\frac{|2x_0 - y_0 - 6|}{\sqrt{5}}, 
\frac{|2x_0 + 3y_0 - 14|}{\sqrt{13}}
\right)$$
subject to linear constraints
\begin{align}
- y_0 &\le 0 \\                                                              
- 4x_0 + y_0 &\le 0 \\                                                      
2x_0 - y_0 - 6 &\le 0 \\                                                    
2x_0 + 3y_0 - 14 &\le 0 
\end{align}
Here is SAS code for this nonlinear programming formulation:
proc optmodel;
   set LINES = {<0,-1,0>,<-4,1,0>,<2,-1,-6>,<2,3,-14>};

   var X0, Y0;

   max R = min {<a,b,c> in LINES} (abs(a * X0 + b * Y0 + c) / sqrt(a^2 + b^2));

   con CenterInside {<a,b,c> in LINES}:
      a * X0 + b * Y0 + c <= 0;
    
   solve with nlp / multistart;

   print X0 Y0 R;
quit;

This formulation can also be linearized: maximize $r$
subject to linear constraints
\begin{align}
\frac{-(-y_0)}{\sqrt{1}} &\ge r \\ 
\frac{-(-4x_0 + y_0)}{\sqrt{17}} &\ge r \\ 
\frac{-(2x_0 - y_0 - 6)}{\sqrt{5}} &\ge r \\ 
\frac{-(2x_0 + 3y_0 - 14)}{\sqrt{13}} &\ge r \\ 
- y_0 &\le 0 \\                                                              
- 4x_0 + y_0 &\le 0 \\                                                      
2x_0 - y_0 - 6 &\le 0 \\                                                    
2x_0 + 3y_0 - 14 &\le 0 
\end{align}
From either formulation, the resulting optimal solution turns out to be $(x_0,y_0,r)=(1.956, 1.5272, 1.5272)$:

As @EdPegg hinted, you can obtain this as the incenter of a triangle:
https://www.wolframalpha.com/input?i=incenter+%280%2C0%29+%281%2C4%29+%287%2C0%29
But not the incenter of this triangle:
https://www.wolframalpha.com/input?i=incenter+%281%2C4%29+%284%2C2%29+%28-3%2C-12%29
A: Extend all the sides infinitely. You get two triangles that contain the quadrilateral. For each of these triangles, use the formula for the area of the triangle's incircle. The smaller incircle is the largest circle that can be inscribed in the quadrilateral.
Using this method, the radius of the largest circle in the quadriateral is  $\frac{28}{\sqrt{17}+\sqrt{52}+7}\approx1.52719985$, which matches @RobPratt's answer.
(Optional short-cut: You can use the four side lengths of the quadrilateral and Pitot's theorem to determine which triangle will have the smaller incircle.)
