Let x,y be two numbers such that x+y=3⇒y=3−x and let product P=xy2
thus P=x(3−x)2=x3−6x2+9x
For a maxima or minima dxdP=0
Thus dxdP=3x2−12x+9 and dx2d2P=6x−12
Now, dxdP=0 ⇒3x2−12x+9=0 ⇒x=1,3.
Thus (dx2d2P)x=1=−6
and (dx2d2P)x=3=6
Thus P is maximum when x=1 ⇒y=2 So, P=1.22=4.