How to declare derivatives of a multivariable function as real in order to get Re and Im part of the expression?
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
Re
and Im
work properly, with appropriate assumptions, in the example like this
Assuming[g[_, _] â Reals, Simplify[Im[3*I*g[r, r2] + 45]]]
On the other hand, if the derivative of the function is also present, similar approach does not work
Assuming[(r | g[_, _] | D[g[_, _], _]) â Reals, Simplify[Im[3*I*D[g[r, r2], r] + 45]]]
i.e. does not give back 3*D[g[r, r2], r]
More dramatically,
Assuming[(r | g[_, _] | f[_]) â Reals, Simplify[Im[3*I*(D[g[r, r2]*f[r], r]) + 45]]]
gives 3 Re[g[r,r2] (f^â²)[r]+f[r] (g^(1,0))[r,r2]]
.
In real problem, I have the function of four variables and mixed partial derivatives, so it would be great if there is some generic way to prescribe all of function's derivatives as Real.
calculus-and-analysis functions function-construction symbolic complex
add a comment |Â
up vote
2
down vote
favorite
Re
and Im
work properly, with appropriate assumptions, in the example like this
Assuming[g[_, _] â Reals, Simplify[Im[3*I*g[r, r2] + 45]]]
On the other hand, if the derivative of the function is also present, similar approach does not work
Assuming[(r | g[_, _] | D[g[_, _], _]) â Reals, Simplify[Im[3*I*D[g[r, r2], r] + 45]]]
i.e. does not give back 3*D[g[r, r2], r]
More dramatically,
Assuming[(r | g[_, _] | f[_]) â Reals, Simplify[Im[3*I*(D[g[r, r2]*f[r], r]) + 45]]]
gives 3 Re[g[r,r2] (f^â²)[r]+f[r] (g^(1,0))[r,r2]]
.
In real problem, I have the function of four variables and mixed partial derivatives, so it would be great if there is some generic way to prescribe all of function's derivatives as Real.
calculus-and-analysis functions function-construction symbolic complex
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
Re
and Im
work properly, with appropriate assumptions, in the example like this
Assuming[g[_, _] â Reals, Simplify[Im[3*I*g[r, r2] + 45]]]
On the other hand, if the derivative of the function is also present, similar approach does not work
Assuming[(r | g[_, _] | D[g[_, _], _]) â Reals, Simplify[Im[3*I*D[g[r, r2], r] + 45]]]
i.e. does not give back 3*D[g[r, r2], r]
More dramatically,
Assuming[(r | g[_, _] | f[_]) â Reals, Simplify[Im[3*I*(D[g[r, r2]*f[r], r]) + 45]]]
gives 3 Re[g[r,r2] (f^â²)[r]+f[r] (g^(1,0))[r,r2]]
.
In real problem, I have the function of four variables and mixed partial derivatives, so it would be great if there is some generic way to prescribe all of function's derivatives as Real.
calculus-and-analysis functions function-construction symbolic complex
Re
and Im
work properly, with appropriate assumptions, in the example like this
Assuming[g[_, _] â Reals, Simplify[Im[3*I*g[r, r2] + 45]]]
On the other hand, if the derivative of the function is also present, similar approach does not work
Assuming[(r | g[_, _] | D[g[_, _], _]) â Reals, Simplify[Im[3*I*D[g[r, r2], r] + 45]]]
i.e. does not give back 3*D[g[r, r2], r]
More dramatically,
Assuming[(r | g[_, _] | f[_]) â Reals, Simplify[Im[3*I*(D[g[r, r2]*f[r], r]) + 45]]]
gives 3 Re[g[r,r2] (f^â²)[r]+f[r] (g^(1,0))[r,r2]]
.
In real problem, I have the function of four variables and mixed partial derivatives, so it would be great if there is some generic way to prescribe all of function's derivatives as Real.
calculus-and-analysis functions function-construction symbolic complex
calculus-and-analysis functions function-construction symbolic complex
edited 1 hour ago
kglr
161k8185384
161k8185384
asked 2 hours ago
Thela Hun Ginjeet
344
344
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
Use the FullForm
of the derivatives:
Assuming[(r | g[_, _] | Derivative[1, 0][g][_, _]) â Reals,
Simplify[Im[3*I*D[g[r, r2], r] + 45]]]
Assuming[(r | g[_, _] | f[_] | Derivative[1, 0][g][_, _] | Derivative[1][f][_]) â Reals,
Simplify[Im[3*I*(D[g[r, r2]*f[r], r]) + 45]]]
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Use the FullForm
of the derivatives:
Assuming[(r | g[_, _] | Derivative[1, 0][g][_, _]) â Reals,
Simplify[Im[3*I*D[g[r, r2], r] + 45]]]
Assuming[(r | g[_, _] | f[_] | Derivative[1, 0][g][_, _] | Derivative[1][f][_]) â Reals,
Simplify[Im[3*I*(D[g[r, r2]*f[r], r]) + 45]]]
add a comment |Â
up vote
2
down vote
Use the FullForm
of the derivatives:
Assuming[(r | g[_, _] | Derivative[1, 0][g][_, _]) â Reals,
Simplify[Im[3*I*D[g[r, r2], r] + 45]]]
Assuming[(r | g[_, _] | f[_] | Derivative[1, 0][g][_, _] | Derivative[1][f][_]) â Reals,
Simplify[Im[3*I*(D[g[r, r2]*f[r], r]) + 45]]]
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Use the FullForm
of the derivatives:
Assuming[(r | g[_, _] | Derivative[1, 0][g][_, _]) â Reals,
Simplify[Im[3*I*D[g[r, r2], r] + 45]]]
Assuming[(r | g[_, _] | f[_] | Derivative[1, 0][g][_, _] | Derivative[1][f][_]) â Reals,
Simplify[Im[3*I*(D[g[r, r2]*f[r], r]) + 45]]]
Use the FullForm
of the derivatives:
Assuming[(r | g[_, _] | Derivative[1, 0][g][_, _]) â Reals,
Simplify[Im[3*I*D[g[r, r2], r] + 45]]]
Assuming[(r | g[_, _] | f[_] | Derivative[1, 0][g][_, _] | Derivative[1][f][_]) â Reals,
Simplify[Im[3*I*(D[g[r, r2]*f[r], r]) + 45]]]
edited 31 mins ago
answered 2 hours ago
kglr
161k8185384
161k8185384
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f182365%2fhow-to-declare-derivatives-of-a-multivariable-function-as-real-in-order-to-get-r%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