MathGroup Archive 2008

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

Search the Archive

Re: Re: bug? f'[x]'

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90951] Re: [mg90933] Re: bug? f'[x]'
  • From: DrMajorBob <drmajorbob at att.net>
  • Date: Thu, 31 Jul 2008 02:57:27 -0400 (EDT)
  • References: <200807281153.HAA20595@smc.vnet.net>
  • Reply-to: drmajorbob at longhorns.com

As I'd said before, f[x]' is pretty much meaningless (without more  
definition than you've given). In Mathematica, f' is a function if f is a  
differentiable function, but is f[x] a function? No, or not usually.

For instance, evaluate

Clear[f]
f[x_] = x;
f[x][y]

x[y]

and so, naturally,

f[x]'[y]

(x^\[Prime])[y]

(Judge for yourself how useful that can possibly be.)

f[x]' DOES make sense in a case like this:

Clear[f]
f[x_][y_] := Sin[x y];
f[x][y]

Sin[x y]

and then

f[x]'[y]

x Cos[x y]

but

f'[x]

(f^\[Prime])[x]

That's unevaluatable because f isn't a function of one variable.

But this works perfectly:

f[x]'

x Cos[x #1] &

since f[x] IS a function of one variable.

Bobby

On Wed, 30 Jul 2008 02:52:47 -0500, Ben <Benjamin.R.Lewis at gmail.com> wrote:

> Mathematica does distinguish between f'[x] (evaluating the derivative)
> and f[x]' (derivative of the evaluation), so it seems unreasonable
> that this behaviour should change when f is written in terms of its
> antiderivative (i.e., f->g').
>
> In other words, what is the justification for Derivative[i]
> [ (Derivative[j][g][x]) ][y] ever evaluating to Derivative[i+j][g][x]
> [y]?
>
> Even this behaviour is not consistent. Mathematica reverts to
> mathematically correct behaviour again if g was explicitly specified.
> For example, consider the function that takes an argument and returns
> the operator for multiplication by the cube of that argument
> (g=Function[x,Function[y,y*x^3]]). The derivative of its evaluation is
> obviously (an operator that returns) a constant (namely the cube of
> that argument, or zero for higher derivatives). By contrast, the
> evaluation of the derivative is not a constant (it is the partial with
> respect to the argument, an operator for multiplication by thrice the
> squared argument; zero is not produced until the fourth derivative).
> So, {g''[x][y],g'[x]'[y],g[x]''[y]}==={6xy,3x^2,0}.
>
> Even Derivative[j]//Derivative[i] evaluates further, nonsensically
> (garbage input ought only echo), as though a rule constraint had been
> overlooked. I wondered if there could be scoping error, as internal
> conversions involving #& are documented for Derivative. Also, this is
> not the only case of odd behaviour involving the distinction between
> numbers and operators:
> http://groups.google.com/group/comp.soft-sys.math.mathematica/browse_thread/thread/2b99d45979de6fd9/06396fcccf718c01
>
> Ben
>
> On Jul 29, 3:48 pm, Andrzej Kozlowski <a... at mimuw.edu.pl> wrote:
>> Since, however, it is not documented
>> (and illogical) it is certianly cannot be regarded as any kind of "bug".
>
>



-- 
DrMajorBob at longhorns.com


  • References:
  • Prev by Date: rotate axes labels with Plot3D?
  • Next by Date: Re: Figure Title
  • Previous by thread: Re: Re: bug? f'[x]'
  • Next by thread: Re: bug? f'[x]'