RealAbs

RealAbs[x]

gives the absolute value of the real number x.

Details

  • RealAbs is also known as modulus.
  • Mathematical function, suitable for both symbolic and numerical manipulation.
  • RealAbs[x] is effectively equivalent to Piecewise[{{x,x>=0}},-x].
  • RealAbs is continuous and differentiable everywhere except at the origin.
  • RealAbs[x] is left unevaluated if x is not a numeric quantity.
  • RealAbs automatically threads over lists.

Examples

open allclose all

Basic Examples  (4)

Positive numbers:

Negative numbers:

Plot RealAbs over a subset of the reals:

Derivative of RealAbs:

Indefinite integral:

Scope  (23)

Numerical Evaluation  (6)

Evaluate numerically:

RealAbs remains unevaluated for imaginary numbers:

Evaluate to high precision:

The precision of the output tracks the precision of the input:

Evaluate efficiently at high precision:

RealAbs threads elementwise over lists and matrices:

RealAbs can deal with realvalued intervals:

Specific Values  (5)

Values of RealAbs at particular points:

Value at zero:

Values at infinity:

Evaluate symbolically:

Find values of for which TemplateBox[{x}, RealAbs]=2:

Substitute in the value of to create pairs:

Visualize the result:

Visualization  (3)

Plot TemplateBox[{{1, +, x}}, RealAbs]:

Plot RealAbs along with its first derivative:

Plot RealAbs in three dimensions:

Function Properties  (4)

RealAbs is defined only for real inputs:

The range of RealAbs is the non-negative reals:

RealAbs is an even function:

TraditionalForm formatting:

Differentiation and Integration  (5)

First derivative:

Obtain an equivalent expression using the definition of derivative:

The function Abs of complex variables is not differentiable:

Higher derivatives:

Compute the indefinite integral using Integrate:

Verify the antiderivative:

Definite integral:

More integrals:

Applications  (7)

Color plots according to RealAbs:

Solve a differential equation with RealAbs:

Compute the Fourier cosine series of RealAbs:

Compute a series involving RealAbs:

Solve an equation involving RealAbs:

Prove an inequality containing RealAbs:

Simplify expressions containing RealAbs:

Properties & Relations  (8)

RealAbs is defined only for real numbers:

Abs is defined for complex numbers:

RealAbs is a differentiable function:

Abs is not differentiable:

RealAbs is an integrable function:

Abs is integrable only for real arguments:

RealAbs is idempotent:

Definite integration:

Integral transforms:

Convert into Piecewise:

Denest:

Neat Examples  (1)

Form nested functions involving RealAbs:

Introduced in 2017
 (11.1)