`Re[z]` Command [closed]
$begingroup$
Suppose we have complex number $z=a+i b$, where $a$ and $b$ are variables.
Now, if we want real part of $z$, then in mathematica we use Re[z]
command. But this command is not working (because $a$ and $b$ are not fixed real numbers).
Re[expr]
is left unevaluated if expr is not a numeric quantity. (https://reference.wolfram.com/language/ref/Re.html)
How do we get Re[z]
$=a$ as solution?
complex
$endgroup$
closed as off-topic by Michael E2, Daniel Lichtblau, b3m2a1, m_goldberg, march Jan 28 at 18:17
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Michael E2, Daniel Lichtblau, b3m2a1, m_goldberg, march
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
$begingroup$
Suppose we have complex number $z=a+i b$, where $a$ and $b$ are variables.
Now, if we want real part of $z$, then in mathematica we use Re[z]
command. But this command is not working (because $a$ and $b$ are not fixed real numbers).
Re[expr]
is left unevaluated if expr is not a numeric quantity. (https://reference.wolfram.com/language/ref/Re.html)
How do we get Re[z]
$=a$ as solution?
complex
$endgroup$
closed as off-topic by Michael E2, Daniel Lichtblau, b3m2a1, m_goldberg, march Jan 28 at 18:17
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Michael E2, Daniel Lichtblau, b3m2a1, m_goldberg, march
If this question can be reworded to fit the rules in the help center, please edit the question.
3
$begingroup$
See "Properties & Relations" in the documentation forRe
. It shows various uses ofComplexExpand
with respect toRe
.
$endgroup$
– Michael E2
Jan 25 at 16:56
add a comment |
$begingroup$
Suppose we have complex number $z=a+i b$, where $a$ and $b$ are variables.
Now, if we want real part of $z$, then in mathematica we use Re[z]
command. But this command is not working (because $a$ and $b$ are not fixed real numbers).
Re[expr]
is left unevaluated if expr is not a numeric quantity. (https://reference.wolfram.com/language/ref/Re.html)
How do we get Re[z]
$=a$ as solution?
complex
$endgroup$
Suppose we have complex number $z=a+i b$, where $a$ and $b$ are variables.
Now, if we want real part of $z$, then in mathematica we use Re[z]
command. But this command is not working (because $a$ and $b$ are not fixed real numbers).
Re[expr]
is left unevaluated if expr is not a numeric quantity. (https://reference.wolfram.com/language/ref/Re.html)
How do we get Re[z]
$=a$ as solution?
complex
complex
asked Jan 25 at 15:00
GoldyGoldy
1702
1702
closed as off-topic by Michael E2, Daniel Lichtblau, b3m2a1, m_goldberg, march Jan 28 at 18:17
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Michael E2, Daniel Lichtblau, b3m2a1, m_goldberg, march
If this question can be reworded to fit the rules in the help center, please edit the question.
closed as off-topic by Michael E2, Daniel Lichtblau, b3m2a1, m_goldberg, march Jan 28 at 18:17
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Michael E2, Daniel Lichtblau, b3m2a1, m_goldberg, march
If this question can be reworded to fit the rules in the help center, please edit the question.
3
$begingroup$
See "Properties & Relations" in the documentation forRe
. It shows various uses ofComplexExpand
with respect toRe
.
$endgroup$
– Michael E2
Jan 25 at 16:56
add a comment |
3
$begingroup$
See "Properties & Relations" in the documentation forRe
. It shows various uses ofComplexExpand
with respect toRe
.
$endgroup$
– Michael E2
Jan 25 at 16:56
3
3
$begingroup$
See "Properties & Relations" in the documentation for
Re
. It shows various uses of ComplexExpand
with respect to Re
.$endgroup$
– Michael E2
Jan 25 at 16:56
$begingroup$
See "Properties & Relations" in the documentation for
Re
. It shows various uses of ComplexExpand
with respect to Re
.$endgroup$
– Michael E2
Jan 25 at 16:56
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
z = a + I b;
ComplexExpand[Re[z]]
a
Hope that helps.
$endgroup$
$begingroup$
But what is the difference betweenComplexExpand[Re[z]]
andRe[ComplexExpand[z]]
??
$endgroup$
– Goldy
Jan 25 at 15:17
$begingroup$
CommandComplexExpand[Re[z]]
gives me correct result, butRe[ComplexExpand[z]]
is not working
$endgroup$
– Goldy
Jan 25 at 15:18
1
$begingroup$
ComplexExpand[z]
has not got any work to do. If you tryComplexExpand[z^2]
then it does do some work. Have a good look at the documentation. What would you expect it to do?
$endgroup$
– Hugh
Jan 25 at 15:23
add a comment |
$begingroup$
The rewrite rules behind ComplexExpand
assume all undefined symbols in the expression are real.
ComplexExpand[z]
is just
z
Thus,
Re[ComplexExpand[z]]
first gets rewritten as
Re[z]
and no further rewrite is possible because Re
has no rule for this case. But ComplexExpand
inspects the structure of the expression it's given. It recognizes that it can rewrite Re[z]
as z
.
Mathematica is a language for rewriting mathematical expressions based on recognizing their structure. Sometimes those rewrites seem to act like "commands", but it is misleading to think of them that way.
$endgroup$
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
z = a + I b;
ComplexExpand[Re[z]]
a
Hope that helps.
$endgroup$
$begingroup$
But what is the difference betweenComplexExpand[Re[z]]
andRe[ComplexExpand[z]]
??
$endgroup$
– Goldy
Jan 25 at 15:17
$begingroup$
CommandComplexExpand[Re[z]]
gives me correct result, butRe[ComplexExpand[z]]
is not working
$endgroup$
– Goldy
Jan 25 at 15:18
1
$begingroup$
ComplexExpand[z]
has not got any work to do. If you tryComplexExpand[z^2]
then it does do some work. Have a good look at the documentation. What would you expect it to do?
$endgroup$
– Hugh
Jan 25 at 15:23
add a comment |
$begingroup$
z = a + I b;
ComplexExpand[Re[z]]
a
Hope that helps.
$endgroup$
$begingroup$
But what is the difference betweenComplexExpand[Re[z]]
andRe[ComplexExpand[z]]
??
$endgroup$
– Goldy
Jan 25 at 15:17
$begingroup$
CommandComplexExpand[Re[z]]
gives me correct result, butRe[ComplexExpand[z]]
is not working
$endgroup$
– Goldy
Jan 25 at 15:18
1
$begingroup$
ComplexExpand[z]
has not got any work to do. If you tryComplexExpand[z^2]
then it does do some work. Have a good look at the documentation. What would you expect it to do?
$endgroup$
– Hugh
Jan 25 at 15:23
add a comment |
$begingroup$
z = a + I b;
ComplexExpand[Re[z]]
a
Hope that helps.
$endgroup$
z = a + I b;
ComplexExpand[Re[z]]
a
Hope that helps.
answered Jan 25 at 15:08
HughHugh
6,44221945
6,44221945
$begingroup$
But what is the difference betweenComplexExpand[Re[z]]
andRe[ComplexExpand[z]]
??
$endgroup$
– Goldy
Jan 25 at 15:17
$begingroup$
CommandComplexExpand[Re[z]]
gives me correct result, butRe[ComplexExpand[z]]
is not working
$endgroup$
– Goldy
Jan 25 at 15:18
1
$begingroup$
ComplexExpand[z]
has not got any work to do. If you tryComplexExpand[z^2]
then it does do some work. Have a good look at the documentation. What would you expect it to do?
$endgroup$
– Hugh
Jan 25 at 15:23
add a comment |
$begingroup$
But what is the difference betweenComplexExpand[Re[z]]
andRe[ComplexExpand[z]]
??
$endgroup$
– Goldy
Jan 25 at 15:17
$begingroup$
CommandComplexExpand[Re[z]]
gives me correct result, butRe[ComplexExpand[z]]
is not working
$endgroup$
– Goldy
Jan 25 at 15:18
1
$begingroup$
ComplexExpand[z]
has not got any work to do. If you tryComplexExpand[z^2]
then it does do some work. Have a good look at the documentation. What would you expect it to do?
$endgroup$
– Hugh
Jan 25 at 15:23
$begingroup$
But what is the difference between
ComplexExpand[Re[z]]
and Re[ComplexExpand[z]]
??$endgroup$
– Goldy
Jan 25 at 15:17
$begingroup$
But what is the difference between
ComplexExpand[Re[z]]
and Re[ComplexExpand[z]]
??$endgroup$
– Goldy
Jan 25 at 15:17
$begingroup$
Command
ComplexExpand[Re[z]]
gives me correct result, but Re[ComplexExpand[z]]
is not working$endgroup$
– Goldy
Jan 25 at 15:18
$begingroup$
Command
ComplexExpand[Re[z]]
gives me correct result, but Re[ComplexExpand[z]]
is not working$endgroup$
– Goldy
Jan 25 at 15:18
1
1
$begingroup$
ComplexExpand[z]
has not got any work to do. If you try ComplexExpand[z^2]
then it does do some work. Have a good look at the documentation. What would you expect it to do?$endgroup$
– Hugh
Jan 25 at 15:23
$begingroup$
ComplexExpand[z]
has not got any work to do. If you try ComplexExpand[z^2]
then it does do some work. Have a good look at the documentation. What would you expect it to do?$endgroup$
– Hugh
Jan 25 at 15:23
add a comment |
$begingroup$
The rewrite rules behind ComplexExpand
assume all undefined symbols in the expression are real.
ComplexExpand[z]
is just
z
Thus,
Re[ComplexExpand[z]]
first gets rewritten as
Re[z]
and no further rewrite is possible because Re
has no rule for this case. But ComplexExpand
inspects the structure of the expression it's given. It recognizes that it can rewrite Re[z]
as z
.
Mathematica is a language for rewriting mathematical expressions based on recognizing their structure. Sometimes those rewrites seem to act like "commands", but it is misleading to think of them that way.
$endgroup$
add a comment |
$begingroup$
The rewrite rules behind ComplexExpand
assume all undefined symbols in the expression are real.
ComplexExpand[z]
is just
z
Thus,
Re[ComplexExpand[z]]
first gets rewritten as
Re[z]
and no further rewrite is possible because Re
has no rule for this case. But ComplexExpand
inspects the structure of the expression it's given. It recognizes that it can rewrite Re[z]
as z
.
Mathematica is a language for rewriting mathematical expressions based on recognizing their structure. Sometimes those rewrites seem to act like "commands", but it is misleading to think of them that way.
$endgroup$
add a comment |
$begingroup$
The rewrite rules behind ComplexExpand
assume all undefined symbols in the expression are real.
ComplexExpand[z]
is just
z
Thus,
Re[ComplexExpand[z]]
first gets rewritten as
Re[z]
and no further rewrite is possible because Re
has no rule for this case. But ComplexExpand
inspects the structure of the expression it's given. It recognizes that it can rewrite Re[z]
as z
.
Mathematica is a language for rewriting mathematical expressions based on recognizing their structure. Sometimes those rewrites seem to act like "commands", but it is misleading to think of them that way.
$endgroup$
The rewrite rules behind ComplexExpand
assume all undefined symbols in the expression are real.
ComplexExpand[z]
is just
z
Thus,
Re[ComplexExpand[z]]
first gets rewritten as
Re[z]
and no further rewrite is possible because Re
has no rule for this case. But ComplexExpand
inspects the structure of the expression it's given. It recognizes that it can rewrite Re[z]
as z
.
Mathematica is a language for rewriting mathematical expressions based on recognizing their structure. Sometimes those rewrites seem to act like "commands", but it is misleading to think of them that way.
answered Jan 25 at 15:30
John DotyJohn Doty
7,37311124
7,37311124
add a comment |
add a comment |
3
$begingroup$
See "Properties & Relations" in the documentation for
Re
. It shows various uses ofComplexExpand
with respect toRe
.$endgroup$
– Michael E2
Jan 25 at 16:56