Relations between two reciprocal partial derivatives?
$begingroup$
My question is similar to How to get the partial derivative of the inverse functions?
But they are different.
If we have a function $z=z(x,y)$, we can calculate the partial derivative $left.frac{partial^2z}{partial x^2}right|_y$. We can solve the original equation to obtain $x=x(z,y)$, and now we can also calculate the derivative $left.frac{partial^2x}{partial z^2}right|_y$.
I can directly calculate the relation between the two derivatives by hand. The result is
$$left.frac{partial^2z}{partial x^2}right|_y=-left(left.frac{partial x}{partial z}right|_yright)^{-3}cdotleft.frac{partial^2x}{partial z^2}right|_y.$$
What about higher-order derivatives? I think this is not a difficult job in MMA, but I cannot catch the point.
equation-solving calculus-and-analysis
$endgroup$
add a comment |
$begingroup$
My question is similar to How to get the partial derivative of the inverse functions?
But they are different.
If we have a function $z=z(x,y)$, we can calculate the partial derivative $left.frac{partial^2z}{partial x^2}right|_y$. We can solve the original equation to obtain $x=x(z,y)$, and now we can also calculate the derivative $left.frac{partial^2x}{partial z^2}right|_y$.
I can directly calculate the relation between the two derivatives by hand. The result is
$$left.frac{partial^2z}{partial x^2}right|_y=-left(left.frac{partial x}{partial z}right|_yright)^{-3}cdotleft.frac{partial^2x}{partial z^2}right|_y.$$
What about higher-order derivatives? I think this is not a difficult job in MMA, but I cannot catch the point.
equation-solving calculus-and-analysis
$endgroup$
add a comment |
$begingroup$
My question is similar to How to get the partial derivative of the inverse functions?
But they are different.
If we have a function $z=z(x,y)$, we can calculate the partial derivative $left.frac{partial^2z}{partial x^2}right|_y$. We can solve the original equation to obtain $x=x(z,y)$, and now we can also calculate the derivative $left.frac{partial^2x}{partial z^2}right|_y$.
I can directly calculate the relation between the two derivatives by hand. The result is
$$left.frac{partial^2z}{partial x^2}right|_y=-left(left.frac{partial x}{partial z}right|_yright)^{-3}cdotleft.frac{partial^2x}{partial z^2}right|_y.$$
What about higher-order derivatives? I think this is not a difficult job in MMA, but I cannot catch the point.
equation-solving calculus-and-analysis
$endgroup$
My question is similar to How to get the partial derivative of the inverse functions?
But they are different.
If we have a function $z=z(x,y)$, we can calculate the partial derivative $left.frac{partial^2z}{partial x^2}right|_y$. We can solve the original equation to obtain $x=x(z,y)$, and now we can also calculate the derivative $left.frac{partial^2x}{partial z^2}right|_y$.
I can directly calculate the relation between the two derivatives by hand. The result is
$$left.frac{partial^2z}{partial x^2}right|_y=-left(left.frac{partial x}{partial z}right|_yright)^{-3}cdotleft.frac{partial^2x}{partial z^2}right|_y.$$
What about higher-order derivatives? I think this is not a difficult job in MMA, but I cannot catch the point.
equation-solving calculus-and-analysis
equation-solving calculus-and-analysis
edited 2 hours ago
Carl Woll
73.7k398192
73.7k398192
asked 4 hours ago
Mark_PhysMark_Phys
1286
1286
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
This iterative method will give substitution rules up to the order equal to the maxorder. It's not a good idea to use x for both a variable and a function name, so I called it f. (For instance, if you want to replace the variable x by a number, Mathematica is also very likely to replace the x in the function x[z, y] by the number, which makes no sense. However the code below produces the right formula, if you use x[z[x, y], y] instead of f[z[x, y], y].)
iter[{eq_, dz_, derivrules_}] := {#, #2, Join[derivrules, First@Solve[##]]} &[
D[eq, x] /. derivrules, D[dz, x]];
maxorder = 4;
drules = Last@Nest[iter, {x == f[z[x, y], y], z[x, y], {}}, maxorder];
Column[drules, Dividers -> All]

D[z[x, y], {x, 3}] /. drules

