Simplify product of complex numbers
up vote
1
down vote
favorite
I am trying to take product of a complex number with its conjugate. When I take
A*Conjugate[A] // FullSimplify
The output is as desired
Abs[A]^2
But when I try
FullSimplify@(A*Conjugate[A]*B*Conjugate[B])
The output is
A B Conjugate[A] Conjugate[B]
Why mathematica is not showing the output as
Abs[A]^2 Abs[B]^2
I am using Mathematica 11.2.0.
simplifying-expressions complex
add a comment |
up vote
1
down vote
favorite
I am trying to take product of a complex number with its conjugate. When I take
A*Conjugate[A] // FullSimplify
The output is as desired
Abs[A]^2
But when I try
FullSimplify@(A*Conjugate[A]*B*Conjugate[B])
The output is
A B Conjugate[A] Conjugate[B]
Why mathematica is not showing the output as
Abs[A]^2 Abs[B]^2
I am using Mathematica 11.2.0.
simplifying-expressions complex
ComplexExpanddoes the work:A*Conjugate[A]*B*Conjugate[B] // ComplexExpand.
– rmw
Nov 10 at 13:41
@rmw - You have letComplexExpandassume thatAandBare real-valued. The OP is working with complex variables.
– Bob Hanlon
Nov 10 at 15:29
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am trying to take product of a complex number with its conjugate. When I take
A*Conjugate[A] // FullSimplify
The output is as desired
Abs[A]^2
But when I try
FullSimplify@(A*Conjugate[A]*B*Conjugate[B])
The output is
A B Conjugate[A] Conjugate[B]
Why mathematica is not showing the output as
Abs[A]^2 Abs[B]^2
I am using Mathematica 11.2.0.
simplifying-expressions complex
I am trying to take product of a complex number with its conjugate. When I take
A*Conjugate[A] // FullSimplify
The output is as desired
Abs[A]^2
But when I try
FullSimplify@(A*Conjugate[A]*B*Conjugate[B])
The output is
A B Conjugate[A] Conjugate[B]
Why mathematica is not showing the output as
Abs[A]^2 Abs[B]^2
I am using Mathematica 11.2.0.
simplifying-expressions complex
simplifying-expressions complex
asked Nov 10 at 11:45
Archimedes
156
156
ComplexExpanddoes the work:A*Conjugate[A]*B*Conjugate[B] // ComplexExpand.
– rmw
Nov 10 at 13:41
@rmw - You have letComplexExpandassume thatAandBare real-valued. The OP is working with complex variables.
– Bob Hanlon
Nov 10 at 15:29
add a comment |
ComplexExpanddoes the work:A*Conjugate[A]*B*Conjugate[B] // ComplexExpand.
– rmw
Nov 10 at 13:41
@rmw - You have letComplexExpandassume thatAandBare real-valued. The OP is working with complex variables.
– Bob Hanlon
Nov 10 at 15:29
ComplexExpand does the work: A*Conjugate[A]*B*Conjugate[B] // ComplexExpand.– rmw
Nov 10 at 13:41
ComplexExpand does the work: A*Conjugate[A]*B*Conjugate[B] // ComplexExpand.– rmw
Nov 10 at 13:41
@rmw - You have let
ComplexExpand assume that A and B are real-valued. The OP is working with complex variables.– Bob Hanlon
Nov 10 at 15:29
@rmw - You have let
ComplexExpand assume that A and B are real-valued. The OP is working with complex variables.– Bob Hanlon
Nov 10 at 15:29
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
accepted
You can use ComplexExpand
simplify =
Simplify[ComplexExpand[#, Variables[Level[#, -1]],
TargetFunctions -> Abs, Arg]] &;
A*Conjugate[A] // simplify
(* Abs[A]^2 *)
simplify[A*Conjugate[A]*B*Conjugate[B]]
(* Abs[A]^2 Abs[B]^2 *)
Thank you. This will save a lot of time in my calculations :-)
– Archimedes
Nov 10 at 15:00
add a comment |
up vote
1
down vote
It is somewhat counterintuitive, but Mathematica might indeed think that A B Conjugate[A] Conjugate[B] is simpler.
LeafCount[Abs[A]^2 Abs[B]^2]
LeafCount[A B Conjugate[A] Conjugate[B]]
9
7
Notice that LeafCount is not the precise ComplexityFunction used by FullSimplify, but it may still give you an idea.
In the end, simplification is always a matter of taste.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
You can use ComplexExpand
simplify =
Simplify[ComplexExpand[#, Variables[Level[#, -1]],
TargetFunctions -> Abs, Arg]] &;
A*Conjugate[A] // simplify
(* Abs[A]^2 *)
simplify[A*Conjugate[A]*B*Conjugate[B]]
(* Abs[A]^2 Abs[B]^2 *)
Thank you. This will save a lot of time in my calculations :-)
– Archimedes
Nov 10 at 15:00
add a comment |
up vote
1
down vote
accepted
You can use ComplexExpand
simplify =
Simplify[ComplexExpand[#, Variables[Level[#, -1]],
TargetFunctions -> Abs, Arg]] &;
A*Conjugate[A] // simplify
(* Abs[A]^2 *)
simplify[A*Conjugate[A]*B*Conjugate[B]]
(* Abs[A]^2 Abs[B]^2 *)
Thank you. This will save a lot of time in my calculations :-)
– Archimedes
Nov 10 at 15:00
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
You can use ComplexExpand
simplify =
Simplify[ComplexExpand[#, Variables[Level[#, -1]],
TargetFunctions -> Abs, Arg]] &;
A*Conjugate[A] // simplify
(* Abs[A]^2 *)
simplify[A*Conjugate[A]*B*Conjugate[B]]
(* Abs[A]^2 Abs[B]^2 *)
You can use ComplexExpand
simplify =
Simplify[ComplexExpand[#, Variables[Level[#, -1]],
TargetFunctions -> Abs, Arg]] &;
A*Conjugate[A] // simplify
(* Abs[A]^2 *)
simplify[A*Conjugate[A]*B*Conjugate[B]]
(* Abs[A]^2 Abs[B]^2 *)
answered Nov 10 at 13:33
Bob Hanlon
58.2k23594
58.2k23594
Thank you. This will save a lot of time in my calculations :-)
– Archimedes
Nov 10 at 15:00
add a comment |
Thank you. This will save a lot of time in my calculations :-)
– Archimedes
Nov 10 at 15:00
Thank you. This will save a lot of time in my calculations :-)
– Archimedes
Nov 10 at 15:00
Thank you. This will save a lot of time in my calculations :-)
– Archimedes
Nov 10 at 15:00
add a comment |
up vote
1
down vote
It is somewhat counterintuitive, but Mathematica might indeed think that A B Conjugate[A] Conjugate[B] is simpler.
LeafCount[Abs[A]^2 Abs[B]^2]
LeafCount[A B Conjugate[A] Conjugate[B]]
9
7
Notice that LeafCount is not the precise ComplexityFunction used by FullSimplify, but it may still give you an idea.
In the end, simplification is always a matter of taste.
add a comment |
up vote
1
down vote
It is somewhat counterintuitive, but Mathematica might indeed think that A B Conjugate[A] Conjugate[B] is simpler.
LeafCount[Abs[A]^2 Abs[B]^2]
LeafCount[A B Conjugate[A] Conjugate[B]]
9
7
Notice that LeafCount is not the precise ComplexityFunction used by FullSimplify, but it may still give you an idea.
In the end, simplification is always a matter of taste.
add a comment |
up vote
1
down vote
up vote
1
down vote
It is somewhat counterintuitive, but Mathematica might indeed think that A B Conjugate[A] Conjugate[B] is simpler.
LeafCount[Abs[A]^2 Abs[B]^2]
LeafCount[A B Conjugate[A] Conjugate[B]]
9
7
Notice that LeafCount is not the precise ComplexityFunction used by FullSimplify, but it may still give you an idea.
In the end, simplification is always a matter of taste.
It is somewhat counterintuitive, but Mathematica might indeed think that A B Conjugate[A] Conjugate[B] is simpler.
LeafCount[Abs[A]^2 Abs[B]^2]
LeafCount[A B Conjugate[A] Conjugate[B]]
9
7
Notice that LeafCount is not the precise ComplexityFunction used by FullSimplify, but it may still give you an idea.
In the end, simplification is always a matter of taste.
answered Nov 10 at 11:51
Henrik Schumacher
46.8k466134
46.8k466134
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
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%2f185739%2fsimplify-product-of-complex-numbers%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
ComplexExpanddoes the work:A*Conjugate[A]*B*Conjugate[B] // ComplexExpand.– rmw
Nov 10 at 13:41
@rmw - You have let
ComplexExpandassume thatAandBare real-valued. The OP is working with complex variables.– Bob Hanlon
Nov 10 at 15:29