Path: utzoo!attcan!uunet!lll-winken!decwrl!ucbvax!TERRA.OSCS.MONTANA.EDU!iphwk From: iphwk@TERRA.OSCS.MONTANA.EDU (Bill Kinnersley) Newsgroups: comp.sys.next Subject: Re: Problem13 Message-ID: <9002141656.AA14667@terra.oscs.montana.edu> Date: 14 Feb 90 16:56:50 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 29 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.