Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

Re: defining a function with D

  • To: mathgroup at
  • Subject: [mg37170] Re: defining a function with D
  • From: Jens-Peer Kuska <kuska at>
  • Date: Tue, 15 Oct 2002 04:17:40 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <aodnti$mlg$>
  • Reply-to: kuska at
  • Sender: owner-wri-mathgroup at


f[x_, t_] := Sin[x*t]
dfx[x_, t_] := Module[{y, df},
                 df = D[f[y, t], y];
                 Block[{y = x},


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
> 660.785.7430

  • Prev by Date: Re: Get rid of onion-like parentheses
  • Next by Date: Re: Table using as iterator a multiple of 10, 100, ...,10^n
  • Previous by thread: SGML Catalog for the WRI DTDs?
  • Next by thread: Re: defining a function with D