Checking what a function depends on

Clash Royale CLAN TAG#URR8PPP
up vote
7
down vote
favorite
I'd like to define specific partial derivative operators that change based on if the passed expression is a function of, for example, x vs. xi. I'm not finding anything in the documentation on how to code a check for the expressions dependence. My question is, if given some function f[x,y], how can I check the variables that it depends on?
calculus-and-analysis functions conditional
New contributor
mads is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
7
down vote
favorite
I'd like to define specific partial derivative operators that change based on if the passed expression is a function of, for example, x vs. xi. I'm not finding anything in the documentation on how to code a check for the expressions dependence. My question is, if given some function f[x,y], how can I check the variables that it depends on?
calculus-and-analysis functions conditional
New contributor
mads is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3
Possible duplicate of How to define custom differential operator using the arguments of the expression?
â Carl Woll
Sep 5 at 21:43
I think it should be possible to also useDownValues[f]to find what the function depends on, since theDownValueshas the function signature right there. It just needs to be parsed out and to extract all the symbols from insidef[x_,y_,....]and this part might be tricky to do.?DownValues
â Nasser
Sep 6 at 1:50
add a comment |Â
up vote
7
down vote
favorite
up vote
7
down vote
favorite
I'd like to define specific partial derivative operators that change based on if the passed expression is a function of, for example, x vs. xi. I'm not finding anything in the documentation on how to code a check for the expressions dependence. My question is, if given some function f[x,y], how can I check the variables that it depends on?
calculus-and-analysis functions conditional
New contributor
mads is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I'd like to define specific partial derivative operators that change based on if the passed expression is a function of, for example, x vs. xi. I'm not finding anything in the documentation on how to code a check for the expressions dependence. My question is, if given some function f[x,y], how can I check the variables that it depends on?
calculus-and-analysis functions conditional
New contributor
mads is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited Sep 5 at 21:31
kglr
159k8183383
159k8183383
New contributor
mads is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked Sep 5 at 21:12
mads
383
383
New contributor
mads is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
mads is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
mads is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3
Possible duplicate of How to define custom differential operator using the arguments of the expression?
â Carl Woll
Sep 5 at 21:43
I think it should be possible to also useDownValues[f]to find what the function depends on, since theDownValueshas the function signature right there. It just needs to be parsed out and to extract all the symbols from insidef[x_,y_,....]and this part might be tricky to do.?DownValues
â Nasser
Sep 6 at 1:50
add a comment |Â
3
Possible duplicate of How to define custom differential operator using the arguments of the expression?
â Carl Woll
Sep 5 at 21:43
I think it should be possible to also useDownValues[f]to find what the function depends on, since theDownValueshas the function signature right there. It just needs to be parsed out and to extract all the symbols from insidef[x_,y_,....]and this part might be tricky to do.?DownValues
â Nasser
Sep 6 at 1:50
3
3
Possible duplicate of How to define custom differential operator using the arguments of the expression?
â Carl Woll
Sep 5 at 21:43
Possible duplicate of How to define custom differential operator using the arguments of the expression?
â Carl Woll
Sep 5 at 21:43
I think it should be possible to also use
DownValues[f] to find what the function depends on, since the DownValues has the function signature right there. It just needs to be parsed out and to extract all the symbols from inside f[x_,y_,....] and this part might be tricky to do. ?DownValuesâ Nasser
Sep 6 at 1:50
I think it should be possible to also use
DownValues[f] to find what the function depends on, since the DownValues has the function signature right there. It just needs to be parsed out and to extract all the symbols from inside f[x_,y_,....] and this part might be tricky to do. ?DownValuesâ Nasser
Sep 6 at 1:50
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
12
down vote
accepted
Perhaps Internal`DependsOnQ:
h = f[x, g[y]];
Internal`DependsOnQ[h, #] & /@ x, y, g[y], w
True, True, True, False
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
12
down vote
accepted
Perhaps Internal`DependsOnQ:
h = f[x, g[y]];
Internal`DependsOnQ[h, #] & /@ x, y, g[y], w
True, True, True, False
add a comment |Â
up vote
12
down vote
accepted
Perhaps Internal`DependsOnQ:
h = f[x, g[y]];
Internal`DependsOnQ[h, #] & /@ x, y, g[y], w
True, True, True, False
add a comment |Â
up vote
12
down vote
accepted
up vote
12
down vote
accepted
Perhaps Internal`DependsOnQ:
h = f[x, g[y]];
Internal`DependsOnQ[h, #] & /@ x, y, g[y], w
True, True, True, False
Perhaps Internal`DependsOnQ:
h = f[x, g[y]];
Internal`DependsOnQ[h, #] & /@ x, y, g[y], w
True, True, True, False
answered Sep 5 at 21:30
kglr
159k8183383
159k8183383
add a comment |Â
add a comment |Â
mads is a new contributor. Be nice, and check out our Code of Conduct.
mads is a new contributor. Be nice, and check out our Code of Conduct.
mads is a new contributor. Be nice, and check out our Code of Conduct.
mads is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f181300%2fchecking-what-a-function-depends-on%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password

3
Possible duplicate of How to define custom differential operator using the arguments of the expression?
â Carl Woll
Sep 5 at 21:43
I think it should be possible to also use
DownValues[f]to find what the function depends on, since theDownValueshas the function signature right there. It just needs to be parsed out and to extract all the symbols from insidef[x_,y_,....]and this part might be tricky to do.?DownValuesâ Nasser
Sep 6 at 1:50