Anomaly or expected behaviour?
- To: mathgroup at smc.vnet.net
- Subject: [mg61719] Anomaly or expected behaviour?
- From: "Matt" <anonmous69 at netscape.net>
- Date: Thu, 27 Oct 2005 05:01:49 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hello,
In the course of some simple calculations involving the trace and the
determinant of a matrix, I had cause to practice with Mathematica solving the
following:
l1 + l2 = T;
l1 l2 = D;
for l1 and l2.
The answers that Mathematica gave back to me are correct as demonstrated by the
following:
Cell[CellGroupData[{Cell[BoxData[
RowBox[{"solns", " ", "=", " ",
RowBox[{"Solve", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{
SubscriptBox["\[Lambda]", "1"], " ", "+", " ",
SubscriptBox["\[Lambda]", "2"]}], " ", "\[Equal]",
" ", "T"}], ",", " ",
RowBox[{
RowBox[{
SubscriptBox["\[Lambda]", "1"], " ",
SubscriptBox["\[Lambda]", "2"]}], " ", "\[Equal]",
" ", "D"}]}], "}"}], ",", " ",
RowBox[{"{",
RowBox[{
SubscriptBox["\[Lambda]", "1"], ",",
SubscriptBox["\[Lambda]", "2"]}], "}"}]}],
"]"}]}]], "Input",
CellLabel->"In[151]:="],
Cell[BoxData[
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{
SubscriptBox["\[Lambda]", "1"], "\[Rule]",
RowBox[{
FractionBox["1", "2"], " ",
RowBox[{"(",
RowBox[{"T", "-",
SqrtBox[
RowBox[{
RowBox[{
RowBox[{"-", "4"}], " ", "D"}], "+",
SuperscriptBox["T", "2"]}]]}], ")"}]}]}], ",",
RowBox[{
SubscriptBox["\[Lambda]", "2"], "\[Rule]",
RowBox[{
FractionBox["1", "2"], " ",
RowBox[{"(",
RowBox[{"T", "+",
SqrtBox[
RowBox[{
RowBox[{
RowBox[{"-", "4"}], " ", "D"}], "+",
SuperscriptBox["T", "2"]}]]}], ")"}]}]}]}],
"}"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{
SubscriptBox["\[Lambda]", "1"], "\[Rule]",
RowBox[{
FractionBox["T", "2"], "+",
RowBox[{
FractionBox["1", "2"], " ",
SqrtBox[
RowBox[{
RowBox[{
RowBox[{"-", "4"}], " ", "D"}], "+",
SuperscriptBox["T", "2"]}]]}]}]}], ",",
RowBox[{
SubscriptBox["\[Lambda]", "2"], "\[Rule]",
RowBox[{
FractionBox["1", "2"], " ",
RowBox[{"(",
RowBox[{"T", "-",
SqrtBox[
RowBox[{
RowBox[{
RowBox[{"-", "4"}], " ", "D"}], "+",
SuperscriptBox["T", "2"]}]]}], ")"}]}]}]}],
"}"}]}], "}"}]], "Output",
CellLabel->"Out[151]="]
}, Open ]]
However, you'll notice that the display of solns[[1,1]], solns[[1,2]]
and solns[[2,2]] are all similar in their formatting and display, but
in the case of solns[[2,1]], the quantity 1/2 has been distributed into
the parentheses. Why is that?
$Version
"5.1 for Microsoft Windows (October 25, 2004)"
Thanks,
Matt
- Follow-Ups:
- Re: Anomaly or expected behaviour?
- From: Chris Chiasson <chris.chiasson@gmail.com>
- Re: Anomaly or expected behaviour?