A circle of radius 1 is inscribed inside a regular octagon (a polygon with eight sides of length b). Calculate the octagon’s perimeter and its area.
Hint: Split the octagon into eight isosceles triangles.
What I did is divide the entire circle into 16 parts like the following:
Side A has length 1.
Side C has a length of 1 + x (x being the difference between the circle and the vertex of the octagon).
Side B has length b/2.
Angle AC is $\frac{360}{12}=22.5$.
Angle AB is 90 degrees.
Angle BC is 67.5 degrees.
I know that
$\tan{(22.5)}=\frac{b}{2}\times\frac{1}{1}$
The perimeter then is 16 times $\frac{b}{2}:
$16\times2\tan{(22.5)}=P_b$
$32\tan{(22.5)}=P_b$
However, the answer in the textbook is:
What am I doing wrong?