maximum value of $xy+yz+zx.$ given $x+2y+z=4$ if $x+2y+z=4$ and $x,y,z$ are real number. then find maximum value of $xy+yz+zx$
putting $x+z=4-2z$ in $y(x+z)+zx = y(4-2z)+zx = 4y-2yz+zx$
i wan,t be able to  go further,could some help me with this 

$$xy+z(x+y)=xy+(4-x-2y)(x+y)=4x+4y-x^2-2y^2-2xy=k\text{(say)}$$
$$x^2+2x(y-2)+2y^2-4y-k=0$$
As $x$ is real, the discriminant $$4(y-2)^2-4(2y^2-4y-k)\ge0$$
The equality occurs if $x=-\dfrac{2(y-2)}2$
$$\iff k\le4-y^2\le4$$
The equality occurs if $y^2=0$
