Find the infimum of $f(x,y)=\tfrac{1}{2} x^2-\tfrac{1}{2} xy+\tfrac{1}{4}y^2$ on the line $\langle t,-2t+4\rangle$ in Maple

251 Views Asked by At

If we have the function $$f(x,y)=\tfrac{1}{2} x^2-\tfrac{1}{2} xy+\tfrac{1}{4}y^2$$ and we want to find the infimum of $f$ at the vector $X=\langle t,-2t+4\rangle$ where its components are the $x$ and $y$ and $t\in \mathbb{R}$. Can any tell me how to do this in Maple? I mean how to code and find the infimum of $ f$?

Thanks.

2

There are 2 best solutions below

0
On

To find the stationary values of $f(t,-2t+4) \;$:

$>$ restart:
$>$ X1 := t;
$>$ X2 := -2*t+4;
$>$ f := 1/2*x^2-1/2*x*y+1/4*y^2;
$>$ ft := subs ({x=X1,y=X2},f);
$>$ dft:= diff (ft,t);
$>$ solve (dft,t);

1
On

There is a nice code in Maple called minimize. According to Maple's help:

The minimize(expr, opt1, opt2, ..., optn) function returns the infimum of expr if 
possible.  If minimize cannot find the infimum, it returns an unevaluated function
call.

Here a bit similar small programs:

[> f := (x,y)-> (1/2)*x^2-(1/2)*x*y+(1/4)*y^2:
   simplify(subs(x = t, y = -2*t+4, f(x, y))):
   minimize(%);
                                      2/5