| Author |
Comment/Response |
Michael
|
07/29/12 08:58am
In Response To 'Re: Re: A question about formatting?' --------- Bill Simpson is right that there is something extra in your definition of U[x], an invisible Cell[""] at the end.
In[3]:= f[x_] := (x - x2) (x - x1) E^-x TextCell[""]
In[4]:= U[x] === f[x]
Out[4]= True
If you select the U[x_] := ... cell and execute the menu command Cell > Show Expression, you get
Cell[BoxData[
RowBox[{
RowBox[{"U", "[", "x_", "]"}], ":=", " ",
RowBox[{
RowBox[{"(",
RowBox[{"x", "-", "x2"}], ")"}],
RowBox[{"(",
RowBox[{"x", "-", "x1"}], ")"}],
SuperscriptBox["E",
RowBox[{"-", "x"}]], Cell[""]}]}]], "Input",
CellChangeTimes->{{3.5522208921448402`*^9, 3.552221078318489*^9}, {3.55222112799833*^9,
3.5522211527687473`*^9}}]
Note the Cell[""] at the end of BoxData (before "Input"). I have no idea how such a cell can be entered. My best guess is that you copied a cell, pasted it, and erased its contents without removing the cell itself.
Anyway the fix is easy but tricky. Select the cell at the end and then delete. (Clicking at the end and hitting delete just steps you through the cell without erasing it.)
URL: , |
|