6. Given a constant $a \in(0,1)$, $|x|+|y| \leqslant 1$, the maximum value of the function $f(x, y)=a x+y$ is $\qquad$ .
6. 1 .

Solution: $f(x, y)=a x+y \leqslant|a x|+|y| \leqslant a|x|+(1$ $-|x|)=(a-1)|x|+1$ The first equality holds if $x \geqslant$ $0, y \geqslant 0$. When $0 \leqslant x \leqslant 1, 0<a<1$, $g(x)=(a-1) x+$ 1 is a decreasing function. When $x=0$, $g(x)_{\max }=1$, so $\left\{\begin{array}{l}x=0 \\ y=1\end{array}\right.$, $g(x)_{\max }=1$.