[comp.sys.next] Problem13

iphwk@TERRA.OSCS.MONTANA.EDU (Bill Kinnersley) (02/15/90)

Mathematica 1.2 on a NeXT, 94.6 seconds.

We NeXT users must still contend with the bug in Together[],
which cannot treat fractional powers correctly.

To prevent Together[] from seeing the Sqrt's, I reworded the problem.
I defined functions r and p in terms of their derivatives,
Togethered the result, then at last replaced r and p with the Sqrts.

Can someone who (unlike me) knows what they are doing,
say if there is a more efficient way to handle this?

Timing[
D1[f_] := D[D[D[D[f,x],x] + D[D[f,y],y] + D[D[f,z],z],x],x];
D2[f_] := n^2 * (D[D[f,x],x] + D[D[f,y],y]);
exp = Sin[n*r[x,y,z]*z/p[y,z]]/r[x,y,z];
Derivative[1,0,0][r][x_,y_,z_] := x/r[x,y,z];
Derivative[0,1,0][r][x_,y_,z_] := y/r[x,y,z];
Derivative[0,0,1][r][x_,y_,z_] := z/r[x,y,z];
Derivative[1,0][p][x_,y_] := x/p[x,y];
Derivative[0,1][p][x_,y_] := y/p[x,y];
Simplify[Together[D1[exp]+D2[exp]]/.
 {r[x,y,z]->Sqrt[x^2+y^2+z^2],p[y,z]->Sqrt[y^2+z^2]}]]

-- 
--Bill Kinnersley
  Physics Department   Montana State University    Bozeman, MT 59717
  INTERNET: iphwk@terra.oscs.montana.edu      BITNET: IPHWK@MTSUNIX1
226 Transfer complete.

iphwk@TERRA.OSCS.MONTANA.EDU (Bill Kinnersley) (02/15/90)

Sorry, that should have gone to sci.math.symbolic.  But it does point out
the problems we have in getting software updates.  The released version
Mathematica 1.2 has a serious bug, as noted.

   Users on other machines are supported by Wolfram Research, and they
received a maintenance upgrade correcting the bug.  When questioned, they say
"Talk to NeXT about it."  NeXT says, "Mumble, RSN."

   Not clear to me how (or even if) this will ever be fixed before the
next version of the OS.

-- 
--Bill Kinnersley
  Physics Department   Montana State University    Bozeman, MT 59717
  INTERNET: iphwk@terra.oscs.montana.edu      BITNET: IPHWK@MTSUNIX1
226 Transfer complete.