Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'A question about formatting?' topicStudent Support Forum > General > "A question about formatting?"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
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: ,

Subject (listing for 'A question about formatting?')
Author Date Posted
A question about formatting? Kevin Moore 07/26/12 10:36am
Re: A question about formatting? Bill Simpson 07/26/12 3:31pm
Re: Re: A question about formatting? Kevin Moore 07/26/12 10:40pm
Re: Re: Re: A question about formatting? Bill Simpson 07/28/12 1:56pm
Re: Re: Re: Re: A question about formatting? Kevin Moore 07/28/12 3:38pm
Re: Re: Re: A question about formatting? Michael 07/29/12 08:58am
Re: Re: Re: Re: A question about formatting? Kevin Moore 07/30/12 09:37am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic