Let

$$Y=\Bigg\{ f\in L^2[-\pi,\pi]\, :\, \int\_{-\pi}^\pi xf(x)\, dx=1,\,\, \int\_{-\pi}^\pi (\sin x)f(x)\, dx=2 \Bigg\}.$$

My goal is to calculate the minimum norm element in $Y$.

The indication that appears to me is: to calculate $f\in Y$ of minimum norm, find a function of the type $g(x)=sx+t\sin x$ such that $f\in Y$ is fulfilled if and only if $f-g\in Z^\perp$ where $Z=\textrm{Span}[x,\sin x]$, that is, that $Y=g+Z^\perp$ is fulfilled. Then $f=g$.

But I don't understand why with this procedure I will get an $f$ element of minimum norm...