# Two squares of side 2x overlap to form a regular octagon. How long is each side of the octagon?

Here is a link to the image. http://www.ucl.ac.uk/language-centre/placement-tests/UPC/Maths/images/question14.jpg I first thought of dividing the sides by 4, but then realized that we cannot assume that. The hint they gave is: Try again. If the middle piece of each side of the square is y, we get a right-angled triangle all of whose sides can be expressed in terms of x and y. Then apply Pythagoras's Theorem.

may you please explain, I do not get it at all. What is y? and if y is the vertical line, then what is the base, hwo do we use pytahgorean theorm??

• The hint is saying that a side of the square is parted in three pieces of lengths $x+y+x$ by the other square. Now $y$ is the length of the hypotenuse of the outer triangle from the other square, whose sides are $x$ long – N74 Dec 26 '16 at 22:39

Using Pythagoras, the lengths of the equal edges of the exterior isosceles right angled triangle is given by $$\sqrt{\left(\frac y2\right)^2+\left(\frac y2\right)^2}=\frac{y}{\sqrt{2}}$$
Hence $y$ is given by $$y+\frac{2y}{\sqrt{2}}=2x$$