You are on page 1of 1

Que.1.

Find the extreme values of the function


f(x,y)=x^2+2y^2 on the circle x^2+y^2=1

(%i1) f(x,y):=x^2+2*y^2;

(%o1) f(x,y):=x^2+2*y^2

(%i2) g(x,y):=x^2+y^2;

(%o2) g(x,y):=x^2+y^2

we set up the system of equation grad(f)=h*grad(g) , g(x,y)=1

(%i3) eq1:diff(f(x,y),x)=h*diff(g(x,y),x);

(eq1) 2*x=2*h*x

(%i4) eq2:diff(f(x,y),y)=h*diff(g(x,y),y);

(eq2) 4*y=2*h*y

(%i5) eq3:g(x,y)=1;

(eq3) y^2+x^2=1

Now Solve the system for x,y,h

(%i6) solve([eq1,eq2,eq3],[x,y,h]);

(%o6) [[x=1,y=0,h=1],[x=-1,y=0,h=1],
[x=0,y=-1,h=2],[x=0,y=1,h=2]]

We see that the extreme values lies among (1,0), (-1,0), (0,-1), (0,1)

(%i7) [f(1,0),f(-1,0),f(0,-1),f(0,1)];

(%o7) [1,1,2,2]

You might also like