[Date Index]
[Thread Index]
[Author Index]
Re: Re: Forcing a Derivative
*To*: mathgroup at smc.vnet.net
*Subject*: [mg50834] Re: [mg50819] Re: Forcing a Derivative
*From*: Murray Eisenberg <murray at math.umass.edu>
*Date*: Thu, 23 Sep 2004 05:27:15 -0400 (EDT)
*Organization*: Mathematics & Statistics, Univ. of Mass./Amherst
*References*: <200409220412.AAA18753@smc.vnet.net>
*Reply-to*: murray at math.umass.edu
*Sender*: owner-wri-mathgroup at wolfram.com
I see no difficulty in:
f[x_] := x^2 + 7
f'[x]
2x + 7
f'[y]
2y + 7
even if one also has a definition for x[y_] or y[x_]. When f has one
argument -- and at least so far that's all that's at issue here -- f' is
the derivative of f, that is, stands for f'[#]&, so whatever the
argument given in something of the form f'[expr], the result would be
the value of the derivative at that input expr.
x[y_]
Bill Rowe wrote:
> 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
>
>
--
Murray Eisenberg murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305
Prev by Date:
**(Remote connection failed) FrontEnd is listing on wrong port?**
Next by Date:
**Arg[z] that works with zero argument?**
Previous by thread:
**Re: Forcing a Derivative**
Next by thread:
**Re: Forcing a Derivative**
| |