On the lateral sides $A B$ and $C D$ of trapezoid $A B C D$, points $M$ and $N$ are taken such that segment $M N$ is parallel to the bases and divides the area of the trapezoid in half. Find the length of $M N$, if $B C=a$ and $A D=b$.
Let $M N=x ; E$ be the intersection point of lines $A B$ and $C D$. Triangles $E B C, E M N$ and $E A D$ are similar, so $S_{\mathrm{EBC}}$ $: S_{\mathrm{EMN}}: S_{\mathrm{EAD}}=a^{2}: x^{2}: b^{2}$. Since $S_{\mathrm{EMN}}-S_{\mathrm{EBC}}=S_{\mathrm{MBCN}}=S_{\mathrm{MADN}}=S_{\mathrm{EAD}}-S_{\mathrm{EMN}}$, then $x^{2}-a^{2}=b^{2}-x^{2}$, i.e., $x^{2}=$ $\left(a^{2}+b^{2}\right) / 2$