Group Abstract Group Abstract

Message Boards Message Boards

0
|
34.4K Views
|
6 Replies
|
5 Total Likes
View groups...
Share
Share this post:

|x| as the absolute value of x?

Posted 5 years ago
POSTED BY: Nico G
6 Replies

Abs and RealAbs have different derivatives. Abs is meant to work in the complex domain, where it is not differentiable. RealAbs is differentiable in the real domain. Compare:

D[Abs[x], x]
D[RealAbs[x], x]
% // PiecewiseExpand

I wish there was a RealIntegrate that behaved this way:

RealIntegrate[1/x, x]

Log[RealAbs[x]]
POSTED BY: Gianluca Gorni
Posted 5 years ago
POSTED BY: Nico G

How would you interpret |a|b|c|? As Abs[a*Abs[b]*c] or as Abs[a]*b*Abs[c]?

Have you considered using \[LeftBracketingBar] and \[RightBracketingBar]?

One more complication is that we have to deal with Abs[x] and RealAbs[x]. TraditionalForm does not make any visual distinction between the two, except in the Tooltip.

POSTED BY: Gianluca Gorni
Posted 5 years ago
POSTED BY: Bill Nelson
Posted 5 years ago

Oh I didn't know about this. Thanks!

It still would be a cool feature, but I guess this makes it impossible to implement.

POSTED BY: Nico G

(|) single "rawverticalbar" - this symbol is defined as Alternatives built-in symbol.

Example:

{a, b, c, d, a, b, b, b, d, d, c, b, b} /. a | b | d -> x

So, I think that´s why ..|b|.. cannot be Abs[b].

See: https://reference.wolfram.com/language/ref/Alternatives.html

POSTED BY: Claudio Chaib
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard