Solve and the order of variables to solve for (v7.0)

• To: mathgroup at smc.vnet.net
• Subject: [mg105041] Solve and the order of variables to solve for (v7.0)
• From: kristoph <kristophs.post at web.de>
• Date: Thu, 19 Nov 2009 05:21:27 -0500 (EST)

```Hi,

consider the following problem:

costsHome[yh_, yht_] := w (yh^2 + 10/100 yh yht + 110/100 yht^2);
costsFor[yf_, yft_] := wt (110/100 yf^2 + 10/100 yf yft + yft^2);

profitHome[\[Epsilon]_, pht_, ph_] := \[Epsilon] pht yht + ph yh -
costsHome[yh, yht];
profitFor[\[Epsilon]_, pf_, pft_] :=
1/\[Epsilon] pf yf + pft yft - costsFor[yf, yft];

res = Solve[{D[profitHome[\[Epsilon], pht, ph], yh] == 0,
D[profitHome[\[Epsilon], pht, ph], yht] == 0,
D[profitFor[\[Epsilon], pf, pft], yf] == 0,
D[profitFor[\[Epsilon], pf, pft], yft] == 0}, {yh, yht, yf, yft}]

The list of results I get is sorted not in the way I would like to
have it, i.e. yh, yht, yf and yft.

How do I always the the list to be the way I want it?

The order even changes if I let

costsHome[yh_, yht_] := w (yh^2 + yht^2);
costsFor[yf_, yft_] := wt (yf^2 + yft^2);

Does anybody know why? Thanks in advance.

```

• Prev by Date: Filling in ListPlot
• Next by Date: Re: Undo in Mathematica
• Previous by thread: Re: Filling in ListPlot
• Next by thread: Re: Solve and the order of variables to solve for (v7.0)