Group Abstract Group Abstract

Message Boards Message Boards

0
|
10.5K Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

How to represent a function properly?

Posted 11 years ago
POSTED BY: Sanjoy Das
Posted 11 years ago

I'm not sure if this helps but if you are set in using pure functions (ie Function[vars,body]) then perhaps this would help:

p=Function[{x,z},f[x,z]]

and D[p[x,z],x], D[p[x,z],z] should return the appropriate derivatives of the body (ie the formula) of your function (the f[x,z] part)

Also, defining x=Function[theta,g[theta]] and calling D[p[x[theta],z],theta] and D[p[x[theta],z],x[theta]] should work as expected.

I don't know what you want to achieve but (in my experience) perhaps you'd be better off by defining your functions using setdelayed (:=) as in f[x_]:=Module[{local vars}, body[x]] when using D[]

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