Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1992
*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 1992

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

Search the Archive

Re:Derivative

  • To: mathgroup <mathgroup at yoda.physics.unc.edu>
  • Subject: Re:Derivative
  • From: HAY at leicester.ac.uk
  • Date: Fri, 31 JUL 92 10:09:54 GMT

> I had the following behaviour:

> Derivative[n_][F]:=FU[n]

> Derivative[n_][G][x_]:=GU[n][x]
 
> {F''[y], G''[y] }


> Is there a reason for this ?

> michael trott

> trott at physik.th-ilmenau.de         

In[] Derivative[n_][F]:=FU[n]
     Derivative[n_][G][x_]:=GU[n][x]
     {F''[y], G''[y] } 
 
Out[] {(FU[1])'[y], GU[2][y]}

Then values (SubValues) stored for Derivative can be examined:

??Derivative
f' represents the derivative of a function f of one argument.
   Derivative[n1, n2, ...][f] is the general form, representing 
   a function obtained from f by differentiating n1 times with 
   respect to the first argument, n2 times with respect to the 
   second argument, and so on.

Derivative[n_][F] := FU[n]
 
Derivative[n_][G][x_] := GU[n][x]


 
The right sides of these rules must be taken literally; so 
the evaluations of F''[y] and G''[y] follow the routes

F''[y] -> (F')'[y] -> (FU[1])'[y]

G''[y] -> (G')'[y] -> G''[y] -> GU[2][x]


The interesting feature here is the initial decomposition of F''to
(F')' BEFORE ANY RULES ARE LOOKED FOR (similarly for G''). 

	This means that F' is reached first and replaced rather than F''.
	
	But for G the rule is for Derivative[n_][G][x_] not just 
	Derivative[n_][G]; and so can only be used when G''[2] has been

	reconstructed.
	
The usefulness of this evaluation procedure can be seen in the 
following,where the second derivative of H is set.

In[] H'' = HU[2];

In[] H'''[y]

Out[] (HU[2])'[y]

The evaluation follows the route
H'''[y] -> ((H')')'[y] -> (H'')'[y] -> (HU[2])'[x]

Of course this means that any assignment of the third derivative 
is unused:

In[] H''[3] = HU[3];
     H'''[y]
     
Out[] (HU[2])'[y]

Allan Hayes
Department of Mathematics
The University
Leicester LE1 7RH
U.K.
hay at leicester.ac.uk





  • Prev by Date: Re: Derivative
  • Next by Date: why does this crash the kernel
  • Previous by thread: Re: Derivative
  • Next by thread: Re: Derivative