Re: Creating a function that is a derivative of another function??
- To: mathgroup at smc.vnet.net
- Subject: [mg86745] Re: Creating a function that is a derivative of another function??
- From: "David Park" <djmpark at comcast.net>
- Date: Thu, 20 Mar 2008 02:52:38 -0500 (EST)
- References: <email@example.com>
When Mathematica evaluates your dW statement with 0 it uses D[W,0], which makes no sense for the D statement. Use the Derivative construction. W[t_] := a t + b t^2 + c t^3 dW[t_] := Derivative[W][t] dW[t] a + 2 b t + 3 c t^2 dW a -- David Park djmpark at comcast.net http://home.comcast.net/~djmpark/ "Eric" <eric.r.george at aero.org> wrote in message news:frqpr4$55a$1 at smc.vnet.net... >I have a function: > > W[t_] := a*t + b*t^2 + c*t^3 > > I want the derivative of this funtion wrt t as another function. The > following seems like it works: > > dW[t_] := D[W[t], t] > > dW[t] > a + 2 b t + 3 c t^2 > > But something isn't right?? > > dW > General::ivar: 0 is not a valid variable. >> > (output line has a partial derivative symbol, subscript 0 followed by a 0) > > The description of the General::ivar error isn't help either?? > > Any idea what's going on here?? How can I assign the derivative of a > function as another funtion?! > > Thanks > Eric >