Re: Forcing a Derivative
- To: mathgroup at smc.vnet.net
- Subject: [mg50819] Re: Forcing a Derivative
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Wed, 22 Sep 2004 00:12:08 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On 9/21/04 at 3:49 AM, murray at math.umass.edu (Murray Eisenberg) wrote: >So really the questions is: WHY doesn't -- or, perhaps, why >shouldn't -- Mathematica understand such things as (f g)'? Or (f + >g)' ,etc.??? I think there are several issues here. First, how should Mathematica interpret f'? Sure, it is the derivative of f. But with respect to what? Yes, if I saw f was defined as x^2 + 7, I would assume f' meant df/dx. But is it reasonable for Mathematica to make this assumption when it is intended to be very general? Note f[x_] = x^2 + 7 x^2 + 7 Head[f] Symbol Head[x] Symbol The point being x and f have the same head and are not clearly distinct. So, there could have been a previous definition such as x[y_] = 2 y. If this were the case, what should Mathematica do? Compute df/dx ignoring the definition for x or compute df/dy? Also, realize the original poster did define f as I did above, that is something to operated on an expression. Consequently, f' is really undefined since no argument as been supplied. Contrast f[x] x^2 + 7 with f[2*x] 4*x^2 + 7 Again, this raises the question of what Mathematica should return for f'. It seems to me the only logical choice is to do what Mathematica currently does, return f' as unevaluated. Finally note had the original poster defined f as a pure function i.e., f = #^2+7& then f' and f'' return pure functions that are the expected derivatives, i.e., f' 2*#1 & f'' 2 & When f is defined as a pure function in this manner, Mathematica knows f has only one argument and the only reasonable interpretation of f' is the derivative of f with respect to that argument. This is quite different than writing f[x_]= and later not supplying the argument x. -- To reply via email subtract one hundred and four
- Follow-Ups:
- Re: Re: Forcing a Derivative
- From: Murray Eisenberg <murray@math.umass.edu>
- Re: Re: Forcing a Derivative