The shaded area has the same value as the perimeter of the regular octagon. What is this value?
With the points labelled as above, is perpendicular to , and is at to , so triangle is an isosceles right-angled triangle. Let have length , then triangle has area . The same applies to triangle , so the shaded region has area . The perimeter of the octagon is , so and hence , so the common value for the area of the shaded region and the perimeter of the octagon is .