| Author |
Comment/Response |
Bill Simpson
|
10/14/12 4:18pm
In[1]:= z:=x+I*y;
f[z_]:=z^2+3*z+2
D[f[z],x]
Out[3]= 3+2(x+I y)
f[z_]:= defines a function f that takes a single argument of any kind. That z_ says that you want to name that argument z while inside the definition of the function and the _ says this will match any single expression.
What you had then done is tried to use f[x,y] which looks like a function f that takes two arguments, x and y. But you had not defined a function f that accepted two functions, so it did nothing.
Read through this
http://reference.wolfram.com/mathematica/tutorial/DefiningFunctions.html
and see if it makes a little more sense
URL: , |
|