Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

Re: D vs. Derivative (2)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15697] Re: D vs. Derivative (2)
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Mon, 1 Feb 1999 14:54:16 -0500 (EST)
  • References: <78pcjv$d3r@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Gianluca
Two definitions of Derivative to avoid the problems that you found. They
would need to be extended to several variables and higher derivatives,
and checked out -  for example for clashes of variables.

With

h[x_] =HypergeometricPFQ[{I,1},{1+I},x];

we got

D[h[x],x]
-(1/((-1 + x)*x)*I*(1 -
       HypergeometricPFQ[{I, 1}, {1 + I}, x] +
       x*HypergeometricPFQ[{I, 1}, {1 + I}, x]))

but
h'
DirectedInfinity[((1/2 + I/2)*Sqrt[2]*
      Sign[Gamma[2 + I]])/Sign[Gamma[1 + I]]] &

If we define

Derivative[1][fn_]:=
Function[
  Evaluate[
   Function[#,
     Evaluate[D[fn[#],#]]
   ]&[Unique[x]][#]
  ]
 ]

then we get

h'
-(1/((-1 + #1)*#1)*I*
      (1 - HypergeometricPFQ[{I, 1}, {1 + I},
         #1] + HypergeometricPFQ[{I, 1},
          {1 + I}, #1]*#1)) &

And with

Derivative[1][fn_]:=
Function[Evaluate[Module[{x},D[fn[x],x]/.x->#]]]

we get the same:

h'

-(1/((-1 + #1)*#1)*I*
      (1 - HypergeometricPFQ[{I, 1}, {1 + I},
         #1] + HypergeometricPFQ[{I, 1},
          {1 + I}, #1]*#1)) &

Allan,

---------------------
Allan Hayes
Mathematica Training and Consulting
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565




  • Prev by Date: Mathematica as an Object
  • Next by Date: Repeated calls to Mathematica process
  • Previous by thread: Re: Mathematica as an Object
  • Next by thread: Repeated calls to Mathematica process