Re: Forcing a Derivative

*To*: mathgroup at smc.vnet.net*Subject*: [mg50767] Re: [mg50753] Forcing a Derivative*From*: "David Park" <djmp at earthlink.net>*Date*: Sun, 19 Sep 2004 21:39:23 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

Scott, You have to actually put the FUNCTION in the Derivative[x][function] statement and then append a [x] to evaluate at an x value. I assume that you really want the product of the two functions. f[x_] = x^2 + 7; g[x_] = 3x^3 + 23; Derivative[2][Function[x, f[x]g[x]]] %[x] Function[x, 18*x*f[x] + 2*g[x] + 2*Derivative[1][f][x]*Derivative[1][g][x]] 36*x^3 + 18*x*(7 + x^2) + 2*(23 + 3*x^3) Or using the slot form Derivative[2][f[#]g[#] &] %[x] 2*g[#1] + 18*f[#1]*#1 + 2*Derivative[1][f][#1]* Derivative[1][g][#1] & 36*x^3 + 18*x*(7 + x^2) + 2*(23 + 3*x^3) This checks with the usual method of taking the derivative. D[f[x]g[x], {x, 2}] 36*x^3 + 18*x*(7 + x^2) + 2*(23 + 3*x^3) David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Scott Guthery [mailto:sguthery at mobile-mind.com] To: mathgroup at smc.vnet.net How does one force Derivative[n] to actually take the derivative? For example if ... f[x_] = x^2 + 7 g[x_]=3x^3 + 23 then Derivative[2][f * g] just puts a couple of primes on the product rather than actually computing the dervative. Thanks for any insight. Cheers, Scott