(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 5002, 138] NotebookOptionsPosition[ 4418, 113] NotebookOutlinePosition[ 4803, 130] CellTagsIndexPosition[ 4760, 127] WindowFrame->Normal ContainsDynamic->False*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Bugs in Mathematica?", "Title", CellChangeTimes->{{3.3918893128898463`*^9, 3.3918893187482705`*^9}, { 3.3920485538593245`*^9, 3.392048560368685*^9}, 3.3920497783099985`*^9, { 3.3921418264692545`*^9, 3.392141834400659*^9}}], Cell["\<\ Most people realise that all software contains bugs - and even Mathematica \ contains a few. For example, at version 5.0 the following double integral evaluated incorectly to zero:\ \>", "Text", CellChangeTimes->{{3.3920500887964563`*^9, 3.3920501622620945`*^9}, { 3.392052386149888*^9, 3.3920523927193346`*^9}, {3.3921221423148303`*^9, 3.392122178837347*^9}}], Cell[BoxData[ RowBox[{ SubsuperscriptBox["\[Integral]", RowBox[{"-", "\[Infinity]"}], "\[Infinity]"], RowBox[{ SubsuperscriptBox["\[Integral]", RowBox[{"-", "\[Infinity]"}], "\[Infinity]"], RowBox[{ FractionBox["1", SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"2", "-", "c"}], ")"}], " ", SuperscriptBox["u", "2"]}], "-", RowBox[{"2", " ", "e", " ", "u", " ", "v"}], "+", RowBox[{"c", " ", SuperscriptBox["v", "2"]}]}]]], RowBox[{"\[DifferentialD]", "u"}], RowBox[{"\[DifferentialD]", "v"}]}]}]}]], "Input", CellChangeTimes->{{3.3921218646555758`*^9, 3.3921219030808287`*^9}, { 3.392121938712064*^9, 3.3921219963549504`*^9}, 3.3921220406486416`*^9, { 3.3921220745173426`*^9, 3.392122092533248*^9}}], Cell[TextData[{ "This was indeed a bug at version 5.0 - happily cleared at version 5.1. \n\n\ Some people react to a discovery of this sort by asking how they can ever \ trust Mathematica again! However, this is very simplistic. Mathematica will \ make far fewer mistakes that almost any human mathematician. Furthermore, \ even if ", StyleBox["Mathematica", FontSlant->"Italic"], " were a perfect piece of software, you could still make mistakes because of \ 'bugs' in your input. For example, consider this:" }], "Text", CellChangeTimes->{{3.3920500887964563`*^9, 3.3920501622620945`*^9}, { 3.392052386149888*^9, 3.3920523927193346`*^9}, {3.3921221423148303`*^9, 3.392122195631496*^9}, 3.3921222296103554`*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Integrate", "[", RowBox[{ RowBox[{"Exp", "[", "xy", "]"}], ",", "x"}], "]"}]], "Input", CellChangeTimes->{{3.392122232454445*^9, 3.392122261115658*^9}}], Cell[BoxData[ RowBox[{ SuperscriptBox["\[ExponentialE]", "xy"], " ", "x"}]], "Output", CellChangeTimes->{{3.392122240896584*^9, 3.3921222617365503`*^9}}] }, Open ]], Cell["\<\ I am sure Wolfram support have received assorted variants of that 'bug' from \ time to time, but if you look carefully, there is no space between the 'x' \ and 'y' variables - thereby creating a new variable 'xy' - so this is simply \ the indefinite integral of a constant. Thus, you must proceed cautiously before doing something irreversible (such \ as publishing a paper!) using a result. This is obviously doubly true if a \ result looks surprising. Do exactly what you might do in a hand calculation - \ check the result in a totally independent way. The above double integral \ could have been evaluated in two stages using 1-D integration, or it could \ have been evaluated numerically using NIntegrate for randomly chosen values \ of the other constants. Either experiment would have revealed the error. Mathematica bugs (at least in the kernel) are pretty rare, but so are hard \ disk failures, but that is hardly a reason not to take a back-up disk copy!\ \>", "Text", CellChangeTimes->{{3.3920500887964563`*^9, 3.3920501622620945`*^9}, { 3.392052386149888*^9, 3.3920523927193346`*^9}, {3.3921221423148303`*^9, 3.392122195631496*^9}, 3.3921222296103554`*^9, {3.392122271440504*^9, 3.3921222874535294`*^9}}] }, Open ]] }, WindowSize->{977, 750}, WindowMargins->{{Automatic, 58}, {79, Automatic}}, ShowSelection->True, ShowCellLabel->False, FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (March 26, 2007)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[590, 23, 235, 3, 83, "Title"], Cell[828, 28, 376, 7, 47, "Text"], Cell[1207, 37, 842, 22, 44, "Input"], Cell[2052, 61, 725, 13, 101, "Text"], Cell[CellGroupData[{ Cell[2802, 78, 183, 4, 28, "Input"], Cell[2988, 84, 157, 3, 27, "Output"] }, Open ]], Cell[3160, 90, 1242, 20, 155, "Text"] }, Open ]] } ] *) (* End of internal cache information *)