In triangle $A B C$, angle $C$ is $135^{\circ}$. On side $A B$ outside the triangle, a square is constructed with center $O$. Find $OC$, if $A B=6$.

#
Let $A B D E$ be the constructed square. Its diagonal forms a $45^{\circ}$ angle with the side, so $\angle A C B + \angle A D B = 180^{\circ}$ (see the figure). Therefore, a circle can be circumscribed around the quadrilateral $A C B D$. Since the angle $A B D$, inscribed in this circle, is a right angle, the center $O$ of the circle is the midpoint of the diagonal $A D$ of the square, which is also its center. Thus, $O C$ is the radius of this circle. Therefore, $O C = \frac{1}{2} A D = 3 \sqrt{2}$.

![](https://cdn.mathpix.com/cropped/2024_05_06_297c289048f559686628g-17.jpg?height=880&width=858&top_left_y=0&top_left_x=603)

## Answer

$3 \sqrt{2}$.