Maximize[{x+2y,x²+y²==1},x,y]