Problem with the Derivative Operator (')
up vote
2
down vote
favorite
I was working through some physics equations and came to a dead stop when I couldn't get the Derivative
operator to work on equations with 2 variables. An example I striped the problem down to is below. What subtle coding principal am I missing about symbolics? I have the documentation open on the other screen and it's not exactly clear how to work with pairs as inputs to functions. I looked at everything with Fullform
and didn't see anything too unexpected. Is there an explanation as to what's going on?
h[h_] := h^2 + 2 h +3
h'[u]
2+2 u
(returns as expected)
f[{x_,y_}] := x^4 + y^4
Derivative[1][f][{x,y}]
f'[{x,y}]
f′[{x,y}]
f′[{x,y}]
list-manipulation functions education
add a comment |
up vote
2
down vote
favorite
I was working through some physics equations and came to a dead stop when I couldn't get the Derivative
operator to work on equations with 2 variables. An example I striped the problem down to is below. What subtle coding principal am I missing about symbolics? I have the documentation open on the other screen and it's not exactly clear how to work with pairs as inputs to functions. I looked at everything with Fullform
and didn't see anything too unexpected. Is there an explanation as to what's going on?
h[h_] := h^2 + 2 h +3
h'[u]
2+2 u
(returns as expected)
f[{x_,y_}] := x^4 + y^4
Derivative[1][f][{x,y}]
f'[{x,y}]
f′[{x,y}]
f′[{x,y}]
list-manipulation functions education
Better useD
for total derivatives, e.g.D[f[{x, y}], {{x, y}, 1}]
andD[f[{x, y}], {{x, y}, 2}]
.
– Henrik Schumacher
2 days ago
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I was working through some physics equations and came to a dead stop when I couldn't get the Derivative
operator to work on equations with 2 variables. An example I striped the problem down to is below. What subtle coding principal am I missing about symbolics? I have the documentation open on the other screen and it's not exactly clear how to work with pairs as inputs to functions. I looked at everything with Fullform
and didn't see anything too unexpected. Is there an explanation as to what's going on?
h[h_] := h^2 + 2 h +3
h'[u]
2+2 u
(returns as expected)
f[{x_,y_}] := x^4 + y^4
Derivative[1][f][{x,y}]
f'[{x,y}]
f′[{x,y}]
f′[{x,y}]
list-manipulation functions education
I was working through some physics equations and came to a dead stop when I couldn't get the Derivative
operator to work on equations with 2 variables. An example I striped the problem down to is below. What subtle coding principal am I missing about symbolics? I have the documentation open on the other screen and it's not exactly clear how to work with pairs as inputs to functions. I looked at everything with Fullform
and didn't see anything too unexpected. Is there an explanation as to what's going on?
h[h_] := h^2 + 2 h +3
h'[u]
2+2 u
(returns as expected)
f[{x_,y_}] := x^4 + y^4
Derivative[1][f][{x,y}]
f'[{x,y}]
f′[{x,y}]
f′[{x,y}]
list-manipulation functions education
list-manipulation functions education
edited 2 days ago
Henrik Schumacher
45.1k365131
45.1k365131
asked 2 days ago
BBirdsell
367313
367313
Better useD
for total derivatives, e.g.D[f[{x, y}], {{x, y}, 1}]
andD[f[{x, y}], {{x, y}, 2}]
.
– Henrik Schumacher
2 days ago
add a comment |
Better useD
for total derivatives, e.g.D[f[{x, y}], {{x, y}, 1}]
andD[f[{x, y}], {{x, y}, 2}]
.
– Henrik Schumacher
2 days ago
Better use
D
for total derivatives, e.g. D[f[{x, y}], {{x, y}, 1}]
and D[f[{x, y}], {{x, y}, 2}]
.– Henrik Schumacher
2 days ago
Better use
D
for total derivatives, e.g. D[f[{x, y}], {{x, y}, 1}]
and D[f[{x, y}], {{x, y}, 2}]
.– Henrik Schumacher
2 days ago
add a comment |
2 Answers
2
active
oldest
votes
up vote
5
down vote
accepted
When a function has 2 arguments (not a single list argument), use:
f[x_, y_] := x^4 + y^4
Derivative[1, 0][f][x, y]
Derivative[0, 1][f][x, y]
4 x^3
4 y^3
Ah. So I was miss reading the documentation. Thank you.
– BBirdsell
2 days ago
add a comment |
up vote
1
down vote
Here are two approaches. The first requires perhaps more tolerance for "noisy" notation. Note that I did not use a vector argument. If you must, the notation will be correspondingly "noisier".
Clear[f, x, y]
Dt[f[x, y]]
Grad[f[x, y], {x, y}].{dx, dy}
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
When a function has 2 arguments (not a single list argument), use:
f[x_, y_] := x^4 + y^4
Derivative[1, 0][f][x, y]
Derivative[0, 1][f][x, y]
4 x^3
4 y^3
Ah. So I was miss reading the documentation. Thank you.
– BBirdsell
2 days ago
add a comment |
up vote
5
down vote
accepted
When a function has 2 arguments (not a single list argument), use:
f[x_, y_] := x^4 + y^4
Derivative[1, 0][f][x, y]
Derivative[0, 1][f][x, y]
4 x^3
4 y^3
Ah. So I was miss reading the documentation. Thank you.
– BBirdsell
2 days ago
add a comment |
up vote
5
down vote
accepted
up vote
5
down vote
accepted
When a function has 2 arguments (not a single list argument), use:
f[x_, y_] := x^4 + y^4
Derivative[1, 0][f][x, y]
Derivative[0, 1][f][x, y]
4 x^3
4 y^3
When a function has 2 arguments (not a single list argument), use:
f[x_, y_] := x^4 + y^4
Derivative[1, 0][f][x, y]
Derivative[0, 1][f][x, y]
4 x^3
4 y^3
answered 2 days ago
Carl Woll
65.2k285171
65.2k285171
Ah. So I was miss reading the documentation. Thank you.
– BBirdsell
2 days ago
add a comment |
Ah. So I was miss reading the documentation. Thank you.
– BBirdsell
2 days ago
Ah. So I was miss reading the documentation. Thank you.
– BBirdsell
2 days ago
Ah. So I was miss reading the documentation. Thank you.
– BBirdsell
2 days ago
add a comment |
up vote
1
down vote
Here are two approaches. The first requires perhaps more tolerance for "noisy" notation. Note that I did not use a vector argument. If you must, the notation will be correspondingly "noisier".
Clear[f, x, y]
Dt[f[x, y]]
Grad[f[x, y], {x, y}].{dx, dy}
add a comment |
up vote
1
down vote
Here are two approaches. The first requires perhaps more tolerance for "noisy" notation. Note that I did not use a vector argument. If you must, the notation will be correspondingly "noisier".
Clear[f, x, y]
Dt[f[x, y]]
Grad[f[x, y], {x, y}].{dx, dy}
add a comment |
up vote
1
down vote
up vote
1
down vote
Here are two approaches. The first requires perhaps more tolerance for "noisy" notation. Note that I did not use a vector argument. If you must, the notation will be correspondingly "noisier".
Clear[f, x, y]
Dt[f[x, y]]
Grad[f[x, y], {x, y}].{dx, dy}
Here are two approaches. The first requires perhaps more tolerance for "noisy" notation. Note that I did not use a vector argument. If you must, the notation will be correspondingly "noisier".
Clear[f, x, y]
Dt[f[x, y]]
Grad[f[x, y], {x, y}].{dx, dy}
answered 2 days ago
Alan
6,1781124
6,1781124
add a comment |
add a comment |
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f186177%2fproblem-with-the-derivative-operator%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Better use
D
for total derivatives, e.g.D[f[{x, y}], {{x, y}, 1}]
andD[f[{x, y}], {{x, y}, 2}]
.– Henrik Schumacher
2 days ago