Remove Abs from Norms of Vectors
Clash Royale CLAN TAG#URR8PPP
up vote
10
down vote
favorite
I have the following norm
Norm[a, b*c]
(* Sqrt[Abs[a]^2 + Abs[b c]^2] *)
How do I remove the Abs
from it?
FullSimplify[Norm[a, b*c], Assumptions -> a > 0, b > 0, c > 0]
only kills the first Abs
Sqrt[a^2 + Abs[b c]^2]
list-manipulation simplifying-expressions vector
add a comment |Â
up vote
10
down vote
favorite
I have the following norm
Norm[a, b*c]
(* Sqrt[Abs[a]^2 + Abs[b c]^2] *)
How do I remove the Abs
from it?
FullSimplify[Norm[a, b*c], Assumptions -> a > 0, b > 0, c > 0]
only kills the first Abs
Sqrt[a^2 + Abs[b c]^2]
list-manipulation simplifying-expressions vector
add a comment |Â
up vote
10
down vote
favorite
up vote
10
down vote
favorite
I have the following norm
Norm[a, b*c]
(* Sqrt[Abs[a]^2 + Abs[b c]^2] *)
How do I remove the Abs
from it?
FullSimplify[Norm[a, b*c], Assumptions -> a > 0, b > 0, c > 0]
only kills the first Abs
Sqrt[a^2 + Abs[b c]^2]
list-manipulation simplifying-expressions vector
I have the following norm
Norm[a, b*c]
(* Sqrt[Abs[a]^2 + Abs[b c]^2] *)
How do I remove the Abs
from it?
FullSimplify[Norm[a, b*c], Assumptions -> a > 0, b > 0, c > 0]
only kills the first Abs
Sqrt[a^2 + Abs[b c]^2]
list-manipulation simplifying-expressions vector
list-manipulation simplifying-expressions vector
edited Sep 26 at 0:24
Jack LaVigne
11.4k21329
11.4k21329
asked Sep 22 at 20:16
chr
583
583
add a comment |Â
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
12
down vote
accepted
ComplexExpand@Norm@a, b c
Sqrt[a^2 + b^2 c^2]
2
Thx. Can you explain whyComplexEpxpand
does it andAssumptions
does not?
â chr
Sep 22 at 20:33
2
ComplexExpand
automatically assumes all its variables to be real. Other than that, I believe it's just a matter of behind-the-scenes expression manipulation (i.e. I don't know...). Though this idea reminds me of this post talking about different ways of assuming things (granted in relation toIntegrate
).
â That Gravity Guy
Sep 22 at 20:48
add a comment |Â
up vote
8
down vote
If you have to use FullSimplify
or Simplify
, you can use the option ComplexityFunction
to make expressions with Abs
more costly:
FullSimplify[Norm[a, b*c], Assumptions -> a > 0, b > 0, c > 0,
ComplexityFunction -> (100 Count[#, _Abs, 0, Infinity] + LeafCount[#] &)]
ÃÂ Sqrt[a^2 + b^2 c^2]
3
And the reason thatComplexityFunction
is needed in this case is becauseLeafCount /@ Sqrt[a^2 + Abs[b*c]^2], Sqrt[a^2 + b^2*c^2]
evaluates to14, 15
, i.e., the apparent simpler form is not simpler.
â Bob Hanlon
Sep 22 at 23:30
1
@BobHanlon, great point.
â kglr
Sep 22 at 23:31
add a comment |Â
up vote
3
down vote
Also, for a real number x
, Abs[x] = Sqrt[x^2]
Norm[a, b*c] /. Abs[x_] :> Sqrt[x^2]
(* Sqrt[a^2 + b^2 c^2] *)
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
12
down vote
accepted
ComplexExpand@Norm@a, b c
Sqrt[a^2 + b^2 c^2]
2
Thx. Can you explain whyComplexEpxpand
does it andAssumptions
does not?
â chr
Sep 22 at 20:33
2
ComplexExpand
automatically assumes all its variables to be real. Other than that, I believe it's just a matter of behind-the-scenes expression manipulation (i.e. I don't know...). Though this idea reminds me of this post talking about different ways of assuming things (granted in relation toIntegrate
).
â That Gravity Guy
Sep 22 at 20:48
add a comment |Â
up vote
12
down vote
accepted
ComplexExpand@Norm@a, b c
Sqrt[a^2 + b^2 c^2]
2
Thx. Can you explain whyComplexEpxpand
does it andAssumptions
does not?
â chr
Sep 22 at 20:33
2
ComplexExpand
automatically assumes all its variables to be real. Other than that, I believe it's just a matter of behind-the-scenes expression manipulation (i.e. I don't know...). Though this idea reminds me of this post talking about different ways of assuming things (granted in relation toIntegrate
).
â That Gravity Guy
Sep 22 at 20:48
add a comment |Â
up vote
12
down vote
accepted
up vote
12
down vote
accepted
ComplexExpand@Norm@a, b c
Sqrt[a^2 + b^2 c^2]
ComplexExpand@Norm@a, b c
Sqrt[a^2 + b^2 c^2]
answered Sep 22 at 20:29
That Gravity Guy
1,324512
1,324512
2
Thx. Can you explain whyComplexEpxpand
does it andAssumptions
does not?
â chr
Sep 22 at 20:33
2
ComplexExpand
automatically assumes all its variables to be real. Other than that, I believe it's just a matter of behind-the-scenes expression manipulation (i.e. I don't know...). Though this idea reminds me of this post talking about different ways of assuming things (granted in relation toIntegrate
).
â That Gravity Guy
Sep 22 at 20:48
add a comment |Â
2
Thx. Can you explain whyComplexEpxpand
does it andAssumptions
does not?
â chr
Sep 22 at 20:33
2
ComplexExpand
automatically assumes all its variables to be real. Other than that, I believe it's just a matter of behind-the-scenes expression manipulation (i.e. I don't know...). Though this idea reminds me of this post talking about different ways of assuming things (granted in relation toIntegrate
).
â That Gravity Guy
Sep 22 at 20:48
2
2
Thx. Can you explain why
ComplexEpxpand
does it and Assumptions
does not?â chr
Sep 22 at 20:33
Thx. Can you explain why
ComplexEpxpand
does it and Assumptions
does not?â chr
Sep 22 at 20:33
2
2
ComplexExpand
automatically assumes all its variables to be real. Other than that, I believe it's just a matter of behind-the-scenes expression manipulation (i.e. I don't know...). Though this idea reminds me of this post talking about different ways of assuming things (granted in relation to Integrate
).â That Gravity Guy
Sep 22 at 20:48
ComplexExpand
automatically assumes all its variables to be real. Other than that, I believe it's just a matter of behind-the-scenes expression manipulation (i.e. I don't know...). Though this idea reminds me of this post talking about different ways of assuming things (granted in relation to Integrate
).â That Gravity Guy
Sep 22 at 20:48
add a comment |Â
up vote
8
down vote
If you have to use FullSimplify
or Simplify
, you can use the option ComplexityFunction
to make expressions with Abs
more costly:
FullSimplify[Norm[a, b*c], Assumptions -> a > 0, b > 0, c > 0,
ComplexityFunction -> (100 Count[#, _Abs, 0, Infinity] + LeafCount[#] &)]
ÃÂ Sqrt[a^2 + b^2 c^2]
3
And the reason thatComplexityFunction
is needed in this case is becauseLeafCount /@ Sqrt[a^2 + Abs[b*c]^2], Sqrt[a^2 + b^2*c^2]
evaluates to14, 15
, i.e., the apparent simpler form is not simpler.
â Bob Hanlon
Sep 22 at 23:30
1
@BobHanlon, great point.
â kglr
Sep 22 at 23:31
add a comment |Â
up vote
8
down vote
If you have to use FullSimplify
or Simplify
, you can use the option ComplexityFunction
to make expressions with Abs
more costly:
FullSimplify[Norm[a, b*c], Assumptions -> a > 0, b > 0, c > 0,
ComplexityFunction -> (100 Count[#, _Abs, 0, Infinity] + LeafCount[#] &)]
ÃÂ Sqrt[a^2 + b^2 c^2]
3
And the reason thatComplexityFunction
is needed in this case is becauseLeafCount /@ Sqrt[a^2 + Abs[b*c]^2], Sqrt[a^2 + b^2*c^2]
evaluates to14, 15
, i.e., the apparent simpler form is not simpler.
â Bob Hanlon
Sep 22 at 23:30
1
@BobHanlon, great point.
â kglr
Sep 22 at 23:31
add a comment |Â
up vote
8
down vote
up vote
8
down vote
If you have to use FullSimplify
or Simplify
, you can use the option ComplexityFunction
to make expressions with Abs
more costly:
FullSimplify[Norm[a, b*c], Assumptions -> a > 0, b > 0, c > 0,
ComplexityFunction -> (100 Count[#, _Abs, 0, Infinity] + LeafCount[#] &)]
ÃÂ Sqrt[a^2 + b^2 c^2]
If you have to use FullSimplify
or Simplify
, you can use the option ComplexityFunction
to make expressions with Abs
more costly:
FullSimplify[Norm[a, b*c], Assumptions -> a > 0, b > 0, c > 0,
ComplexityFunction -> (100 Count[#, _Abs, 0, Infinity] + LeafCount[#] &)]
ÃÂ Sqrt[a^2 + b^2 c^2]
answered Sep 22 at 20:33
kglr
163k8188387
163k8188387
3
And the reason thatComplexityFunction
is needed in this case is becauseLeafCount /@ Sqrt[a^2 + Abs[b*c]^2], Sqrt[a^2 + b^2*c^2]
evaluates to14, 15
, i.e., the apparent simpler form is not simpler.
â Bob Hanlon
Sep 22 at 23:30
1
@BobHanlon, great point.
â kglr
Sep 22 at 23:31
add a comment |Â
3
And the reason thatComplexityFunction
is needed in this case is becauseLeafCount /@ Sqrt[a^2 + Abs[b*c]^2], Sqrt[a^2 + b^2*c^2]
evaluates to14, 15
, i.e., the apparent simpler form is not simpler.
â Bob Hanlon
Sep 22 at 23:30
1
@BobHanlon, great point.
â kglr
Sep 22 at 23:31
3
3
And the reason that
ComplexityFunction
is needed in this case is because LeafCount /@ Sqrt[a^2 + Abs[b*c]^2], Sqrt[a^2 + b^2*c^2]
evaluates to 14, 15
, i.e., the apparent simpler form is not simpler.â Bob Hanlon
Sep 22 at 23:30
And the reason that
ComplexityFunction
is needed in this case is because LeafCount /@ Sqrt[a^2 + Abs[b*c]^2], Sqrt[a^2 + b^2*c^2]
evaluates to 14, 15
, i.e., the apparent simpler form is not simpler.â Bob Hanlon
Sep 22 at 23:30
1
1
@BobHanlon, great point.
â kglr
Sep 22 at 23:31
@BobHanlon, great point.
â kglr
Sep 22 at 23:31
add a comment |Â
up vote
3
down vote
Also, for a real number x
, Abs[x] = Sqrt[x^2]
Norm[a, b*c] /. Abs[x_] :> Sqrt[x^2]
(* Sqrt[a^2 + b^2 c^2] *)
add a comment |Â
up vote
3
down vote
Also, for a real number x
, Abs[x] = Sqrt[x^2]
Norm[a, b*c] /. Abs[x_] :> Sqrt[x^2]
(* Sqrt[a^2 + b^2 c^2] *)
add a comment |Â
up vote
3
down vote
up vote
3
down vote
Also, for a real number x
, Abs[x] = Sqrt[x^2]
Norm[a, b*c] /. Abs[x_] :> Sqrt[x^2]
(* Sqrt[a^2 + b^2 c^2] *)
Also, for a real number x
, Abs[x] = Sqrt[x^2]
Norm[a, b*c] /. Abs[x_] :> Sqrt[x^2]
(* Sqrt[a^2 + b^2 c^2] *)
answered Sep 22 at 23:38
Bob Hanlon
55.9k23589
55.9k23589
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%2f182373%2fremove-abs-from-norms-of-vectors%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