Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: How to use "Apply" to do differentiation ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg114555] Re: How to use "Apply" to do differentiation ?
  • From: Achilleas Lazarides <achilleas.lazarides at gmx.com>
  • Date: Tue, 7 Dec 2010 06:48:53 -0500 (EST)

This works
NestList[D[#, x] &, x^5, 5]
(without {}). This is because Nest doesn't replace the Head of its second argument by its first, as Apply does.

To check what you wanted to check, you could try
D[#, x] &@(x^5)
as opposed to
D[#, x] &@@(x^5)
which is what you did try.

On Dec6, 2010, at 4:57 AM, Chenguang Zhang wrote:

> I tried to recursively apply differentiation to a normal
> distribution function,
> and before using Nest command I wanted to check if pure function worked...
> Now I know that I missed "{}" in my command and Apply[D[#,x]&, {x^5}] is
> the correct one. Thanks to all!



  • Prev by Date: Re: Control my MAC using Mathematica
  • Next by Date: Re: Changing Graph style
  • Previous by thread: Re: How to use "Apply" to do differentiation ?
  • Next by thread: Re: How to use "Apply" to do differentiation ?