I am not an expert in using Mathematica, and I do not understand the following result (apologies if it appears trivial). I want to find the general solution to minimize the following expression over $x$ and $y$, where $a, b, c, d, e$ are real parameters:
$a x^2+ b y^2 - c x - d y + e x y\,.$
With the command Minimize[a*x^2+b*y^2-c*x-d*y+e*x*y, {x,y}]
I obtain the following solution: when no parameter is null and the solution exists, the minimum is (d (a d - c e) + b c^2)/(e^2 - 4 a b)
and is achieved if
{{x, y} ->
ConditionalExpression[{x, y},
b == (a d^2)/c^2 \[Or] 4 b == e^2/a \[Or]
c^2/(a d) == 2 ((c x)/d + y) \[Or] (2 a d)/c == e \[Or]
x == (2 b c)/(4 a b - e^2) \[Or] x == (d e)/(e^2 - 4 a b) \[Or]
2 x == c/a \[Or] y == -((2 a d)/(e^2 - 4 a b)) \[Or]
y == (c e)/(e^2 - 4 a b) \[Or] y == -((2 a x)/e) \[Or]
2 y == d/b]}
Then, if for instance I try to minimize the above expression by setting the parameters with the command Set[{a, b, c, d, e}, {38, 41, 32, 94, 46}]
, I obtain
(-(59846/1029) {x->-(425/1029),y->1418/1029})
Hence, the formula (d (a d-c e)+b c^2)/(e^2-4 a b)
provided by Minimize
looks correct. However, I am interested also in finding the values of $x$ and $y$ minimizing this expression, and I do not understand how to find them from the ConditionalExpression
of the solution provided by the command Minimize[a*x^2+b*y^2-c*x-d*y+e*x*y, {x,y}]
.
Question: How can I find the parametric formulas in $a,b,c,d,e$ for finding the two values $x$ and $y$ minimizing the general parametric expression (to quickly calculate for instance x->-(425/1029),y->1418/1029
in the above example)?
f[a_, b_, c_, d_, e_] := Minimize[a*x^2 + b*y^2 - c*x - d*y + e*x*y, {x, y}]
and thenf[38, 41, 32, 94, 46]
? $\endgroup$