@Dr.Peterson: You are right, thanks for the time you all are giving me! Unfortunately now I can't talk to my lecturer due to holidays, so that's why I'm asking for your help. In the example I gave to Jomo I have no doubts, but I will proceed to post my work to give all the help possible in being clear.
My work for the example for Jomo: From the equation [MATH]2x+y=6[/MATH] it follows that [MATH]y=6-2x[/MATH] and so, since it must be both true that [MATH]f(x,y)=x^2y[/MATH] and [MATH]2x+y=6[/MATH], it follows that [MATH]f(x,y)=f(x,6-2x)=x^2(6-2x)=6x^2-2x^3=g(x)[/MATH].
So, since [MATH]g[/MATH] is differentiable, it follows that [MATH]g'(x)=12x-6x^2=0 \iff x_1=0 \lor x_2=2[/MATH]. So, finding [MATH]y[/MATH] from the constraint, it follows that the points for the extrema are [MATH]P_1=(0,6) \lor P_2 =(2,2)[/MATH], by direct calculations [MATH]P_1[/MATH] is a point of minimum for [MATH]f[/MATH] and [MATH]P_2[/MATH] is a point of maximum for [MATH]f[/MATH].
About what my lecturer said precisely, it is the following: "The function [MATH]f(x,y)=x^2+y^2[/MATH] is a continuous function on all [MATH]\mathbb{R}^2[/MATH] and the set identified by the equation [MATH]4x^2+y^2=1[/MATH] is compact, so for the Weierstrass theorem [MATH]f[/MATH] admits maximum and minimum in that set. But if we substitute [MATH]y^2=1-4x^2[/MATH], obtained from the constraint, in the function, we get the function [MATH]g(x)=1-3x^2[/MATH] of the only variable [MATH]x[/MATH], and since [MATH]g'(x)=-6x \geq 0 \iff x\leq 0[/MATH] it follows that [MATH]x=0[/MATH] is a maximum for [MATH]g[/MATH] and [MATH]g[/MATH] hasn't a minimum. So it follows that [MATH]f[/MATH] has maximum in the corresponding points and has no minimum; of course this is completely wrong (minimum has to exist because of Weierstrass)."
But, as you can now see, he didn't say why this is wrong. Hope that now is clearer!