MathGroup Archive 2001

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

Search the Archive

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


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].
>


  • Prev by Date: "just a bug" !; Mathematica 4
  • Next by Date: Re: Graphing Level Sets
  • Previous by thread: What is the difference between z[x_]:= D[y[x],x] and z[x_]:=y'[x]?
  • Next by thread: Re: What is the difference between z[x_]:= D[y[x],x] and z[x_]:=y'[x]?