MathGroup Archive 1999

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

Search the Archive

Re: D vs. Derivative

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15642] Re: [mg15601] D vs. Derivative
  • From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
  • Date: Sat, 30 Jan 1999 04:28:39 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Gianluca! (It's been a long time...)

I noticed this sort of thing some time ago too. f' often seems to work
better when you define your function using Function. In your case
In[27]:=
f =Function[x, Sum[ x^(n-1)/(n^3+n), {n, 1, Infinity} ]];f'[x] Out[27]=
1   1
-- (- (-1 + I + (1 - I) HypergeometricPFQ[{I, 1}, {1 + I}, 
 2  2
x
 
         x] + x HypergeometricPFQ[{1, 1 - I}, {2 - I}, x]) + 
 
    Log[1 - x])

If you use patterns in your definition D[f[x],x] gives in fact a more
complicated looking, although equivalent, answer,.


Moreover, if you use the Function definition you D[f[x],x] also works
and gives the same (complicated) answer as in the case of pattern based
definiton.

As I said above, I noticed some time ago that Function seems to work
better and told my calculus students to define functions in this way
rather than by using patterns. I would like to hear from someone from
wri whether this is really justified or just based on a few
"accidents".

On Thu, Jan 28, 1999, Gianluca Gorni <gorni at dimi.uniud.it> wrote:


>Hello!
>
>It seems that D[f[x],x] and f'[x] are not equivalent, and the latter can
>give useless outputs.
>
>Consider the following power series, that converges in the unit disk of
>the complex field:
>
>   f[x_] = Sum[ x^(n-1)/(n^3+n), {n, 1, Infinity} ]
>
>With immediate assignment, f[x] is evaluated to a special function.
>Suppose now that I need the derivative of f[x]. If I do it with
>
>   D[ f[x], x ]
>
>there is no problem: I get a regular-looking special function
>combination. But if I try to get the derivative with
>
>   f'[x]
>
>the output is a formula containing DirectedInfinity. Moreover
>
>   f'[x] // Simplify
>
>gives Indeterminate.
>
>By the way, the integral
>
>   Integrate[ (1-Cos[y])/(E^y-x), {y, 0, Infinity} ]
>
>is left as it is by Mathematica, although it is equal to the special
>function f[x] above, at least for many values of x.
>
>My version is 3.0.1 for PowerMacintosh.
>
>                     Gianluca Gorni
>
>
> +---------------------------------+
> | Gianluca Gorni                  |
> | Universita` di Udine            |
> | Dipartimento di Matematica      |
> |   e Informatica                 |
> | via delle Scienze 208           |
> | I-33100 Udine UD                |
> | Italy                           |
> +---------------------------------+
> | Ph.: (39) 0432-558422           |
> | Fax: (39) 0432-558499           |
> | mailto:gorni at dimi.uniud.it      |
> | http://www.dimi.uniud.it/~gorni |
> +---------------------------------+
>
>


Andrzej Kozlowski
Toyama International University
JAPAN
http://sigma.tuins.ac.jp/
http://eri2.tuins.ac.jp/



  • Prev by Date: Re: D vs. Derivative
  • Next by Date: RE: speed
  • Previous by thread: Re: D vs. Derivative
  • Next by thread: Block vs. Module