MathGroup Archive 2004

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

Search the Archive

Re: Re: Re: Re: Re: Forcing a Derivative


My point was slightly different. What I meant was that in Mathematica 
almost everything is, in a sense, a function and almost everything can 
be an argument of a function, in that you can write

f[a]

where f and a can be almost any symbol. And the whole issue is whether 
one wants this:


Through[(f+g)[a]]

f[a]+g[a]

to happen automatically even when Through is not present (similarly 
with Times etc).  Once you modify Plus, Times and Power in the  obvious 
way so that this happens you will get the behaviour for derivatives you 
seem to want automatically. However, as I wrote earlier, I am not 
entirely convinced that it is desirable that this sort of thing should 
happen automatically. I can't give at this moment a sensible, concrete 
example  of any inconvenience this behaviour would cause but it would 
further impose certain interpretation on what are after all only 
abstract symbols and might make it harder to use them in a different 
way (in other words, one may be able to think of contexts  when one 
does not want (f+g)[x] to be automatically converted to f[x] +g[x]).
I think of Mathematica essentially as an "algebraic programming 
language", rather than a program designed with specific mathematical 
applications, e.g complex analysis, number theory etc. in  mind. In a 
programming language flexibility is valuable, if some particular 
behaviour is too much tied to a particular application or context it 
will make it harder to apply it to other applications or contexts. Of 
course there is always the need to find a balance: note for example 
that the Mathematica evaluator will expand this automatically

(a*b)^3

a^3*b^3

but not this

(a + b)^3

(a + b)^3

There are lot's of choices of this kind that have to be made and even 
in the simple case of the first example above you will find that there 
are from time to time users who find it inconvenient. All these are 
matters of design and in most cases Ithink whatever choices are made 
someone will think they are the wrong ones.

Andrzej  Kozlowski

On 23 Sep 2004, at 18:27, Murray Eisenberg wrote:

> *This message was transferred with a trial version of CommuniGate(tm) 
> Pro*
> I agree that Mathematica's notion of function MAY be broader than in
> Mathematics in some respects (but in others is MUCH narrower -- that's
> quite another topic).  But I don't quite see how that necessarily
> precludes a reasonable implementation of such an algebra of
> numerically-valued functions of numerical arguments.
>
> After all, I would not try to evaluate
>
>    Plot'[x]
>
> either!  But that doesn't prohibit me from evaluating, say, Sin'[x].
>
> Likewise, just because I would not dream of asking for the 
> syntactically
> correct expression
>
>    Plot + NumberForm
>
> to have meaning does not preclude a meaning for, say, Sin + Exp.
>
>
>
> Andrzej Kozlowski wrote:
>
>> But one does not need to introduce x in f:
>>
>> f[x_]:=x^3
>>
>>
>> Derivative[2][f]
>>
>> 6 #1&
>>
>> No x was needed.
>>
>> As has been pointed out already a number of times, what is not
>> implemented by default is the algebra of complex  functions, that is,
>> if f and g are functions then 2f + 3 g or 5 f*g are not considered by
>> Mathematica to be functions. One reason for that maybe that in
>> Mathematica the notion of a "function" is broader than in Mathematics.
>> In any case the algebras of functions and operators are easy to
>> implement oneself and this has already been done more than once on 
>> this
>> list....
>
>
> -- 
> 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: Re: Timing of statements inside a cell
  • Next by Date: help on Rewrite rules
  • Previous by thread: Re: Re: Re: Re: Forcing a Derivative
  • Next by thread: Re: Forcing a Derivative