$endgroup$
add a comment |
$begingroup$
Here's another approach where I give Derivative a definition so that rules are not needed (it happens automatically). I'll use Michael's starting point:
eqn = x == f[z[x, y], y]
x == f[z[x, y], y]
and differentiate with respect to x:
deqn = D[eqn, x];
deqn //InputForm
1 == Derivative[1, 0][f][z[x, y], y]*Derivative[1, 0][z][x, y]
Solving for Derivative[1, 0][z][x, y] (which is $left. frac{partial z}{partial x} right|_y$ in your notation):
Derivative[1, 0][z][x, y] == 1 / Derivative[1, 0][f][z[x, y], y]
Let's turn this into a definition for Derivative:
Derivative[1, 0][z][x_, y_] = 1 / Derivative[1, 0][f][z[x, y], y];
Derivative[n_Integer?Positive, 0][z][x_, y_] := D[Derivative[1, 0][z][x, y], {x, n-1}]
Your first result can be obtained with:
Derivative[2, 0][z][x, y] //TeXForm
$-frac{f^{(2,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^3}$
or:
D[z[x, y], {x, 2}] //TeXForm
$-frac{f^{(2,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^3}$
Here's a table showing agreement with Michael's results:
Grid[
Table[
{Derivative[n, 0][Inactive@z][x, y], Derivative[n, 0][z][x, y]},
{n, 4}
],
Dividers -> All
] //TeXForm
$begin{array}{|c|c|}
hline
z^{(1,0)}(x,y) & frac{1}{f^{(1,0)}(z(x,y),y)} \
hline
z^{(2,0)}(x,y) & -frac{f^{(2,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^3} \
hline
z^{(3,0)}(x,y) & frac{3
f^{(2,0)}(z(x,y),y)^2}{f^{(1,0)}(z(x,y),y)^5}-frac{f^{(3,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y
)^4} \
hline
z^{(4,0)}(x,y) & -frac{15 f^{(2,0)}(z(x,y),y)^3}{f^{(1,0)}(z(x,y),y)^7}+frac{10
f^{(3,0)}(z(x,y),y)
f^{(2,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^6}-frac{f^{(4,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^
5} \
hline
end{array}$
$endgroup$
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "387"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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%2f195120%2frelations-between-two-reciprocal-partial-derivatives%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
This iterative method will give substitution rules up to the order equal to the maxorder. It's not a good idea to use x for both a variable and a function name, so I called it f. (For instance, if you want to replace the variable x by a number, Mathematica is also very likely to replace the x in the function x[z, y] by the number, which makes no sense. However the code below produces the right formula, if you use x[z[x, y], y] instead of f[z[x, y], y].)
iter[{eq_, dz_, derivrules_}] := {#, #2, Join[derivrules, First@Solve[##]]} &[
D[eq, x] /. derivrules, D[dz, x]];
maxorder = 4;
drules = Last@Nest[iter, {x == f[z[x, y], y], z[x, y], {}}, maxorder];
Column[drules, Dividers -> All]

D[z[x, y], {x, 3}] /. drules

$endgroup$
add a comment |
$begingroup$
This iterative method will give substitution rules up to the order equal to the maxorder. It's not a good idea to use x for both a variable and a function name, so I called it f. (For instance, if you want to replace the variable x by a number, Mathematica is also very likely to replace the x in the function x[z, y] by the number, which makes no sense. However the code below produces the right formula, if you use x[z[x, y], y] instead of f[z[x, y], y].)
iter[{eq_, dz_, derivrules_}] := {#, #2, Join[derivrules, First@Solve[##]]} &[
D[eq, x] /. derivrules, D[dz, x]];
maxorder = 4;
drules = Last@Nest[iter, {x == f[z[x, y], y], z[x, y], {}}, maxorder];
Column[drules, Dividers -> All]

D[z[x, y], {x, 3}] /. drules

$endgroup$
add a comment |
$begingroup$
This iterative method will give substitution rules up to the order equal to the maxorder. It's not a good idea to use x for both a variable and a function name, so I called it f. (For instance, if you want to replace the variable x by a number, Mathematica is also very likely to replace the x in the function x[z, y] by the number, which makes no sense. However the code below produces the right formula, if you use x[z[x, y], y] instead of f[z[x, y], y].)
iter[{eq_, dz_, derivrules_}] := {#, #2, Join[derivrules, First@Solve[##]]} &[
D[eq, x] /. derivrules, D[dz, x]];
maxorder = 4;
drules = Last@Nest[iter, {x == f[z[x, y], y], z[x, y], {}}, maxorder];
Column[drules, Dividers -> All]

D[z[x, y], {x, 3}] /. drules

$endgroup$
This iterative method will give substitution rules up to the order equal to the maxorder. It's not a good idea to use x for both a variable and a function name, so I called it f. (For instance, if you want to replace the variable x by a number, Mathematica is also very likely to replace the x in the function x[z, y] by the number, which makes no sense. However the code below produces the right formula, if you use x[z[x, y], y] instead of f[z[x, y], y].)
iter[{eq_, dz_, derivrules_}] := {#, #2, Join[derivrules, First@Solve[##]]} &[
D[eq, x] /. derivrules, D[dz, x]];
maxorder = 4;
drules = Last@Nest[iter, {x == f[z[x, y], y], z[x, y], {}}, maxorder];
Column[drules, Dividers -> All]

D[z[x, y], {x, 3}] /. drules

answered 3 hours ago
Michael E2Michael E2
150k12203482
150k12203482
add a comment |
add a comment |
$begingroup$
Here's another approach where I give Derivative a definition so that rules are not needed (it happens automatically). I'll use Michael's starting point:
eqn = x == f[z[x, y], y]
x == f[z[x, y], y]
and differentiate with respect to x:
deqn = D[eqn, x];
deqn //InputForm
1 == Derivative[1, 0][f][z[x, y], y]*Derivative[1, 0][z][x, y]
Solving for Derivative[1, 0][z][x, y] (which is $left. frac{partial z}{partial x} right|_y$ in your notation):
Derivative[1, 0][z][x, y] == 1 / Derivative[1, 0][f][z[x, y], y]
Let's turn this into a definition for Derivative:
Derivative[1, 0][z][x_, y_] = 1 / Derivative[1, 0][f][z[x, y], y];
Derivative[n_Integer?Positive, 0][z][x_, y_] := D[Derivative[1, 0][z][x, y], {x, n-1}]
Your first result can be obtained with:
Derivative[2, 0][z][x, y] //TeXForm
$-frac{f^{(2,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^3}$
or:
D[z[x, y], {x, 2}] //TeXForm
$-frac{f^{(2,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^3}$
Here's a table showing agreement with Michael's results:
Grid[
Table[
{Derivative[n, 0][Inactive@z][x, y], Derivative[n, 0][z][x, y]},
{n, 4}
],
Dividers -> All
] //TeXForm
$begin{array}{|c|c|}
hline
z^{(1,0)}(x,y) & frac{1}{f^{(1,0)}(z(x,y),y)} \
hline
z^{(2,0)}(x,y) & -frac{f^{(2,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^3} \
hline
z^{(3,0)}(x,y) & frac{3
f^{(2,0)}(z(x,y),y)^2}{f^{(1,0)}(z(x,y),y)^5}-frac{f^{(3,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y
)^4} \
hline
z^{(4,0)}(x,y) & -frac{15 f^{(2,0)}(z(x,y),y)^3}{f^{(1,0)}(z(x,y),y)^7}+frac{10
f^{(3,0)}(z(x,y),y)
f^{(2,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^6}-frac{f^{(4,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^
5} \
hline
end{array}$
$endgroup$
add a comment |
$begingroup$
Here's another approach where I give Derivative a definition so that rules are not needed (it happens automatically). I'll use Michael's starting point:
eqn = x == f[z[x, y], y]
x == f[z[x, y], y]
and differentiate with respect to x:
deqn = D[eqn, x];
deqn //InputForm
1 == Derivative[1, 0][f][z[x, y], y]*Derivative[1, 0][z][x, y]
Solving for Derivative[1, 0][z][x, y] (which is $left. frac{partial z}{partial x} right|_y$ in your notation):
Derivative[1, 0][z][x, y] == 1 / Derivative[1, 0][f][z[x, y], y]
Let's turn this into a definition for Derivative:
Derivative[1, 0][z][x_, y_] = 1 / Derivative[1, 0][f][z[x, y], y];
Derivative[n_Integer?Positive, 0][z][x_, y_] := D[Derivative[1, 0][z][x, y], {x, n-1}]
Your first result can be obtained with:
Derivative[2, 0][z][x, y] //TeXForm
$-frac{f^{(2,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^3}$
or:
D[z[x, y], {x, 2}] //TeXForm
$-frac{f^{(2,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^3}$
Here's a table showing agreement with Michael's results:
Grid[
Table[
{Derivative[n, 0][Inactive@z][x, y], Derivative[n, 0][z][x, y]},
{n, 4}
],
Dividers -> All
] //TeXForm
$begin{array}{|c|c|}
hline
z^{(1,0)}(x,y) & frac{1}{f^{(1,0)}(z(x,y),y)} \
hline
z^{(2,0)}(x,y) & -frac{f^{(2,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^3} \
hline
z^{(3,0)}(x,y) & frac{3
f^{(2,0)}(z(x,y),y)^2}{f^{(1,0)}(z(x,y),y)^5}-frac{f^{(3,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y
)^4} \
hline
z^{(4,0)}(x,y) & -frac{15 f^{(2,0)}(z(x,y),y)^3}{f^{(1,0)}(z(x,y),y)^7}+frac{10
f^{(3,0)}(z(x,y),y)
f^{(2,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^6}-frac{f^{(4,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^
5} \
hline
end{array}$
$endgroup$
add a comment |
$begingroup$
Here's another approach where I give Derivative a definition so that rules are not needed (it happens automatically). I'll use Michael's starting point:
eqn = x == f[z[x, y], y]
x == f[z[x, y], y]
and differentiate with respect to x:
deqn = D[eqn, x];
deqn //InputForm
1 == Derivative[1, 0][f][z[x, y], y]*Derivative[1, 0][z][x, y]
Solving for Derivative[1, 0][z][x, y] (which is $left. frac{partial z}{partial x} right|_y$ in your notation):
Derivative[1, 0][z][x, y] == 1 / Derivative[1, 0][f][z[x, y], y]
Let's turn this into a definition for Derivative:
Derivative[1, 0][z][x_, y_] = 1 / Derivative[1, 0][f][z[x, y], y];
Derivative[n_Integer?Positive, 0][z][x_, y_] := D[Derivative[1, 0][z][x, y], {x, n-1}]
Your first result can be obtained with:
Derivative[2, 0][z][x, y] //TeXForm
$-frac{f^{(2,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^3}$
or:
D[z[x, y], {x, 2}] //TeXForm
$-frac{f^{(2,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^3}$
Here's a table showing agreement with Michael's results:
Grid[
Table[
{Derivative[n, 0][Inactive@z][x, y], Derivative[n, 0][z][x, y]},
{n, 4}
],
Dividers -> All
] //TeXForm
$begin{array}{|c|c|}
hline
z^{(1,0)}(x,y) & frac{1}{f^{(1,0)}(z(x,y),y)} \
hline
z^{(2,0)}(x,y) & -frac{f^{(2,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^3} \
hline
z^{(3,0)}(x,y) & frac{3
f^{(2,0)}(z(x,y),y)^2}{f^{(1,0)}(z(x,y),y)^5}-frac{f^{(3,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y
)^4} \
hline
z^{(4,0)}(x,y) & -frac{15 f^{(2,0)}(z(x,y),y)^3}{f^{(1,0)}(z(x,y),y)^7}+frac{10
f^{(3,0)}(z(x,y),y)
f^{(2,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^6}-frac{f^{(4,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^
5} \
hline
end{array}$
$endgroup$
Here's another approach where I give Derivative a definition so that rules are not needed (it happens automatically). I'll use Michael's starting point:
eqn = x == f[z[x, y], y]
x == f[z[x, y], y]
and differentiate with respect to x:
deqn = D[eqn, x];
deqn //InputForm
1 == Derivative[1, 0][f][z[x, y], y]*Derivative[1, 0][z][x, y]
Solving for Derivative[1, 0][z][x, y] (which is $left. frac{partial z}{partial x} right|_y$ in your notation):
Derivative[1, 0][z][x, y] == 1 / Derivative[1, 0][f][z[x, y], y]
Let's turn this into a definition for Derivative:
Derivative[1, 0][z][x_, y_] = 1 / Derivative[1, 0][f][z[x, y], y];
Derivative[n_Integer?Positive, 0][z][x_, y_] := D[Derivative[1, 0][z][x, y], {x, n-1}]
Your first result can be obtained with:
Derivative[2, 0][z][x, y] //TeXForm
$-frac{f^{(2,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^3}$
or:
D[z[x, y], {x, 2}] //TeXForm
$-frac{f^{(2,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^3}$
Here's a table showing agreement with Michael's results:
Grid[
Table[
{Derivative[n, 0][Inactive@z][x, y], Derivative[n, 0][z][x, y]},
{n, 4}
],
Dividers -> All
] //TeXForm
$begin{array}{|c|c|}
hline
z^{(1,0)}(x,y) & frac{1}{f^{(1,0)}(z(x,y),y)} \
hline
z^{(2,0)}(x,y) & -frac{f^{(2,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^3} \
hline
z^{(3,0)}(x,y) & frac{3
f^{(2,0)}(z(x,y),y)^2}{f^{(1,0)}(z(x,y),y)^5}-frac{f^{(3,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y
)^4} \
hline
z^{(4,0)}(x,y) & -frac{15 f^{(2,0)}(z(x,y),y)^3}{f^{(1,0)}(z(x,y),y)^7}+frac{10
f^{(3,0)}(z(x,y),y)
f^{(2,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^6}-frac{f^{(4,0)}(z(x,y),y)}{f^{(1,0)}(z(x,y),y)^
5} \
hline
end{array}$
edited 2 hours ago
answered 2 hours ago
Carl WollCarl Woll
73.7k398192
73.7k398192
add a comment |
add a comment |
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
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%2f195120%2frelations-between-two-reciprocal-partial-derivatives%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