6. The maximum breeding capacity of fish in a fish farm is $m$ tons. To ensure the growth space for the fish, the actual breeding quantity cannot reach the maximum breeding capacity; an appropriate idle capacity must be left. It is known that the annual increase in fish, $y$ tons, is directly proportional to the product of the actual breeding quantity, $x$ tons, and the idle rate, with the proportionality constant being $k (k>0)$ (the idle rate is the ratio of the idle capacity to the maximum breeding capacity).
(1) Write the function relationship of $y$ with respect to $x$, and specify the domain of this function;
(2) Find the maximum annual increase in fish and the range of values for $k$ at this point.


6. (1) $y=k x\left(1-\frac{x}{m}\right)(0<x<m)$;
(2) $y=m k \cdot \frac{x}{m}\left(1-\frac{x}{m}\right) \leqslant m k \cdot\left(\frac{\frac{x}{m}+1-\frac{x}{m}}{2}\right)^{2}=\frac{m k}{4}$, when and only when $\frac{x}{m}=1-\frac{x}{m}$, i.e., $x=$ $\frac{m}{2}$, $y_{\text {max }}=\frac{m k}{4}$. From $0<\frac{m}{2}+\frac{k m}{4}<m$, we get $0<k<2$.