Re: Re: defining a function with D
- To: mathgroup at smc.vnet.net
- Subject: [mg37189] Re: [mg37170] Re: defining a function with D
- From: Andrzej Kozlowski <andrzej at platon.c.u-tokyo.ac.jp>
- Date: Wed, 16 Oct 2002 14:25:12 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
(Somehow the original posting never reached me). But what's wrong with dfx[x_, t_] := Derivative[1, 0][f][x, t] ? Regards Andrzej Yokohama, Japan http://www.mimuw.edu.pl/~akoz/ http://platon.c.u-tokyo.ac.jp/andrzej/ On Tuesday, October 15, 2002, at 05:17 PM, Jens-Peer Kuska wrote: > Hi, > > f[x_, t_] := Sin[x*t] > dfx[x_, t_] := Module[{y, df}, > df = D[f[y, t], y]; > Block[{y = x}, > df > ] > ] > > Regards > Jens > > Jason Miller wrote: >> >> Dear Listers, >> >> I find myself defining functions in terms of differentiation. For >> example, >> >> f[x_,t_]:=Sin[x*t] >> dfx[x_,t]:=D[Sin[y,t],y]/.y->x >> >> This works well, but it seems to me that there should be a better way >> to do this. That is, there should be a better way to define a >> 'derivative' of a previous function without going through the >> replacement contortions. I can't find the answer in the archive. >> Can someone tell me the most straightforward way to do this? Will it >> work to define a gradient vector or Jacobian matrix? A Hessian >> matrix? >> >> Thanks in advance. >> -- >> Jason Miller, Ph.D. >> Division of Mathematics and Computer Science >> Truman State University >> 100 East Normal St. >> Kirksville, MO 63501 >> http://vh216801.truman.edu >> 660.785.7430 > > >