Message Boards Message Boards

0
|
2280 Views
|
15 Replies
|
8 Total Likes
View groups...
Share
Share this post:

How to remove "Abs" from "Simplify" output?

Posted 8 months ago

Hello,

In Mathemtiaca

Simplify[Sqrt[(a  b  c + d  e  g)^2], a  b  c + d  e  g > 0]

will produce

Abs[a b c + d e g]

It is a little wired, as I think the answer should be

a b d+ d e g
POSTED BY: Zhenyu Zeng
15 Replies
Sqrt[(a   b   c + d   e   g)^2] // PowerExpand
POSTED BY: Robert Nowak
Posted 7 months ago

Weird. Your way works.

POSTED BY: Zhenyu Zeng
Posted 8 months ago

Try this:

Simplify[Sqrt[(a b c+d e f)^2],(a b c+d e f)\[Element]NonNegativeReals]

It gives:

a b c + d e f
POSTED BY: Hans Milton
Posted 8 months ago

Your way is very good. Do you feel a lilttle weird as \[Element] NonNegativeReals works but >0 doesn't?

POSTED BY: Zhenyu Zeng
Posted 8 months ago

Well, looking at this further I see that this would also work:

Simplify[Sqrt[(a b c + d e f)^2], (a b c + d e f) >= 0]

So zero needs to be included in the domain of this case.

But when the expression is shorter there is no such need:

Simplify[Sqrt[(a b + d e)^2], (a b + d e) > 0]

This is puzzling

POSTED BY: Hans Milton
Posted 7 months ago

If in this situation

Simplify[Sqrt[1/(a  b  c + d  e  f)^2], (a  b  c + d  e  f) > 0]

we can't use

>=0 

here.

POSTED BY: Zhenyu Zeng
Posted 8 months ago

Simplify[Sqrt[(a b c + d e g)^2], a b c>0&&d e g>0]

returns

a b c+d e g

You might be able to loosen that up a little bit by indicating the result is still positive if one of those triples is negative

POSTED BY: Bill Nelson
Posted 8 months ago

Misread OP.

Deleted

POSTED BY: David G
Posted 8 months ago

Your example shows the square of the root. In that case no domain specification is needed. The OP asked for the root of the square,

POSTED BY: Hans Milton
Posted 8 months ago

You are of course correct. Apologies.

POSTED BY: David G

Does this help?

  Assuming[a  b  c + d  e  g > 0,  Simplify[Sqrt[(a  b  c + d  e  g)^2]]]

Out[22]= Abs[a b c + d e g]

Never mind; that's what you started with!

POSTED BY: Marvin Ray Burns

The easiest would just be removing the absolutes:

yourexpression /. Abs -> Identity
POSTED BY: Sander Huisman
Posted 8 months ago

May you tell why does this work? I don't know the reason. For example, this doesn't work

List[{a, b, c, d}] /. List -> Identity
POSTED BY: Zhenyu Zeng

Just my guess. Simplify transforms the condition a*b*c + d*e*f>0 into the complicated result of Reduce[a*b*c + d*e*f>0] and then gets bogged down. It does not recognize that it fits the pattern Simplify[Sqrt[x^2], x > 0]. Funny that the following does work:

With[{x = Sin[a*b*c + d*e*f ]},
 Simplify[Sqrt[x^2], x > 0]]
POSTED BY: Gianluca Gorni
Posted 8 months ago

Yes. It is fuuny. Is there a way to

Simplify[Sqrt[(a  b  c + d  e  g)^2], a  b  c + d  e  g > 0]
POSTED BY: Zhenyu Zeng
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract