I am an absolute beginner in maple and have problems to understand the following:
The following does not work:
f:=(x)->x^2;
df_wrong:=(x)->diff(f(x),x);
Since df_wrong(1);
always yields the following "Error, (in df_wrong) invalid input: diff received 1, which is not valid for its 2nd argument
". After some time I found that the following solves this:
df_correct := unapply(diff(f(x), x), x);
Since df_correct(1);
. Could anyone explain me what is the problem the problem in using df_wrong
and maybe why unapply()
solves these?
I have checked the Maple explanation of unapply()
, but it is somehow still not very clear to me.
Thanks in advance!