       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)'[y], GU[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)'[y]

G''[y] -> (G')'[y] -> G''[y] -> GU[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'' 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;

In[] H'''[y]

Out[] (HU)'[y]

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

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

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

Out[] (HU)'[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