MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: An open letter

  • To: mathgroup at smc.vnet.net
  • Subject: [mg16630] Re: An open letter
  • From: "Mark Evans" <evansNOSPAM at gte.net>
  • Date: Fri, 19 Mar 1999 12:53:52 -0500
  • Organization: gte.net
  • References: <7cleqb$9oh@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

I have to second these thoughts.  Hold and its variants are available.
Still, they seem awkward and tricky to use properly.  Maybe there is no
better way to do it; but I agree with Jack that it would be nice if WRI
would look for one.

This problem crops up not only in showing the steps of an evaluation, but
also in writing a report for professional audiences.  The new typesetting is
very good, but it's often very hard to make it behave as you would like.

It is often hard -- even impossible -- to get an expression into a
particular form which runs against the grain of Mathematica's default forms.

An example of this is

\!\(TraditionalForm\`\(B\_p\)(p) ==
    171616.75126452345`\ \ at \(\((0.00007718677274115544`\ p)\)\^2 + 1\)\)

where one has essentially

a0 * Sqrt[(a1 x)^2 + 1]

and Mathematica does everything it can to expand out the inner squared
expression.

The strategy I have adopted for reports is to include in the electronic copy
an appendix containing all the code required to reconstruct the equations
and plots presented in the main body.  This appendix lives in a collapsed
cell which does not print out in hardcopy.  It is divided into sections
corresponding to sections in the main body.  An example of such a cell is
given below this message.  It shows some of the tricks which are required to
elaborate on a particular derivation.

I think the solution to the general problem may be something along the lines
of a new type of wrapper called "PreferredForm" which would act as a hint to
Mathematica to attempt to maintain a particular arrangement of terms.
However it would not block all evaluation as does the present HoldForm.
Hold and its variants require a corresponding ReleaseHold to manipulate
expressions.  With PreferredForm, there would be no absolute holds on
expressions, just hints for Mathematica to consider one form as being
preferred over another.  These preferences could then propagate through
evaluations without any tricky user manipulations.

Mark

--
Reply address as follows:
EVANS at GTE dot NET


Jack Goldberg wrote in message <7cleqb$9oh at smc.vnet.net>...
>Hi Group,
>
>Now back to my open letter.  This example is only one of three or
>four that I have fell prey to. All of them are based on Mathematica's
propensity
>to evaluate.




Cell[BoxData[
    RowBox[{"TraditionalForm", "[",
      RowBox[{"HoldForm", "[",
        RowBox[{
          RowBox[{
            SubscriptBox["B", "p"], "[", "p", "]"}], "=",
          RowBox[{
            RowBox[{
              SubscriptBox["B", "c"], "[",
              RowBox[{"c", "[", "p", "]"}], "]"}], " ", "=", " ",
            RowBox[{
              RowBox[{
                SubscriptBox["r", "1"], " ",
                SubscriptBox["r", "2"], " ",
                RowBox[{"Cosh", "[",
                  RowBox[{
                    SubscriptBox["r", "2"], " ",
                    RowBox[{"c", "[", "p", "]"}]}], "]"}]}], " ", "=", " ",
              RowBox[{
                RowBox[{
                  SubscriptBox["r", "1"], " ",
                  SubscriptBox["r", "2"], " ",
                  RowBox[{"Cosh", "[",
                    RowBox[{
                      SubscriptBox["r", "2"], " ",
                      RowBox[{"HoldForm", "[",
                        RowBox[{"(",
                          RowBox[{"1", "/",
                            RowBox[{"(",
                              SubscriptBox["r", "2"], ")"}]}], ")"}], "]"}],
                      " ",
                      RowBox[{"ArcSinh", "[",
                        RowBox[{
                          RowBox[{"HoldForm", "[",
                            RowBox[{"1", "/",
                              SubscriptBox["r", "1"]}], "]"}], " ", "p"}],
                        "]"}]}], "]"}]}], " ", "=", " ",
                RowBox[{
                  SubscriptBox["r", "1"], " ",
                  SubscriptBox["r", "2"], " ",
                  SqrtBox[
                    RowBox[{"1", "+",
                      SuperscriptBox[
                        RowBox[{"(",
                          FractionBox["p",
                            SubscriptBox["r", "1"]], ")"}],
"2"]}]]}]}]}]}]}]
          , "]"}], "]"}]], "Input",
  CellLabel->"In[80]:=",
  CellFrame->False]







  • Prev by Date: Re: Integration using "shortcut keys"
  • Next by Date: Fitting a piecewise continuous Function
  • Previous by thread: RE: An open letter
  • Next by thread: Re: An open letter