Re: What is the difference between z[x_]:= D[y[x],x] and z[x_]:=y'[x]?

*To*: mathgroup at smc.vnet.net*Subject*: [mg27462] Re: [mg27436] What is the difference between z[x_]:= D[y[x],x] and z[x_]:=y'[x]?*From*: BobHanlon at aol.com*Date*: Mon, 26 Feb 2001 01:29:28 -0500 (EST)*Sender*: owner-wri-mathgroup at wolfram.com

Look at what is stored under the different definitions and how the different definitions respond to numeric input. Clear[z]; z[x_] = D[y[x],x]; ?z z[5] Clear[z]; z[x_]:= D[y[x],x]; ?z z[5] Clear[z]; z[x_]:= Evaluate[D[y[x],x]]; ?z z[5] Clear[z]; z[x_]:=y'[x]; ?z z[5] Clear[z]; z[x_] =y'[x]; ?z z[5] You always have to make sure that the derivative is taken before a numerical substitution occurs with its variable of differentiation. Bob Hanlon In a message dated 2001/2/25 9:30:45 PM, gzgear at yahoo.com writes: >I want to know the difference between z[x_]:= >D[y[x],x] and z[x_]:=y'[x]. >