6. What is the greatest value that the area of a right triangle can take, one vertex of which coincides with the origin, another lies on the curve $x^{2}+y^{2}=2(x+y)$, and the vertex of the right angle is located on the line $y=x$? In the answer, write the square of the found area.

points)
Solution. $\quad x^{2}+y^{2}-2 x-2 y=0, \quad(x-1)^{2}+(y-1)^{2}=2$.

We have the equation of a circle with center at point $(1 ; 1)$ and radius $R=\sqrt{2}$. Let's transition to the coordinate system Ouv while maintaining the scale (see figure). The equation of the circle in this coordinate system is $(u-\sqrt{2})^{2}+v^{2}=2$. The area of a right triangle, one vertex of which coincides with the origin, another lies on the circle, and the vertex of the right angle is located on the line

![](https://cdn.mathpix.com/cropped/2024_05_06_58f34d7e66d046d9b7d5g-12.jpg?height=620&width=700&top_left_y=1843&top_left_x=1295)
$v=0$, is calculated by the formula $S_{\text {OAB }}=\frac{1}{2} u \cdot|v|=\frac{1}{2} u \sqrt{2 \sqrt{2} u-u^{2}}$, where vertex $A(u, v)$ lies on the circle, and the vertex of the right angle $B(u, 0)$. We have $S^{2}=\frac{1}{4}\left(2 \sqrt{2} u^{3}-u^{4}\right)$. We find the zeros of the derivative of this function $\quad\left(S^{2}\right)^{\prime}(u)=\frac{u^{2}}{2}(3 \sqrt{2}-2 u)$. The only extremum point, and specifically, the point of maximum for this function is the point $u=3 \sqrt{2} / 2$, $S_{\max }=S(3 / \sqrt{2})=\frac{3 \sqrt{3}}{4}, \quad S_{\max }^{2}==\frac{27}{16}=1.6875$,

Answer: 1.6875.