Message Boards Message Boards

0
|
3102 Views
|
4 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Difference between two apparently identical operators?

Posted 8 years ago

I found out that doing

NdivV[z_] := z qdivV'[z]

is different from

NdivV[z_] := z D[qdivV[z],z]

Because the latter will give me a result that when i try to evaluate yields the General::ivar error saying that "A product cannot be used as a variable" Why can't it be so?

POSTED BY: tomas giud
4 Replies
Posted 8 years ago

It would be a great surprise if N0[z_] := z*D[-Log[1 - z], z] would work fine. Try e.g. N0[1]!

If N0[1] is evaluated, the parameter: z is replaced by 1 resulting in:

1*D[-Log[1-1],1]

what is garbage.

POSTED BY: Dan Huber

You specifically asked for this behavior! You used delayed evaluation (:=) meaning, first fill in the values of z then evaluate. In this case you want the regular evaluation (evaluate then fill in):

N0[z_] = z*D[-Log[1 - z], z]

Now N0[z_] is set to z/(1-z) as expected, and you can evaluate any z... You can ask for the definitions of N0 by typing ?N0

POSTED BY: Sander Huisman
Posted 8 years ago

Also, to my surprise

N0[z_] := z*D[-Log[1 - z], z]

works fine!

POSTED BY: tomas giud

The ' stands for the function Derivative rather than the function D.

See the documentation: tutorial/TheRepresentationOfDerivatives

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract