MathGroup Archive 2004

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

Search the Archive

Re: Forcing a Derivative

  • To: mathgroup at
  • Subject: [mg50819] Re: Forcing a Derivative
  • From: Bill Rowe <readnewsciv at>
  • Date: Wed, 22 Sep 2004 00:12:08 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

On 9/21/04 at 3:49 AM, murray at (Murray Eisenberg)

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


f[x_] = x^2 + 7
x^2 + 7



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

x^2 + 7


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.,

2*#1 & 

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

  • Prev by Date: Re: Inline Formulas and Answers
  • Next by Date: Re: Special case of plotting a 3D function
  • Previous by thread: Re: Forcing a Derivative
  • Next by thread: Re: Re: Forcing a Derivative