Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: assigning functions

  • To: mathgroup at
  • Subject: [mg56223] Re: [mg56204] assigning functions
  • From: yehuda ben-shimol <bsyehuda at>
  • Date: Wed, 20 Apr 2005 05:29:53 -0400 (EDT)
  • References: <>
  • Reply-to: yehuda ben-shimol <bsyehuda at>
  • Sender: owner-wri-mathgroup at

All you need is to assign the value of x AFTER applying the function,
so do as follows
Or define the function differently 
such as
and then call it with 
fprime1[f,2] and get the desired results.
Please note that I modified fprime1 a little bit so it would be more
general and can be applied for other functions and not only on the
globally defined f[x_]:=x^2 as you did
good luck

On 4/19/05, juejung <juejung at> wrote:
> dear all,
> i would like to do the following.
> assign a function:
> f[x_] := x^2;
> take its derivate:
> D[f[x], x]
> and assign the result of this to a new function, like fprime[x]:
> fprime[x_] := D[f[x], x]
> unfortunately that doesn't work.
> when i try to evaluate fprime[2] i get an error message.
> can somebody please help, this haunts me for a while now.
> thanks and all the best
> juergen

  • Prev by Date: Re: match 1, replace 2
  • Next by Date: Re: (x-y) DiracDelta[x-y] does not simplify to 0
  • Previous by thread: Re: assigning functions
  • Next by thread: Re: Integrate is driving me crazy, please help!