I am trying to find the supremum of the following set $ \{xy−x^2/2\mid x\in [-1,1]\}$ , where $ y$ is a real number. I am not sure if this is correct, but I managed to find that $ $ \sup \{ xy-x^2/2\mid x\in [-1,1]\}=\begin{cases} y^2/2 & \text{ if } y\in [-1,1] \ y-1/2 & \text{ if } y>1 \ -y-1/2 & \text{ if } y<-1 \end{cases} $ $