Question 901096
Mr. Chris Karmis would be cutting an isosceles right triangle out of each corner of the square.
If the legs of each right triangle measure {{{x}}} feet,
the hypotenuse length, in feet, is
{{{sqrt(x^2+x^2)=sqrt(2x^2)=x*sqrt(2)}}} ,
and that is the length of each of the sides of the regular octagon.
{{{drawing(300,300,-6.5,5.5,-6,6,rectangle(-5,-5,5,5),
red(line(5,2.071,2.071,5)),red(line(5,-2.071,2.071,-5)),
red(line(-5,-2.071,-2.071,-5)),red(line(-5,2.071,-2.071,5)),
locate(-4.8,4,x),locate(-4,5,x),locate(-3.5,3.5,x*sqrt(2)),
locate(-4.8,0.5,x*sqrt(2)),locate(-4.8,-3.5,x),locate(-5.8,0.3,12),
arrow(-5.5,0.3,-5.5,5),arrow(-5.5,-0.3,-5.5,-5)
)}}} {{{x+x*sqrt(2)+x=12}}} --> {{{x*(2+sqrt(2))=12}}} --> {{{x=12/(2+sqrt(2))}}} ,
and {{{x*sqrt(2)}}} , or {{{12-2x}}} is the length, in feet, of the side of the octagon.
Since math teachers do not like to see square roots in denominators, we could rationalize those expressions.
{{{x=12/(2+sqrt(2))=12(2-sqrt(2))/(2+sqrt(2))/(2-sqrt(2))=12(2-sqrt(2))/(2^2-(sqrt(2))^2)=12(2-sqrt(2))/(4-2)=12(2-sqrt(2))/2=6(2-sqrt(2))}}} ,
and {{{x*sqrt(2)=6(2-sqrt(2))sqrt(2)=12(sqrt(2)-1)}}}.
Of course, Mr. Chris Karmis would like to know an approximate measure, in feet, so we would tell him that the side of the octagon measures {{{4.97}}} feet.


If Mr Karmis had a square piece of carpets with sides measuring {{{k}}} feet,
the equation would be
{{{x+x*sqrt(2)+x=k}}} --> {{{x=k/(2+sqrt(2))=k(2-sqrt(2))/2}}}
and the length of the side of the octagon would be
{{{k-2x=k-2k(2-sqrt(2))/2=
k-k(2-sqrt(2))=k+k(sqrt(2)-2)=k(sqrt(2)-2+1)=k(sqrt(2)-1)}}} .
For Mr. Karmis sake, we would give an approximate answer:
the length of the side of the octagon, in feet, can be calculated as
{{{0.4142x}}} .