Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6675053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:48:22+00:00 2026-05-26T03:48:22+00:00

I can construct a list of values of a function evaluated at a set

  • 0

I can construct a list of values of a function evaluated at a set of values, as in simplelist below

Clear[f, g, simplelist, d, dlist1, dlist2]
f[x_] := Exp[ -x^2]
g[n_] := f[x] (-1)^n
simplelist = g[{0, 1, 2, 3, 4}]

d[n_] := Derivative[n][f][x] 
dlist1 = d[{0, 1, 2, 3, 4}]
dlist2 = {d[0], d[1], d[2], d[3], d[4]}

This gives me

{E^-x^2, -E^-x^2, E^-x^2, -E^-x^2, E^-x^2}

as expected.

If I build up a function (d) that implicitly has two parameters, n and x, I think my attempt to evaluate it with a list of values for [n], ends up evaluated with that list used for the values [x], because I get all zeros for the result as if the derivative of a constant was taken:

{0, 0, 0, 0, 0}

compare this to the dlist2 value, where I am explicit, but use a clumsy method of constructing the list, and get:

{E^-x^2, -2 E^-x^2 x, -2 E^-x^2 + 4 E^-x^2 x^2, 12 E^-x^2 x - 8 E^-x^2 x^3, 12 E^-x^2 - 48 E^-x^2 x^2 + 16 E^-x^2 x^4}

This question really has two parts:

1) Can somebody confirm that this function ends up implicitly listable using [x] instead of [n], and perhaps elaborate on how this works.

2) I suspect I’m approaching this in a way that is probably whacked, so while it may be possible to force something like this to do what I’d tried, I really only want a good way to build up a list of values

{ h[0], h[1], ... h[n] }

I assume this can be done with a for loop and an Append function, but with the rich syntax available there must be a better way.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:48:23+00:00Added an answer on May 26, 2026 at 3:48 am

    Regarding 1. – your guess is not correct. What really happens is that Derivative has a special interpretation when the first argument (n) is a list, so that Derivative[{1,2}][f][x] will attempt to differentiate once over the first argument of f (which is x), and twice over the second (missing!) – it is this differentiation that gives zero. When, in addition, f is also Listable and of a single argument, it becomes a bit more complex, but the idea is the same.

    Regarding 2.:

    SetAttributes[d, Listable]
    

    will fix it. The reason why Listable attribute helps is that the threading over a list associated with it happens before d gets evaluated on a particular argument, therefore in this way, you never supply a list to Derivative, which is then only called on all members of the list separately – which is what you needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can understand zip() function is used to construct a list of tuples like
How can I construct my ajaxSend call, this seems like the place to put
Given some typical search form, I can't construct this form action when submitting a
Is there any way I can construct an new object from the given object
In python, I can construct my optparse instance such that it will automatically filter
How can I construct a MSBuild ItemGroup to exclude .svn directories and all files
How can I construct the following string in an Excel formula: Maurice "The Rocket"
How can I construct an object using a query if I also need to
How can I construct a query against an custom IUserType field in NHibernate? More
how can i construct a artificial request to login to twitter or any site

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.